diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index 7699c7915..6ef6a1b0f 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -1597,6 +1597,7 @@ void Text::renderOnlyForegroundText(osg::State& state, const osg::Vec4& colorMul void Text::renderWithDelayedDepthWrites(osg::State& state, const osg::Vec4& colorMultiplier) const { + //glPushAttrib( _enableDepthWrites ? (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) : GL_DEPTH_BUFFER_BIT); // Render to color buffer without writing to depth buffer. glDepthMask(GL_FALSE); drawTextWithBackdrop(state,colorMultiplier); @@ -1611,6 +1612,9 @@ void Text::renderWithDelayedDepthWrites(osg::State& state, const osg::Vec4& colo state.haveAppliedAttribute(osg::StateAttribute::DEPTH); state.haveAppliedAttribute(osg::StateAttribute::COLORMASK); + + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + //glPopAttrib(); } void Text::drawTextWithBackdrop(osg::State& state, const osg::Vec4& colorMultiplier) const