diff --git a/tests/makeColorKeyTexture.cpp b/tests/makeColorKeyTexture.cpp index 288a426..f5816e6 100644 --- a/tests/makeColorKeyTexture.cpp +++ b/tests/makeColorKeyTexture.cpp @@ -27,12 +27,12 @@ static bool doTestWith(E_DRIVER_TYPE driverType, cube->setMaterialTexture(0, driver->getTexture("../media/wall.bmp")); cube->setMaterialFlag(video::EMF_LIGHTING, false); - ITexture * Texture = device->getVideoDriver()->getTexture("../media/portal2.bmp"); + ITexture * texture = device->getVideoDriver()->getTexture("../media/portal2.bmp"); - device->getVideoDriver()->makeColorKeyTexture(Texture, + device->getVideoDriver()->makeColorKeyTexture(texture, position2d(64,64), zeroTexels); - device->getVideoDriver()->makeColorKeyTexture(Texture, + device->getVideoDriver()->makeColorKeyTexture(texture, position2d(64,64), zeroTexels); (void)smgr->addCameraSceneNode(); @@ -40,9 +40,9 @@ static bool doTestWith(E_DRIVER_TYPE driverType, driver->beginScene(video::ECBF_COLOR | video::ECBF_DEPTH, SColor(255,100,101,140)); smgr->drawAll(); - driver->draw2DImage(Texture, + driver->draw2DImage(texture, position2di(40, 40), - rect(0, 0, Texture->getSize().Width, Texture->getSize().Height), + recti(texture->getOriginalSize()), 0, SColor(255,255,255,255), true); diff --git a/tests/renderTargetTexture.cpp b/tests/renderTargetTexture.cpp index 24d15d0..140e9a5 100644 --- a/tests/renderTargetTexture.cpp +++ b/tests/renderTargetTexture.cpp @@ -45,14 +45,13 @@ static bool testWith2DImage(video::E_DRIVER_TYPE driverType) //draw the image : driver->beginScene(video::ECBF_COLOR | video::ECBF_DEPTH, video::SColor (255, 200, 200, 200)); driver->draw2DImage (image, - core::rect < s32 > - (64 - image->getSize ().Width / 2, - 64 - image->getSize ().Height / 2, - 64 + image->getSize ().Width / 2, - 64 + image->getSize ().Height / 2), - core::rect < s32 > (0, 0, image->getSize ().Width, - image->getSize ().Height), 0, colors, - true); + core::recti( + 64 - image->getOriginalSize().Width / 2, + 64 - image->getOriginalSize().Height / 2, + 64 + image->getOriginalSize().Width / 2, + 64 + image->getOriginalSize().Height / 2), + core::recti(image->getOriginalSize()), + 0, colors, true); driver->endScene (); //then create a model and apply to it the RTT Texture @@ -76,14 +75,13 @@ static bool testWith2DImage(video::E_DRIVER_TYPE driverType) //draw img driver->draw2DImage (image, - core::rect < s32 > - (64 - image->getSize ().Width / 2, - 64 - image->getSize ().Height / 2, - 64 + image->getSize ().Width / 2, - 64 + image->getSize ().Height / 2), - core::rect < s32 > (0, 0, image->getSize ().Width, - image->getSize ().Height), 0, - colors, true); + core::recti( + 64 - image->getOriginalSize().Width / 2, + 64 - image->getOriginalSize().Height / 2, + 64 + image->getOriginalSize().Width / 2, + 64 + image->getOriginalSize().Height / 2), + core::recti(image->getOriginalSize()), + 0, colors, true); //call this is important : //if not called, the bug won't appear @@ -243,7 +241,7 @@ bool rttAndText(video::E_DRIVER_TYPE driverType) driver->beginScene(0, video::SColor(255,255, 255, 255)); driver->setRenderTargetEx(renderTarget, video::ECBF_COLOR | video::ECBF_DEPTH, video::SColor(255,255,0,255)); - driver->draw2DImage(driver->getTexture("../media/fireball.bmp"), core::recti(0, 0, renderTargetTex->getSize().Width, renderTargetTex->getSize().Height), core::recti(0, 0, 64, 64)); + driver->draw2DImage(driver->getTexture("../media/fireball.bmp"), core::recti(renderTargetTex->getOriginalSize()), core::recti(0, 0, 64, 64)); guienv->getBuiltInFont()->draw(L"OMGGG =!", core::rect(120, 100, 256, 256), video::SColor(255, 0, 0, 255)); driver->setRenderTargetEx(0, 0, 0); driver->endScene(); diff --git a/tests/tests-last-passed-at.txt b/tests/tests-last-passed-at.txt index 13f82e6..c231e34 100644 --- a/tests/tests-last-passed-at.txt +++ b/tests/tests-last-passed-at.txt @@ -1,4 +1,4 @@ Tests finished. 72 tests of 72 passed. Compiled as DEBUG -Test suite pass at GMT Tue Mar 29 20:20:24 2022 +Test suite pass at GMT Wed Mar 30 21:02:37 2022