Commit 388a79be authored by Pavel Rojtberg's avatar Pavel Rojtberg

ovis: correctly delete textures allocated by WindowScene

parent 9a401e3d
......@@ -348,10 +348,18 @@ public:
{
if (flags & SCENE_SEPERATE)
{
TextureManager& texMgr = TextureManager::getSingleton();
MaterialManager::getSingleton().remove(bgplane->getMaterial());
bgplane.release();
String texName = sceneMgr->getName() + "_Background";
TextureManager::getSingleton().remove(texName, RESOURCEGROUP_NAME);
String texName = "_"+sceneMgr->getName() + "_DefaultBackground";
texMgr.remove(texName, RESOURCEGROUP_NAME);
texName = sceneMgr->getName() + "_Background";
if(texMgr.resourceExists(texName, RESOURCEGROUP_NAME))
{
texMgr.remove(texName, RESOURCEGROUP_NAME);
}
}
if(_app->sceneMgr == sceneMgr && (flags & SCENE_SEPERATE))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment