@@ -139,7 +139,7 @@ void Ogre2DisplacementMap::InitTextures()
139139
140140 // Create displacement texture
141141 gzmsg << " Create HeightMap texture\n " ;
142- mHeightMapTex = ogre2TextureManager->createTexture (
142+ mHeightMapTex = ogre2TextureManager->createOrRetrieveTexture (
143143 " HeightMapTex(" + std::to_string (this ->entity ) + " )" ,
144144 Ogre::GpuPageOutStrategy::SaveToSystemRam,
145145 Ogre::TextureFlags::ManualTexture,
@@ -153,7 +153,7 @@ void Ogre2DisplacementMap::InitTextures()
153153
154154 // Create normal texture
155155 gzmsg << " Create NormalMap texture\n " ;
156- mNormalMapTex = ogre2TextureManager->createTexture (
156+ mNormalMapTex = ogre2TextureManager->createOrRetrieveTexture (
157157 " NormalMapTex(" + std::to_string (this ->entity ) + " )" ,
158158 Ogre::GpuPageOutStrategy::SaveToSystemRam,
159159 Ogre::TextureFlags::ManualTexture,
@@ -167,7 +167,7 @@ void Ogre2DisplacementMap::InitTextures()
167167
168168 // Create tangent texture
169169 gzmsg << " Create TangentMap texture\n " ;
170- mTangentMapTex = ogre2TextureManager->createTexture (
170+ mTangentMapTex = ogre2TextureManager->createOrRetrieveTexture (
171171 " TangentMapTex(" + std::to_string (this ->entity ) + " )" ,
172172 Ogre::GpuPageOutStrategy::SaveToSystemRam,
173173 Ogre::TextureFlags::ManualTexture,
0 commit comments