From 0f492a3950f16a23012d806a2277b0ff40a5b5d5 Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 23 Apr 2010 14:10:35 +0000 Subject: [PATCH] Bug IPAL21715 : TC5.1.4: Application hangs up after calling of context menu in VTK viewer --- src/OpenGLUtils/OpenGLUtils_FrameBuffer.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/OpenGLUtils/OpenGLUtils_FrameBuffer.cxx b/src/OpenGLUtils/OpenGLUtils_FrameBuffer.cxx index c976e7d0a..62f5687d1 100755 --- a/src/OpenGLUtils/OpenGLUtils_FrameBuffer.cxx +++ b/src/OpenGLUtils/OpenGLUtils_FrameBuffer.cxx @@ -22,6 +22,10 @@ // #include "OpenGLUtils_FrameBuffer.h" +#include + +#include + #ifndef WNT # ifndef GLX_GLXEXT_LEGACY # define GLX_GLXEXT_LEGACY @@ -124,8 +128,13 @@ OpenGLUtils_FrameBuffer::~OpenGLUtils_FrameBuffer() bool OpenGLUtils_FrameBuffer::init( const GLsizei& xSize, const GLsizei& ySize ) { - if( !IsEXTInitialized ) + char* ext = (char*)glGetString( GL_EXTENSIONS ); + if( !IsEXTInitialized || + strstr( ext, "GL_EXT_framebuffer_object" ) == NULL ) + { + MESSAGE( "Initializing OpenGL FrameBuffer extension failed" ); return false; + } // create a texture object glEnable( GL_TEXTURE_2D ); -- 2.39.2