fix screen flickering black when rendering to texture

stable-0.4
Jürgen Doser 2012-12-06 16:11:15 +01:00 committed by Perttu Ahola
parent 543fc6702f
commit 870f7bcc93
1 changed files with 2 additions and 2 deletions

View File

@ -443,7 +443,7 @@ video::ITexture *generateTextureFromMesh(scene::IMesh *mesh,
}
// 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
scene::ISceneManager *smgr_main = device->getSceneManager();
@ -478,7 +478,7 @@ video::ITexture *generateTextureFromMesh(scene::IMesh *mesh,
smgr->drop();
// Unset render target
driver->setRenderTarget(0, true, true, 0);
driver->setRenderTarget(0, false, true, 0);
return rtt;
}