Commit 20c762c5 authored by hybrid's avatar hybrid

Add test for self-shadowing

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3207 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 7260791e
......@@ -106,11 +106,13 @@ int main(int argumentCount, char * arguments[])
TEST(antiAliasing);
TEST(draw2DImage);
TEST(lights);
TEST(orthoCam);
TEST(stencilShadow)
// TODO: Needs to be fixed first.
// TEST(projectionMatrix);
// large scenes
// large scenes/long rendering
// shadows are slow
TEST(orthoCam);
TEST(stencilShadow);
// q3 maps are slow
TEST(planeMatrix);
TEST(terrainSceneNode);
TEST(lightMaps);
......
......@@ -33,7 +33,24 @@ static bool shadows(video::E_DRIVER_TYPE driverType)
device->getSceneManager()->drawAll();
device->getVideoDriver()->endScene();
const bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-stencilShadow.png", 99.91f);
bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-stencilShadow.png", 99.91f);
node->remove();
cube->remove();
// test self-shadowing
node = device->getSceneManager()->addAnimatedMeshSceneNode(device->getSceneManager()->getMesh("../media/dwarf.x"));
node->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
node->addShadowVolumeSceneNode();
node->setAnimationSpeed(0.f);
cam->setPosition(core::vector3df(0,55,-30));
cam->setTarget(core::vector3df(60,45,150));
device->getVideoDriver()->beginScene (true, true, 0);
device->getSceneManager()->drawAll();
device->getVideoDriver()->endScene();
result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-stencilSelfShadow.png", 99.91f);
device->drop();
......
Tests finished. 54 tests of 54 passed.
Compiled as DEBUG
Test suite pass at GMT Sun Feb 07 11:52:13 2010
Test suite pass at GMT Sun Feb 07 12:13:48 2010
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment