Cleaned up the handling of the Viewport with osg::SceneView/RenderStage
and CullVisitor so that the Viewport is now managed as part as the global stateset so that it can be pushed and popped like the rest of state without problems. This makes it easier to have multiple viewports within one scene graph.
This commit is contained in:
@@ -43,6 +43,7 @@ void RenderStage::addToDependencyList(RenderStage* rs)
|
||||
{
|
||||
if (rs) _dependencyList.push_back(rs);
|
||||
}
|
||||
|
||||
void RenderStage::draw(osg::State& state,RenderLeaf*& previous)
|
||||
{
|
||||
if (_stageDrawnThisFrame) return;
|
||||
@@ -63,9 +64,7 @@ void RenderStage::draw(osg::State& state,RenderLeaf*& previous)
|
||||
}
|
||||
|
||||
// set up the back buffer.
|
||||
|
||||
//state.applyAttribute(_viewport.get());
|
||||
_viewport->apply(state);
|
||||
state.applyAttribute(_viewport.get());
|
||||
|
||||
#define USE_SISSOR_TEST
|
||||
#ifdef USE_SISSOR_TEST
|
||||
|
||||
Reference in New Issue
Block a user