From a0607201a2d424dcb0337f94af387afe40dd416d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 5 Nov 2010 17:31:25 +0000 Subject: [PATCH] From David Fries and Robert Osfield, fix for handling remote GLX server that declares GL 3.0 support but doesn't actually implement it correctly. --- src/osg/GLExtensions.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osg/GLExtensions.cpp b/src/osg/GLExtensions.cpp index 34e5beb1f..59dfcf979 100644 --- a/src/osg/GLExtensions.cpp +++ b/src/osg/GLExtensions.cpp @@ -111,6 +111,7 @@ bool osg::isGLExtensionOrVersionSupported(unsigned int contextID, const char *ex rendererString = renderer ? (const char*)renderer : ""; // get the extension list from OpenGL. + GLint numExt = 0; #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) if( osg::getGLVersionNumber() >= 3.0 ) { @@ -129,7 +130,6 @@ bool osg::isGLExtensionOrVersionSupported(unsigned int contextID, const char *ex # ifndef GL_NUM_EXTENSIONS # define GL_NUM_EXTENSIONS 0x821D # endif - GLint numExt = 0; glGetIntegerv( GL_NUM_EXTENSIONS, &numExt ); int idx; for( idx=0; idx