From 270a9fc47e8d6df43f767f33410b4cad13a0dd3c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 Oct 2010 18:53:16 +0000 Subject: [PATCH] Tempory fix for regression due to remove of glPushAttrib/glPopAttrib --- src/osgText/Text.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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