This is the screen resolution
Code: Select all
#define DIMENSION_X 640
#define DIMENSION_Y 480
Code: Select all
ITexture *rTexture = driver->createRenderTargetTexture(dimension2d<s32>(DIMENSION_X, DIMENSION_Y));
Code: Select all
driver->beginScene(true, true, SColor(255,100,101,140));
if (rTexture)
{
// set render target texture
driver->setRenderTarget(rTexture,true,true);
// set cube invisible then set active camera to the fixed one
cube0->setVisible(false);
lightBox->setVisible(false);
smgr->setActiveCamera(fixedCamera);
// now render
smgr->drawAll();
driver->setRenderTarget(0,true,true); // get back to old target
driver->draw2DImage(rTexture, position2d<s32>(0,0), rect<s32>(0,0,DIMENSION_X,DIMENSION_Y));
cube0->setVisible(true);
lightBox->setVisible(true);
smgr->setActiveCamera(camera);
}
//smgr->drawAll();
driver->endScene();
Anyone have this problem or know how to fix this? Thanks in advance.