From 1364329fc8fcfb6f7883cea5ffd54fd28aea1c2a Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 31 Jul 2013 06:43:46 +0000 Subject: [PATCH] From Sergey Kurdakov, merged from svn/trunk fix for GLES2 runtime invalid enumerant warning. --- src/osg/State.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osg/State.cpp b/src/osg/State.cpp index 56c84c0e5..a14bee877 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -911,7 +911,10 @@ void State::initializeExtensionProcs() 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); + if(OSG_GLES2_FEATURES) + _glMaxTextureCoords = _glMaxTextureUnits; + else + glGetIntegerv(GL_MAX_TEXTURE_COORDS,&_glMaxTextureCoords); } else if ( osg::getGLVersionNumber() >= 1.3 || osg::isGLExtensionSupported(_contextID,"GL_ARB_multitexture") ||