I'm trying to draw 4 images (256x256) on a RenderTarget (512x512).
Normally the Rendertarget should be completely covered.
If my screensize (well for the game) is 512x512 then everything works as expected but
if I set it to 1024x768 then the images drawn on the rendertarget are scaled, actually it is like the RT
is scaled (smaller, to a like 512x384) because it even clips the images drawn (not shown in the screenshot though).
The rendertarget drawn to screen (RT 512x512, screen 1024x768):
I draw things at render time (between beginscene and endscene).
the RT:
Code: Select all
video::ITexture *BaseMapRT;
...
BaseMapRT=globals.GetDriver()->addRenderTargetTexture(core::dimension2d<s32>(512,512), "BASEMAP");
Code: Select all
video::ITexture *Image;
...
Image=driver->getTexture(filename);
Code: Select all
driver->setRenderTarget(BaseMapRT,true,false,video::SColor(127,63,0,63));
driver->draw2DImage(MapPart00.GetImage(), core::position2d<s32>( 0, 0));
driver->draw2DImage(MapPart10.GetImage(), core::position2d<s32>(256, 0));
driver->draw2DImage(MapPart01.GetImage(), core::position2d<s32>( 0,256));
driver->draw2DImage(MapPart11.GetImage(), core::position2d<s32>(256,256));
driver->setRenderTarget(0);
I'm using Irrlicht 1.5 and OpenGL.
I saw this bug but I don't know if it has something to do with this.
Any ideas on what I'm doing wrong?
Thanks!