Skip to content

Commit a1c8a3e

Browse files
emminizerrobertosfield
authored andcommitted
Text only applies GL_TEXTURE_2D modes when fixed function is available. Prevents GL3 Core Profile console spam.
1 parent 202d893 commit a1c8a3e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/osgText/Text.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,9 @@ void Text::drawImplementationSinglePass(osg::State& state, const osg::Vec4& colo
11061106

11071107
if ((_drawMode&(~TEXT))!=0 && !_decorationPrimitives.empty())
11081108
{
1109+
#if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE)
11091110
state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OFF);
1111+
#endif
11101112
vas->disableColorArray(state);
11111113
for(Primitives::const_iterator itr = _decorationPrimitives.begin();
11121114
itr != _decorationPrimitives.end();
@@ -1117,7 +1119,9 @@ void Text::drawImplementationSinglePass(osg::State& state, const osg::Vec4& colo
11171119

11181120
(*itr)->draw(state, usingVertexBufferObjects);
11191121
}
1122+
#if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE)
11201123
state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::ON);
1124+
#endif
11211125
}
11221126

11231127
if (_drawMode & TEXT)

0 commit comments

Comments
 (0)