Hi all, I have a wireframe grid defined in 3-space that I want to put some labels on. I was able to get the result I wanted using osgText by using the code below where 'vert' is a world space vertex from the grid.
Code: osgText::Text* text = new osgText::Text; text->setFont(font.get()); text->setCharacterSizeMode(osgText::Text::SCREEN_COORDS); text->setCharacterSize( 48.0 ); text->setDrawMode(osgText::Text::TEXT); text->setAxisAlignment(osgText::Text::SCREEN); text->setLayout(osgText::Text::RIGHT_TO_LEFT); text->setText(osgText::String("العربية", osgText::String::ENCODING_UTF8)); text->setPosition( vert ); The only reason I can't stick with osgText is the arabic characters do not render properly (the characters should be connected and they are not). This is a hard requirement for us so I presumably need osgPango. However, osgPango doesn't really seem to have parity with text placement and I wonder if it supports text in world space at all. I've tried the following code and just get extruded garbage on the screen (vert is the same world space coordinate as in the previous snippet). Code: osgPango::TextTransform* t = new osgPango::TextTransform(); t->setMatrix( osg::Matrixd::translate(vert) ); t->addText( "<span font='DejaVu Sans Mono 14' foreground='#7FFF7F'>Test<span>",0,0 ); t->finalize(); I have used osgPango in screen space successfully for other purposes. Anyone know if osgPango can work in world coords and if so how? Cheers, Trystan[/code] ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49230#49230 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org