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