From 4e420739d65597111ff098723c6a5a81d1db6a4e Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 20 Apr 2010 08:48:34 +0000 Subject: [PATCH] fix on windows ... --- src/OpenGLUtils/OpenGLUtils_FrameBuffer.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/OpenGLUtils/OpenGLUtils_FrameBuffer.cxx b/src/OpenGLUtils/OpenGLUtils_FrameBuffer.cxx index 87357ec47..a503d38d0 100755 --- a/src/OpenGLUtils/OpenGLUtils_FrameBuffer.cxx +++ b/src/OpenGLUtils/OpenGLUtils_FrameBuffer.cxx @@ -165,6 +165,9 @@ bool OpenGLUtils_FrameBuffer::init( const GLsizei& xSize, const GLsizei& ySize ) void OpenGLUtils_FrameBuffer::release() { + if( !IsEXTInitialized ) + return; + glDeleteTextures( 1, &textureId ); textureId = 0; @@ -177,10 +180,16 @@ void OpenGLUtils_FrameBuffer::release() void OpenGLUtils_FrameBuffer::bind() { + if( !IsEXTInitialized ) + return; + vglBindFramebufferEXT( GL_FRAMEBUFFER_EXT, fboId ); } void OpenGLUtils_FrameBuffer::unbind() { + if( !IsEXTInitialized ) + return; + vglBindFramebufferEXT( GL_FRAMEBUFFER_EXT, 0 ); } -- 2.39.2