Hi Nectarios,
On Fri, Mar 4, 2011 at 3:21 PM, Nectarios Pelekanos
> Does anyone know how can i set the display list false globally?
There is no global settings for display lists, you just have to set
each Drawable separately. It's easy to write a visitor that finds
the Geodes and then sets the Drawable settings. i.e
class DisableDisplayListsVisitor : public osg::NodeVisitor
{
public:
DisableDisplayListsVisitor():
osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
void apply(osg::Geode& geode)
{
for(unsigned int i=0; i<geode.getNumDrawables(); ++i)
{
geode.getDrawable(i)->setUseDisplayList(false);
}
}
};
// then to run it..
DisableDisplayListVisitor ddlv;
node->accept(ddlv);
You can customize this visitor to switch on VBO's etc.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org