1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-22 23:58:48 -05:00

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

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;
}