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