fix screen flickering black when rendering to texture
authorJürgen Doser <jurgen.doser@gmail.com>
Thu, 6 Dec 2012 15:11:15 +0000 (16:11 +0100)
committerPerttu Ahola <celeron55@gmail.com>
Thu, 6 Dec 2012 17:56:49 +0000 (19:56 +0200)
src/mesh.cpp

index 0f075f72b8e64448d00a34ec9b90317526856d48..29b85314322885d692fd79c59069769cb82978be 100644 (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;
 }