]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Bug IPAL21715 : TC5.1.4: Application hangs up after calling of context menu in VTK...
authorouv <ouv@opencascade.com>
Fri, 23 Apr 2010 14:10:35 +0000 (14:10 +0000)
committerouv <ouv@opencascade.com>
Fri, 23 Apr 2010 14:10:35 +0000 (14:10 +0000)
src/OpenGLUtils/OpenGLUtils_FrameBuffer.cxx

index c976e7d0acfd90c8378274c6d2adcbd95eb65497..62f5687d181276d0f29804c529055c77ecb4383b 100755 (executable)
 //
 #include "OpenGLUtils_FrameBuffer.h"
 
+#include <utilities.h>
+
+#include <string>
+
 #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 );