Clear the reminder of the origin file name of textures in Track::cleanup().

This commit is contained in:
Guillaume P 2014-05-08 20:20:35 +02:00
parent deb74f4a00
commit 326c707458
3 changed files with 12 additions and 1 deletions

View File

@ -1438,6 +1438,14 @@ video::ITexture *IrrDriver::getTexture(const std::string &filename,
return out;
} // getTexture
// ----------------------------------------------------------------------------
/** Clear the texture-filename reminder.
*/
void IrrDriver::clearTexturesFileName()
{
m_texturesFileName.clear();
} // clearTexturesFileName
// ----------------------------------------------------------------------------
/** Get the texture file name using a texture pointer.
* \param tex Pointer on the texture for which we want to find the file name.

View File

@ -309,6 +309,7 @@ public:
bool is_premul=false,
bool is_prediv=false,
bool complain_if_not_found=true);
void clearTexturesFileName();
std::string getTextureName(video::ITexture* tex);
void grabAllTextures(const scene::IMesh *mesh);
void dropAllTextures(const scene::IMesh *mesh);

View File

@ -207,8 +207,10 @@ void Track::cleanup()
ItemManager::destroy();
ParticleKindManager::get()->cleanUpTrackSpecificGfx();
// Clear remainder of transformed textures
// Clear reminder of transformed textures
resetTextureTable();
// Clear reminder of the link between textures and file names.
irr_driver->clearTexturesFileName();
for(unsigned int i=0; i<m_animated_textures.size(); i++)
{