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:
@@ -18,6 +18,12 @@ using namespace osgUtil;
|
||||
|
||||
void RenderLeaf::render(State& state,RenderLeaf* previous)
|
||||
{
|
||||
// don't draw this leaf if the abort rendering flag has been set.
|
||||
if (state.getAbortRendering())
|
||||
{
|
||||
//cout << "early abort"<<endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (previous)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user