From: adam Date: Tue, 20 Apr 2010 08:48:34 +0000 (+0000) Subject: fix on windows ... X-Git-Tag: V5_1_4rc1~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4e420739d65597111ff098723c6a5a81d1db6a4e;p=modules%2Fgui.git fix on windows ... --- 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 ); }