Hi there, there are another two tiny patches I want to provide. They fix two OpenGL errors (printed as OSG warnings to stdout/stderr) which appeared on my machine when using a OpenGL ES 2 build.
1. One warning was written repeatedly to the terminal (while font rendering): > Warning: detected OpenGL error 'invalid enumerant' at after > RenderBin::draw(..) 2. This warning was only printed once while initing: > Warning: detected OpenGL error 'invalid enumerant' at Before Renderer::compile Find the patches in the attachment (numbered like above). Again, any kind of comment is appreciated :) Bye, rti ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37807#37807
Index: src/osg/State.cpp =================================================================== --- src/osg/State.cpp (revision 12261) +++ src/osg/State.cpp (working copy) @@ -900,7 +900,11 @@ if ( osg::getGLVersionNumber() >= 2.0 || osg::isGLExtensionSupported(_contextID,"GL_ARB_vertex_shader") || OSG_GLES2_FEATURES) { glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,&_glMaxTextureUnits); +#ifdef OSG_GLES2_AVAILABLE + _glMaxTextureCoords = 1; +#else glGetIntegerv(GL_MAX_TEXTURE_COORDS,&_glMaxTextureCoords); +#endif } else if ( osg::getGLVersionNumber() >= 1.3 || osg::isGLExtensionSupported(_contextID,"GL_ARB_multitexture") ||
Index: src/osgText/Text.cpp =================================================================== --- src/osgText/Text.cpp (revision 12261) +++ src/osgText/Text.cpp (working copy) @@ -1209,12 +1209,12 @@ unsigned int contextID = state.getContextID(); state.applyMode(GL_BLEND,true); -#if 1 +#if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) +# if 1 state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::ON); -#else +# else state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OFF); -#endif -#if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) +# endif state.applyTextureAttribute(0,getActiveFont()->getTexEnv()); #endif if (_characterSizeMode!=OBJECT_COORDS || _autoRotateToScreen) @@ -1348,12 +1348,12 @@ } } -#if 1 +#if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) +# if 1 state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::ON); -#else +# else state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OFF); -#endif -#if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) +# endif state.applyTextureAttribute(0,getActiveFont()->getTexEnv()); #endif
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org