[osg-users] how to use osgText to make sign

Pecoraro, Alexander N alexander.n.pecoraro at lmco.com
Wed Mar 11 12:21:22 PDT 2009


I was wondering if there was an easy way (i.e. some osgText function) to
make a backdrop quad that sits behind an osgText in 3d world space in
order to make something like a road sign with the word "STOP" on it. I
looked through the osgText documentation, but didn't see anything
obvious, but I thought I would ask just in case I missed something.

 

If there is not an easy way to add a background quad I was going to
combine an osgText::Text node with an osg::Billboard node that contains
a geometry node that draws a quad whose vertices are determined from the
bounding box of the osgText. I was hoping that if I used the osgText's
SCREEN axis alignment mode and the Billboard's POINT_ROT_EYE mode that
they would rotate in the same plane and that if I used the PolygonOffset
attribute on the Billboard then it would stay behind the text. Does that
sound valid?

 

Thanks.

 

Alex 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090311/9d939db0/attachment-0002.htm>


More information about the osg-users mailing list