diff --git a/include/IMeshTextureLoader.h b/include/IMeshTextureLoader.h index 5fdc286f..19b2f205 100644 --- a/include/IMeshTextureLoader.h +++ b/include/IMeshTextureLoader.h @@ -51,12 +51,6 @@ public: \return Pointer to the texture. Returns 0 if loading failed.*/ virtual irr::video::ITexture* getTexture(const irr::io::path& textureName) = 0; - //! Check which texture-name was last recently used. - /** Usually you do not have to use this method, it is used internally by IMeshLoader's. - It's updated on getTexture calls. When those succeed this will return the full name which was - used to find the texture. Then getTexture failed it will contain the last name which was tried. */ - virtual const irr::io::path& getRecentTextureName() const = 0; - //! Check if the last call to getTexture found a texture which was already cached. /** Usually you do not have to use this method, it is used internally by IMeshLoader's. This will only work when a) CheckForCachedTextures is set to true and b) getTexture was diff --git a/source/Irrlicht/CMY3DMeshFileLoader.cpp b/source/Irrlicht/CMY3DMeshFileLoader.cpp index b108d7c0..bc182cbb 100644 --- a/source/Irrlicht/CMY3DMeshFileLoader.cpp +++ b/source/Irrlicht/CMY3DMeshFileLoader.cpp @@ -202,7 +202,8 @@ IAnimatedMesh* CMY3DMeshFileLoader::createMesh(io::IReadFile* file) if ( getMeshTextureLoader() ) { me.Texture2 = getMeshTextureLoader() ? getMeshTextureLoader()->getTexture(name) : NULL; - me.Texture2FileName = getMeshTextureLoader()->getRecentTextureName(); + if ( me.Texture2 ) + me.Texture2FileName = me.Texture2->getName(); } else me.Texture2FileName = name; @@ -215,7 +216,8 @@ IAnimatedMesh* CMY3DMeshFileLoader::createMesh(io::IReadFile* file) if ( getMeshTextureLoader() ) { me.Texture1 = getMeshTextureLoader() ? getMeshTextureLoader()->getTexture(name) : NULL; - me.Texture1FileName = getMeshTextureLoader()->getRecentTextureName(); + if ( me.Texture1 ) + me.Texture1FileName = me.Texture1->getName(); } else me.Texture1FileName = name; diff --git a/source/Irrlicht/CMeshTextureLoader.cpp b/source/Irrlicht/CMeshTextureLoader.cpp index 8a80ca7c..e8becd0b 100644 --- a/source/Irrlicht/CMeshTextureLoader.cpp +++ b/source/Irrlicht/CMeshTextureLoader.cpp @@ -111,12 +111,6 @@ irr::video::ITexture* CMeshTextureLoader::getTexture(const irr::io::path& textur return NULL; } -//! Check which texture-name was last recently used. -const irr::io::path& CMeshTextureLoader::getRecentTextureName() const -{ - return TextureName; -} - //! Check if the last call to getTexture found a texture which was already cached. bool CMeshTextureLoader::wasRecentTextureInCache() const { diff --git a/source/Irrlicht/CMeshTextureLoader.h b/source/Irrlicht/CMeshTextureLoader.h index e4eb9f8f..6428a1d3 100644 --- a/source/Irrlicht/CMeshTextureLoader.h +++ b/source/Irrlicht/CMeshTextureLoader.h @@ -35,12 +35,6 @@ public: \return Pointer to the texture. Returns 0 if loading failed.*/ virtual irr::video::ITexture* getTexture(const irr::io::path& textureName) _IRR_OVERRIDE_; - //! Check which texture-name was last recently used. - /** Usually you do not have to use this method, it is used internally by IMeshLoader's. - It's updated on getTexture calls. When those succeed this will return the full name which was - used to find the texture. Then getTexture failed it will contain the last name which was tried. */ - virtual const irr::io::path& getRecentTextureName() const _IRR_OVERRIDE_; - //! Check if the last call to getTexture found a texture which was already cached. /** Usually you do not have to use this method, it is used internally by IMeshLoader's. This will only work when a) CheckForCachedTextures is set to true and b) getTexture was