From b4155dd81725a9b2d21a11b2a47f1f91c424e476 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 23 Feb 2012 17:51:40 +0000 Subject: [PATCH] Moved the state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::ON); into the #if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) block to solve problems under GLES and GL3.x/GL4.x --- src/osgText/Text.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index 60eb5c740..e9bb820e8 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -1211,12 +1211,8 @@ void Text::drawImplementation(osg::State& state, const osg::Vec4& colorMultiplie unsigned int contextID = state.getContextID(); state.applyMode(GL_BLEND,true); -#if 1 - state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::ON); -#else - state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OFF); -#endif #if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) + state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::ON); state.applyTextureAttribute(0,getActiveFont()->getTexEnv()); #endif if (_characterSizeMode!=OBJECT_COORDS || _autoRotateToScreen) @@ -1350,12 +1346,8 @@ void Text::drawImplementation(osg::State& state, const osg::Vec4& colorMultiplie } } -#if 1 - state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::ON); -#else - state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OFF); -#endif #if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) + state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::ON); state.applyTextureAttribute(0,getActiveFont()->getTexEnv()); #endif