Hi Terry,

After some more searching I found that there is already a BOUNDINGBOX
draw mode in osgText::Text.  It draws an outline around the block of
text.  It looks unfinished, though, because it can only draw with
colorMultiplier as the color and it has no extra margin.  It's easy to
adapt this to draw a GL_QUAD insead of a GL_LINE_LOOP.  We could
called this mode FILLED_BOUNDINGBOX or something.  My prototype works,
but it will take me a bit longer to make it tidy.  It should probably
work with all the options for _backdropImplementation (POLYGON_OFFSET,
NO_DEPTH_BUFFER, DEPTH_RANGE, and STENCIL_BUFFER).

I don't have much knowledge of osgText besides what I learned
yesterday by looking at the code.  If anyone has any idea how this
approach should be changed or improved, I'd like to hear it before I
finish programming this.

I'm not an osgText expert either but what you say sounds good. Will you also add a way to specify the margin width? :-)

Good work,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to