Made the calls to the drawing of the pre rendering stages exclit, using

a seperate method in RenderStage and associated calls in sceneView.cpp.
This fixes problems when doing stereo and prerender at the same time.
This commit is contained in:
Robert Osfield
2002-09-19 09:52:50 +00:00
parent f6cb09c601
commit 68384e984b
4 changed files with 48 additions and 53 deletions

View File

@@ -65,6 +65,16 @@ void RenderStage::addToDependencyList(RenderStage* rs)
if (rs) _dependencyList.push_back(rs);
}
void RenderStage::drawPreRenderStages(osg::State& state,RenderLeaf*& previous)
{
for(DependencyList::iterator itr=_dependencyList.begin();
itr!=_dependencyList.end();
++itr)
{
(*itr)->draw(state,previous);
}
}
void RenderStage::draw(osg::State& state,RenderLeaf*& previous)
{
if (_stageDrawnThisFrame) return;
@@ -76,13 +86,6 @@ void RenderStage::draw(osg::State& state,RenderLeaf*& previous)
}
_stageDrawnThisFrame = true;
for(DependencyList::iterator itr=_dependencyList.begin();
itr!=_dependencyList.end();
++itr)
{
(*itr)->draw(state,previous);
}
// set up the back buffer.
state.applyAttribute(_viewport.get());