Unified more of the 2D and 3D text setup, fixed bugs in Text3D setup

which address the problems of black 3D text and the kerning causing problems with font positioning.
This commit is contained in:
Robert Osfield
2011-01-11 11:39:31 +00:00
parent d59ac54b31
commit 74cf034404
9 changed files with 174 additions and 247 deletions

View File

@@ -93,14 +93,6 @@ void TextBase::setFont(osg::ref_ptr<Font> font)
{
if (_font==font) return;
osg::StateSet* previousFontStateSet = _font.valid() ? _font->getStateSet() : Font::getDefaultFont()->getStateSet();
osg::StateSet* newFontStateSet = font.valid() ? font->getStateSet() : Font::getDefaultFont()->getStateSet();
if (getStateSet() == previousFontStateSet)
{
setStateSet( newFontStateSet );
}
_font = font;
computeGlyphRepresentation();