Added support for AbortRendering flag pointer in osg::State which is used

by osgUtil::RenderLeaf to test if any abort state has been set, if so it
doesn't do any further drawing.

The osgProducer::Viewer has been set up to set the osg::State's it manages
with their AbortRendering flag pointers set to the osgProducer::Viewer::_done
memeber varaible.  Now when escape is pressed the rendering is aborted early.
This commit is contained in:
Robert Osfield
2003-03-11 15:25:49 +00:00
parent 78de76f17f
commit e51c7f1587
5 changed files with 29 additions and 2 deletions

View File

@@ -187,6 +187,12 @@ void Viewer::realize( ThreadingModel thread_model)
OsgCameraGroup::realize( thread_model );
// set up osg::State objects with a the _done prt to allow early termination of
// draw traversal.
for(SceneHandlerList::iterator p=_shvec.begin(); p!=_shvec.end(); p++ )
{
(*p)->getState()->setAbortRenderingPtr(&_done);
}
}