diff options
Diffstat (limited to 'src/mesh.cpp')
-rw-r--r-- | src/mesh.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesh.cpp b/src/mesh.cpp index 0f075f72b..b9ec82e18 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -433,6 +433,9 @@ video::ITexture *generateTextureFromMesh(scene::IMesh *mesh, } // Create render target texture + video::ITexture *oldtexture = driver->findTexture(texture_name.c_str()); + if(oldtexture) + driver->removeTexture(oldtexture); video::ITexture *rtt = driver->addRenderTargetTexture( dim, texture_name.c_str(), video::ECF_A8R8G8B8); if(rtt == NULL) |