Commit bb44b624 authored by hybrid's avatar hybrid

Add some closeDevice calls to reduce the open windows after tests have run.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3411 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 69bc11c8
......@@ -77,8 +77,10 @@ static bool addBlend2d(video::E_DRIVER_TYPE type)
driver->enableMaterial2D(false);
driver->endScene();
bool result = takeScreenshotAndCompareAgainstReference(driver, "-addBlend2D.png", 99.8f);
bool result = takeScreenshotAndCompareAgainstReference(driver, "-addBlend2D.png", 98.66f);
device->closeDevice();
device->run();
device->drop();
return result;
}
......
......@@ -43,6 +43,8 @@ static bool testLineRendering(video::E_DRIVER_TYPE type)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-lineAntiAliasing.png", 99.5f );
device->closeDevice();
device->run();
device->drop();
return result;
}
......
......@@ -255,6 +255,8 @@ bool archiveReader()
logTestString("Testing encrypted zip files.\n");
ret &= testEncryptedZip(fs);
device->closeDevice();
device->run();
device->drop();
return ret;
......
......@@ -84,6 +84,8 @@ bool b3dAnimation(void)
result &= takeScreenshotAndCompareAgainstReference(driver, "-b3dJointPosition.png");
device->closeDevice();
device->run();
device->drop();
return result;
......
......@@ -32,6 +32,8 @@ bool burningsVideo(void)
result = takeScreenshotAndCompareAgainstReference(driver, "-ambient-lighting.png", 100);
}
device->closeDevice();
device->run();
device->drop();
return result;
......
......@@ -188,7 +188,8 @@ bool collisionResponseAnimator(void)
result = false;
}
device->closeDevice();
device->run();
device->drop();
result &= expectedCollisionCallbackPositions;
......
......@@ -28,6 +28,8 @@ static bool testImageCreation(video::E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-createImage.png");
device->closeDevice();
device->run();
device->drop();
return result;
......
......@@ -55,6 +55,8 @@ bool cursorSetVisible(void)
// each actual change of visibility.
bool result = (moveTrapper.MouseMovesReceived <= 3);
device->closeDevice();
device->run();
device->drop();
if(!result)
......
......@@ -75,7 +75,10 @@ bool disambiguateTextures(void)
// The working directory must be restored for the other tests to work.
changed &= device->getFileSystem()->changeWorkingDirectoryTo(wd.c_str());
device->closeDevice();
device->run();
device->drop();
return (changed && tex1 == tex2 && tex1 == tex3 && tex1 != tex4) ? true : false;
}
......@@ -31,6 +31,8 @@ static bool testWithRenderTarget(video::E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-draw2DImageRTT.png");
device->closeDevice();
device->run();
device->drop();
return result;
......
......@@ -46,6 +46,8 @@ static bool runTestWithDriver(E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-drawPixel.png", 98.81f);
device->closeDevice();
device->run();
device->drop();
return result;
......
......@@ -28,8 +28,10 @@ bool testWithDriver(video::E_DRIVER_TYPE driverType)
driver->endScene();
bool result = takeScreenshotAndCompareAgainstReference(driver, "-drawRectOutline.png", 99.9f );
bool result = takeScreenshotAndCompareAgainstReference(driver, "-drawRectOutline.png", 99.79f );
device->closeDevice();
device->run();
device->drop();
return result ;
......
......@@ -125,6 +125,8 @@ bool enumerateImageManipulators(void)
}
}
device->closeDevice();
device->run();
device->drop();
return result;
......
......@@ -77,7 +77,7 @@ bool testGeometryCreator(void)
{
smgr->drawAll();
driver->endScene();
result = takeScreenshotAndCompareAgainstReference(driver, "-testGeometryCreator.png", 99.999f);
result = takeScreenshotAndCompareAgainstReference(driver, "-testGeometryCreator.png", 99.994f);
}
smgr->clear();
......@@ -111,8 +111,10 @@ bool testGeometryCreator(void)
// This screenshot shows some mipmap problems, but this seems to be
// no fault of the mesh
result = takeScreenshotAndCompareAgainstReference(driver, "-testTerrainMesh.png", 99.999f);
result = takeScreenshotAndCompareAgainstReference(driver, "-testTerrainMesh.png", 99.989f);
device->closeDevice();
device->run();
device->drop();
return result;
......
......@@ -16,7 +16,9 @@ bool testVideoDriver(video::E_DRIVER_TYPE driverType)
return true;
video::IVideoDriver* driver = device->getVideoDriver();
logTestString("Testing driver %ls\n", driver->getName());
logTestString("MaxTextures: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxTextures"));
logTestString("MaxSupportedTextures: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxSupportedTextures"));
logTestString("MaxLights: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxLights"));
logTestString("MaxAnisotropy: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxAnisotropy"));
logTestString("MaxUserClipPlanes: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxUserClipPlanes"));
......@@ -28,6 +30,8 @@ bool testVideoDriver(video::E_DRIVER_TYPE driverType)
logTestString("Version: %d\n", driver->getDriverAttributes().getAttributeAsInt("Version"));
logTestString("ShaderLanguageVersion: %d\n", driver->getDriverAttributes().getAttributeAsInt("ShaderLanguageVersion"));
device->closeDevice();
device->run();
device->drop();
return true;
}
......
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