diff --git a/src/osg/State.cpp b/src/osg/State.cpp index 9fd21148f..37a14fa71 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -812,14 +812,15 @@ void State::initializeExtensionProcs() setGLExtensionFuncPtr(_glDrawArraysInstanced, "glDrawArraysInstanced","glDrawArraysInstancedARB","glDrawArraysInstancedEXT"); setGLExtensionFuncPtr(_glDrawElementsInstanced, "glDrawElementsInstanced","glDrawElementsInstancedARB","glDrawElementsInstancedEXT"); - if ( osg::getGLVersionNumber() >= 2.0 || osg::isGLExtensionSupported(_contextID,"GL_ARB_vertex_shader") ) + if ( osg::getGLVersionNumber() >= 2.0 || osg::isGLExtensionSupported(_contextID,"GL_ARB_vertex_shader") || OSG_GLES2_FEATURES) { glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,&_glMaxTextureUnits); glGetIntegerv(GL_MAX_TEXTURE_COORDS,&_glMaxTextureCoords); } else if ( osg::getGLVersionNumber() >= 1.3 || osg::isGLExtensionSupported(_contextID,"GL_ARB_multitexture") || - osg::isGLExtensionSupported(_contextID,"GL_EXT_multitexture") ) + osg::isGLExtensionSupported(_contextID,"GL_EXT_multitexture") || + OSG_GLES1_FEATURES) { GLint maxTextureUnits; glGetIntegerv(GL_MAX_TEXTURE_UNITS,&maxTextureUnits);