fix screen flickering black when rendering to texture

This commit is contained in:
Jürgen Doser 2012-12-06 16:11:15 +01:00 committed by Perttu Ahola
parent 543fc6702f
commit 870f7bcc93

@ -443,7 +443,7 @@ video::ITexture *generateTextureFromMesh(scene::IMesh *mesh,
} }
// Set render target // Set render target
driver->setRenderTarget(rtt, true, true, video::SColor(0,0,0,0)); driver->setRenderTarget(rtt, false, true, video::SColor(0,0,0,0));
// Get a scene manager // Get a scene manager
scene::ISceneManager *smgr_main = device->getSceneManager(); scene::ISceneManager *smgr_main = device->getSceneManager();
@ -478,7 +478,7 @@ video::ITexture *generateTextureFromMesh(scene::IMesh *mesh,
smgr->drop(); smgr->drop();
// Unset render target // Unset render target
driver->setRenderTarget(0, true, true, 0); driver->setRenderTarget(0, false, true, 0);
return rtt; return rtt;
} }