diff --git a/simgear/scene/model/SGText.cxx b/simgear/scene/model/SGText.cxx index 21fc0c8f..0f3c705c 100644 --- a/simgear/scene/model/SGText.cxx +++ b/simgear/scene/model/SGText.cxx @@ -27,6 +27,9 @@ #include #include #include +#include +#include +#include #include #include @@ -92,9 +95,16 @@ osg::Node * SGText::appendText(const SGPropertyNode* configNode, SGConstPropertyNode_ptr p; osgText::Text * text = new osgText::Text(); - osg::Geode * g = new osg::Geode; + simgear::EffectGeode * g = new simgear::EffectGeode; g->addDrawable( text ); + SGPropertyNode_ptr effectProp = new SGPropertyNode; + makeChild(effectProp, "inherits-from")->setStringValue("Effects/text-default"); + simgear::Effect* effect = simgear::makeEffect( + effectProp, true, dynamic_cast(options)); + if (effect) + g->setEffect(effect); + SGPath path("Fonts" ); path.append( configNode->getStringValue( "font", "Helvetica" )); text->setFont( path.utf8Str() );