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:
Robert Osfield
2002-04-22 09:37:17 +00:00
parent 4b9473eda9
commit f515d67f4f
4 changed files with 21 additions and 5 deletions

View File

@@ -1041,6 +1041,8 @@ ImpostorSprite* CullVisitor::createImpostorSprite(Impostor& node)
Viewport* new_viewport = osgNew Viewport;
new_viewport->setViewport(center_x-new_s/2,center_y-new_t/2,new_s,new_t);
rtts->setViewport(new_viewport);
dummyState->setAttribute(new_viewport);
// create the impostor sprite.