From 2792c6c2fb6b5081bb13ee40056c4083a1e6d8a2 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 1 May 2006 16:20:26 +0000 Subject: [PATCH] From Colin MacDonald, fixed handling of an adding a graphics context after the creating of the osgText::Text. --- src/osgText/Text.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index 85533b5b7..909a64b0f 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -905,6 +905,19 @@ void Text::drawImplementation(osg::State& state) const } } + + + // Ensure that the glyph coordinates have been transformed for + // this context id. + + if ( !_textureGlyphQuadMap.empty() ) + { + const GlyphQuads& glyphquad = (_textureGlyphQuadMap.begin())->second; + if ( glyphquad._transformedCoords[contextID].empty() ) + { + computePositions(contextID); + } + } glNormal3fv(_normal.ptr());