Fix crash with 3.1 context when cleaning rtt.

This commit is contained in:
vlj 2014-05-30 15:34:24 +02:00
parent a907df37ad
commit aa0691015a

View File

@ -55,6 +55,7 @@ RTT::RTT(size_t width, size_t height)
{
m_shadow_FBO = NULL;
m_RSM = NULL;
m_RH_FBO = NULL;
using namespace video;
using namespace core;
@ -237,9 +238,6 @@ RTT::RTT(size_t width, size_t height)
RTT::~RTT()
{
delete m_shadow_FBO;
delete m_RH_FBO;
delete m_RSM;
glDeleteTextures(RTT_COUNT, RenderTargetTextures);
glDeleteTextures(1, &DepthStencilTexture);
if (irr_driver->getGLSLVersion() >= 150)
@ -252,5 +250,9 @@ RTT::~RTT()
glDeleteTextures(1, &RH_Red);
glDeleteTextures(1, &RH_Green);
glDeleteTextures(1, &RH_Blue);
delete m_shadow_FBO;
delete m_RH_FBO;
delete m_RSM;
}
}