Added basic wiring up of TextTechnique to 3D glyph code

This commit is contained in:
Robert Osfield
2010-09-03 15:03:42 +00:00
parent b4f3818949
commit 32db4d6a98
3 changed files with 136 additions and 5 deletions

View File

@@ -167,8 +167,16 @@ int main(int argc, char** argv)
std::string word("This is a new test.");
while (arguments.read("-w",word)) {}
osg::ref_ptr<osgText::Style> style = new osgText::Style;
float thickness = 0.0f;
while(arguments.read("--thickness",thickness)) {}
style->setThicknessRatio(thickness);
osgText::TextNode* text = new osgText::TextNode;
text->setText(word);
text->setFont(font.get());
text->setStyle(style.get());
text->setTextTechnique(new osgText::TextTechnique);
text->update();