diff --git a/OgreMain/include/OgreTexture.h b/OgreMain/include/OgreTexture.h index d0132893081..d3ee1b6e78f 100644 --- a/OgreMain/include/OgreTexture.h +++ b/OgreMain/include/OgreTexture.h @@ -148,11 +148,7 @@ namespace Ogre { /** Sets the surface when you already have one */ - virtual void _setSurface(void* surface) { mSurface = surface; } - - /** Gets the surface - */ - void* getSurface(void) const { return mSurface; } + virtual void _setSurface(void* surface) {} /** Gets the number of mipmaps to be used for this texture. */ @@ -481,9 +477,7 @@ namespace Ogre { typedef std::vector SurfaceList; SurfaceList mSurfaceList; - TextureType mTextureType; - - void* mSurface; + TextureType mTextureType; void prepareImpl() override; void unprepareImpl() override; diff --git a/RenderSystems/Direct3D11/include/OgreD3D11Texture.h b/RenderSystems/Direct3D11/include/OgreD3D11Texture.h index 3a0a2db03e4..7192a9296c7 100644 --- a/RenderSystems/Direct3D11/include/OgreD3D11Texture.h +++ b/RenderSystems/Direct3D11/include/OgreD3D11Texture.h @@ -108,6 +108,8 @@ namespace Ogre { /// mipmap level. This method must be called after the D3D texture object was created void _createSurfaceList(void); + void _setSurface(void* surface) override; + void notifyDeviceLost(D3D11Device* device); void notifyDeviceRestored(D3D11Device* device); @@ -128,6 +130,8 @@ namespace Ogre { D3D11_SHADER_RESOURCE_VIEW_DESC mSRVDesc; bool mAutoMipMapGeneration; + + void* mSurface; }; /// RenderTexture implementation for D3D11 diff --git a/RenderSystems/Direct3D11/src/OgreD3D11Texture.cpp b/RenderSystems/Direct3D11/src/OgreD3D11Texture.cpp index 7e8cbeca912..9050f94afab 100644 --- a/RenderSystems/Direct3D11/src/OgreD3D11Texture.cpp +++ b/RenderSystems/Direct3D11/src/OgreD3D11Texture.cpp @@ -548,6 +548,8 @@ void D3D11Texture::_createSurfaceList(void) } } //--------------------------------------------------------------------- +void D3D11Texture :: _setSurface(void* surface) { mSurface = surface; } +//--------------------------------------------------------------------- // D3D11RenderTexture //--------------------------------------------------------------------- void D3D11RenderTexture::rebind(D3D11HardwarePixelBuffer* buffer)