From 27955ae8e9953af5adf084a85bee6ad4aaab668f Mon Sep 17 00:00:00 2001 From: Daniel Emminizer Date: Fri, 4 May 2018 06:44:13 -0400 Subject: [PATCH] Text only applies GL_TEXTURE_2D modes when fixed function is available. Prevents GL3 Core Profile console spam. --- src/osgText/Text.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index 6eb9fc4ab..e7b9f42c8 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -1106,7 +1106,9 @@ void Text::drawImplementationSinglePass(osg::State& state, const osg::Vec4& colo if ((_drawMode&(~TEXT))!=0 && !_decorationPrimitives.empty()) { +#if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OFF); +#endif vas->disableColorArray(state); for(Primitives::const_iterator itr = _decorationPrimitives.begin(); itr != _decorationPrimitives.end(); @@ -1117,7 +1119,9 @@ void Text::drawImplementationSinglePass(osg::State& state, const osg::Vec4& colo (*itr)->draw(state, usingVertexBufferObjects); } +#if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::ON); +#endif } if (_drawMode & TEXT)