Index: /OpenSceneGraph/trunk/src/osg/GLExtensions.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osg/GLExtensions.cpp (revision 11125)
+++ /OpenSceneGraph/trunk/src/osg/GLExtensions.cpp (revision 11126)
@@ -92,4 +92,5 @@
 
             // get the extension list from OpenGL.
+            #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
             if( osg::getGLVersionNumber() >= 3.0 )
             {
@@ -106,7 +107,7 @@
                 if( glGetStringi != NULL )
                 {
-    #  ifndef GL_NUM_EXTENSIONS
-    #    define GL_NUM_EXTENSIONS 0x821D
-    #  endif
+                    #  ifndef GL_NUM_EXTENSIONS
+                    #    define GL_NUM_EXTENSIONS 0x821D
+                    #  endif
                     GLint numExt;
                     glGetIntegerv( GL_NUM_EXTENSIONS, &numExt );
@@ -123,4 +124,5 @@
             }
             else
+            #endif
             {
                 // Get extensions using GL1/2 interface.
