Commit 69bc11c8 authored by hybrid's avatar hybrid

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3409 dfc29bdd-3216-0410-991c-e03cc46cb475

parent d6eb580f
...@@ -2,10 +2,13 @@ ...@@ -2,10 +2,13 @@
using namespace irr; using namespace irr;
bool drawRectOutline(void) bool testWithDriver(video::E_DRIVER_TYPE driverType)
{ {
IrrlichtDevice *device = IrrlichtDevice *device =
createDevice(video::EDT_BURNINGSVIDEO, core::dimension2du(160, 120)); createDevice(driverType, core::dimension2du(160, 120));
if (!device)
return true;
video::IVideoDriver* driver = device->getVideoDriver(); video::IVideoDriver* driver = device->getVideoDriver();
driver->beginScene(true, true, video::SColor(255,100,101,140)); driver->beginScene(true, true, video::SColor(255,100,101,140));
...@@ -18,11 +21,27 @@ bool drawRectOutline(void) ...@@ -18,11 +21,27 @@ bool drawRectOutline(void)
r += core::position2di( 10 , 10 ); r += core::position2di( 10 , 10 );
driver->draw2DRectangleOutline( r , video::SColor(128, 255, 128, 128) ); driver->draw2DRectangleOutline( r , video::SColor(128, 255, 128, 128) );
driver->getMaterial2D().Thickness=12.f;
driver->enableMaterial2D();
r += core::position2di( 10 , 10 );
driver->draw2DRectangleOutline( r , video::SColor(128, 255, 128, 128) );
driver->endScene(); driver->endScene();
bool result = takeScreenshotAndCompareAgainstReference(driver, "-drawRectOutline.png" ); bool result = takeScreenshotAndCompareAgainstReference(driver, "-drawRectOutline.png", 99.9f );
device->drop(); device->drop();
return result ; return result ;
} }
bool drawRectOutline(void)
{
// TODO: Only OpenGL supports thick lines
bool result = testWithDriver(video::EDT_BURNINGSVIDEO);
result &= testWithDriver(video::EDT_DIRECT3D8);
result &= testWithDriver(video::EDT_DIRECT3D9);
result &= testWithDriver(video::EDT_OPENGL);
result &= testWithDriver(video::EDT_SOFTWARE);
return result;
}
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