Yellow
04-08-2006 15:27:44
In a side project, I'm trying to generate dynamic terrain, islands in this case. I'm generating a heightmap, and use part of the mapsplitter code to process it.
All go's well terrain wise, but when my new terrain is loaded in, it still uses the old texture. Is there some way to uncache it?
I tried the following stuff:
Ogre::MaterialManager::getSingleton().unload("BaseTexture");
Ogre::MaterialManager::getSingleton().load("BaseTexture","PLSM2");
Ogre::MaterialManager::getSingleton().reloadAll();
mSceneMgr->setOption( "CurrentTextureFormat", &String("BaseTexture"));
All go's well terrain wise, but when my new terrain is loaded in, it still uses the old texture. Is there some way to uncache it?
I tried the following stuff:
Ogre::MaterialManager::getSingleton().unload("BaseTexture");
Ogre::MaterialManager::getSingleton().load("BaseTexture","PLSM2");
Ogre::MaterialManager::getSingleton().reloadAll();
mSceneMgr->setOption( "CurrentTextureFormat", &String("BaseTexture"));