Are you using display lists? Your first try should work to change the
state, but you won't see the effects unless you dirty the display list;
simply find all the Drawables under the node and call
dirtyDisplayList(), which will recompile the display list with the new
state.
If you are changing state more than once-in-a-while, you may want to
disable display lists instead (see Drawable::setUseDisplayList());
recompiling them all the time will slow things down (and is wasteful
anyway).
--
Bryan Thrall
FlightSafety International
Bryan....@flightsafety.com
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
I'm having a similar problem and was wondering how to "simply find all the Drawables?" I thought I knew, but after looking at the header files for a while, I'm not so sure.
Thanks,
Brian
NodeVisitor is your friend, there are plenty of examples of subclasses
from NodeVisitor in the OSG distribution itself, many of which go in
seach for Drawables. src/osgUtil/Optimizer.cpp in particular has
plenty of example to choose from.
Robert.