@@ -139,7 +139,7 @@ void Ogre2DisplacementMap::InitTextures()
139
139
140
140
// Create displacement texture
141
141
gzmsg << " Create HeightMap texture\n " ;
142
- mHeightMapTex = ogre2TextureManager->createTexture (
142
+ mHeightMapTex = ogre2TextureManager->createOrRetrieveTexture (
143
143
" HeightMapTex(" + std::to_string (this ->entity ) + " )" ,
144
144
Ogre::GpuPageOutStrategy::SaveToSystemRam,
145
145
Ogre::TextureFlags::ManualTexture,
@@ -153,7 +153,7 @@ void Ogre2DisplacementMap::InitTextures()
153
153
154
154
// Create normal texture
155
155
gzmsg << " Create NormalMap texture\n " ;
156
- mNormalMapTex = ogre2TextureManager->createTexture (
156
+ mNormalMapTex = ogre2TextureManager->createOrRetrieveTexture (
157
157
" NormalMapTex(" + std::to_string (this ->entity ) + " )" ,
158
158
Ogre::GpuPageOutStrategy::SaveToSystemRam,
159
159
Ogre::TextureFlags::ManualTexture,
@@ -167,7 +167,7 @@ void Ogre2DisplacementMap::InitTextures()
167
167
168
168
// Create tangent texture
169
169
gzmsg << " Create TangentMap texture\n " ;
170
- mTangentMapTex = ogre2TextureManager->createTexture (
170
+ mTangentMapTex = ogre2TextureManager->createOrRetrieveTexture (
171
171
" TangentMapTex(" + std::to_string (this ->entity ) + " )" ,
172
172
Ogre::GpuPageOutStrategy::SaveToSystemRam,
173
173
Ogre::TextureFlags::ManualTexture,
0 commit comments