Moved TextNode into osgText.

Cleaned up freetype plugin so it no longer does tesselation - instead Glyph and TextNode do this.
This commit is contained in:
Robert Osfield
2010-09-07 18:18:35 +00:00
parent a6abbb545e
commit 50be800787
16 changed files with 2000 additions and 968 deletions

View File

@@ -335,6 +335,14 @@ void TextTechnique::addCharacter(const osg::Vec3& position, const osg::Vec3& siz
}
else
{
osg::ref_ptr<osg::Geometry> textGeometry = osgText::computeTextGeometry(glyph, width);
if (textGeometry.valid()) geode->addDrawable(textGeometry.get());
// create the normals
if (smooth && textGeometry.valid())
{
osgUtil::SmoothingVisitor::smooth(*textGeometry, osg::DegreesToRadians(creaseAngle));
}
}
transform->addChild(geode.get());