J-S,

On 5/4/2010 12:34 PM, Jean-Sébastien Guay wrote:
> If you want to toggle visibility of all your text elements under a
> same Geode, you can use the node mask on the Geode.
My problem is that I have mixed my text elements with other geometry
elements (the labels are part of the thing they are labelling). So that
rules out using the node mask.

> ... you could use a Drawable::DrawCallback attached to each text
> element to decide if you want to draw the text or not (call the
> drawable's drawImplementation() or not). You could also subclass
> osgText::Text and override its drawImplementation() method to simply
> exit if some boolean attribute is false (like _visible).

Subclassing osgText::Text doesn't feel quite right. I think I'm going to
go with a custom callback.

Thanks so much for your help.

cory
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to