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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user