I do this in osgWidget by making my WindowManager derive from
osg::Switch, which provides setAllChildren{On/Off}. Plus, each
osgWidget::Window object provides show()/hide() methods, which just
communicate with parent WindowManager and ask it to hide/show
themselves.What you should do though it just see if osgWidget can do some of what you want, bug me to fix what it doesn't, and in the end help it get better for submission to OSG. *grin* I only mention this because you said "any good solution appreciated." :) On Wed, 2008-03-12 at 23:46 +0530, Night Hawk wrote: > Hello all, > > I am displaying the nodes under mouse on a HUD (based on the Pick Example). > > I am trying to turn this display on/off based on if user presses some > key. However, I am having trouble implementing this. In my main GUI > thread, user presses the key and I try to turn off the display (by > setting a variable and cleaning up the text). But in the background > the pick procedure is still running and it is sometimes causing thread > sync problems for the variable and the Text box. > > I am looking for more elegant way of doing this. My Display HUD is > directly under the root (just as in the example). Is there a way I can > turn off its visibility or make it "non-renderable"? > > One way is I can remove and add the display HUD every time the key is > pressed. But in that case we need to make our Root as Dynamic. I am > not sure if that would be good approach. Is there no simple way, > something like HUD->SetRenderable(false) ?? > > Or can I somehow make it "culled" ?? > > Any good solution is appreciated. > > Thank you. > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

