: Documentation : Code Snippets
In OpenSceneGraph, text objects are
osg::Geode* textGeode = new osg::Geode();
osgText::Text* text = new osgText::Text();
text->setFont("tahoma.ttf");
text->setCharacterSize(16.0f);
text->setPosition(osg::Vec3(4, 4, 0));
text->setAlignment(osgText::Text::LEFT_BASE_LINE);
text->setColor(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f));
text->setText("Your text here");
textGeode->addDrawable(text);