Code: Select all
// image is 512x385
video::ITexture* t = driver->getTexture("../../media/dotnetback.jpg");
while(device->run())
if (device->isWindowActive())
{
if (driver->beginScene(true, true, video::SColor(0,200,200,200)))
{
smgr->drawAll();
driver->draw2DImage(t, core::position2di(0, 0));
driver->endScene();
}
}
This is the result with the EDT_BURNINGSVIDEO driver...
The driver correctly attempts to maintain the OrigSize, but that isn't enough. In CSoftwareDriver2::draw2DImage(), there is a call to CImage::copyTo() or CImage::copyToWithAlpha(). The problem is that the image knows its own physical size, but it doesn't know the images 'original size'. You can see this by setting a breakpoint inside Blit() and looking at the source image. It will have the dimensions 512x512, which is wrong.
Ideally, all npot code should be removed from both of the software drivers. This problem does go away if you do this.
Travis