Thanks to excellent work by Jeremy Moles I can now render UTF-8 using osgPango. I just can't make it stop!

What is the correct way to re-use osgPango::textTransform? I'd like to be able to display a text message then remove it and at a later time display another message.

I currently use osgText for this and simply do a setText("") when I have no message to display.

With osgPango::TextTransform I can't call finalize() more than once on the same TextTransform without it seg faulting, therefore I can't change the text. Is that expected?

For another approach I tried adding/removing the text node so I could have a vector of 'pre-baked' osgPango::texts to display as I needed them but I can't remove them without leaving some garbage behind. See the attached image. How can that be when the only point of contact with my scene graph has just been removed?


I'm using OSG 2.8.0 and osgPango r46 on linux. Here are relevant snips of my code:

  osgPango::Context& pangoContext = osgPango::Context::instance();
  pangoContext.init();

  _pangoText = new osgPango::TextTransform();
  _pangoText->setPosition(osg::Vec3(400,400,0));
  _pangoText->addText(sometext,0,0);
  _pangoText->finalize();

  (osg::MatrixTransform)_modelview_abs->addChild(_pangoText);

Top image taken here

then later

  _modelview_abs->removeChild(_pangoText);

Bottom image taken here

Many thanks
Murray Curtis
Tag Systems
Melbourne
Australia

<<inline: pango.jpg>>

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to