Added osgUtil::CullVisitor::getCurentRenderGraph() and getRootRenderGraph()

methods which replace getRenderGraph(). Small changing of order of push/pop
of StateSet's in SceneView to clean things up.
This commit is contained in:
Robert Osfield
2002-05-22 12:01:12 +00:00
parent 11b8bd1fd9
commit 553db68bc4
2 changed files with 9 additions and 3 deletions

View File

@@ -185,11 +185,16 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor
_currentRenderGraph = rg;
}
inline RenderGraph* getRenderGraph()
inline RenderGraph* getRootRenderGraph()
{
return _rootRenderGraph.get();
}
inline RenderGraph* getCurrentRenderGraph()
{
return _currentRenderGraph;
}
inline void setRenderStage(RenderStage* rg)
{
_rootRenderStage = rg;

View File

@@ -358,12 +358,12 @@ void SceneView::cullStage(osg::Matrix* projection,osg::Matrix* modelview,osgUtil
// traverse the scene graph to generate the rendergraph.
_sceneData->accept(*cullVisitor);
if (_globalState.valid()) cullVisitor->popStateSet();
cullVisitor->popModelViewMatrix();
cullVisitor->popProjectionMatrix();
cullVisitor->popViewport();
if (_globalState.valid()) cullVisitor->popStateSet();
const osg::EarthSky* earthSky = cullVisitor->getEarthSky();
if (earthSky)
@@ -520,6 +520,7 @@ void SceneView::draw()
default:
{
osg::notify(osg::NOTICE)<<"Warning: stereo camera mode not implemented yet."<< std::endl;
_globalState->setAttribute(_viewport.get());
drawStage(_renderStageLeft.get());
}
break;