HI Mo, The normal way to hide/show elements are to place the elements in separate osg::Geometry attached to separate osg::Geode, then toggle the geode on/off via a NodeMask or by using an osg::Switch as a parent.
You could go the route of add/removing primitive sets but this will be more awkward to manage and you'll have to be very careful about threading issues. Robert. On Wed, Sep 15, 2010 at 2:13 PM, Mo Flanders <[email protected]> wrote: > Hi, > > just a quick question, is it possible to hide and show geometry or primitive > sets? > In the present case I want to hide/show Linestrips. > With a NodeVisitor I can remove them, but I only want to hide and show the > LineStrips :) > > > Code: > > case GL_LINE_STRIP: > std::cerr << "detect a line_strip removing ..."<< std::endl; > geometry->removePrimitiveSet (j,numPrimitives); > > > > > > ... > > Thank you! > > Cheers, > Mo[/code] > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=31629#31629 > > > > > > _______________________________________________ > 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

