From Colin MacDonald, fixed handling of an adding a graphics context after the creating of the osgText::Text.

This commit is contained in:
Robert Osfield
2006-05-01 16:20:26 +00:00
parent ffb4c79132
commit 2792c6c2fb

View File

@@ -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());