diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpu.h b/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpu.h index 5244afba5d7..9e31cb7fe57 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpu.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpu.h @@ -147,6 +147,7 @@ namespace Ogre VaoManager *vaoManager, IdString name, uint32 textureFlags, TextureTypes::TextureTypes initialType, TextureGpuManager *textureManager ); + virtual ~GL3PlusTextureGpuRenderTarget(); virtual void _setDepthBufferDefaults( uint16 depthBufferPoolId, bool preferDepthTexture, PixelFormatGpu desiredDepthBufferFormat ); diff --git a/RenderSystems/GL3Plus/src/OgreGL3PlusTextureGpu.cpp b/RenderSystems/GL3Plus/src/OgreGL3PlusTextureGpu.cpp index 85e931b979a..04ea4debdcd 100644 --- a/RenderSystems/GL3Plus/src/OgreGL3PlusTextureGpu.cpp +++ b/RenderSystems/GL3Plus/src/OgreGL3PlusTextureGpu.cpp @@ -744,6 +744,11 @@ namespace Ogre mDepthBufferPoolId = 0; } //----------------------------------------------------------------------------------- + GL3PlusTextureGpuRenderTarget::~GL3PlusTextureGpuRenderTarget() + { + destroyInternalResourcesImpl(); + } + //----------------------------------------------------------------------------------- void GL3PlusTextureGpuRenderTarget::createInternalResourcesImpl(void) { if( mPixelFormat == PFG_NULL )