Added a getCurrentRenderStage() and getCurrentCamera() convninience methods, and

converted the CullVisitor::apply(OcclusionQueryNode&) implementation to use the
new getCurrentCamera method.
This commit is contained in:
Robert Osfield 2008-07-24 12:18:49 +00:00
parent 53aad98d09
commit 6915bce1a2

View File

@ -1461,7 +1461,8 @@ void CullVisitor::apply(osg::OcclusionQueryNode& node)
if (node_state) pushStateSet(node_state); if (node_state) pushStateSet(node_state);
osg::Camera* camera = getRenderStage()->getCamera(); osg::Camera* camera = getCurrentCamera();
// If previous query indicates visible, then traverse as usual. // If previous query indicates visible, then traverse as usual.
if (node.getPassed( camera, getDistanceToEyePoint( node.getBound()._center, false ) )) if (node.getPassed( camera, getDistanceToEyePoint( node.getBound()._center, false ) ))
handle_cull_callbacks_and_traverse(node); handle_cull_callbacks_and_traverse(node);