From 6915bce1a230ecff94c919093066a81e0be184ff Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 24 Jul 2008 12:18:49 +0000 Subject: [PATCH] Added a getCurrentRenderStage() and getCurrentCamera() convninience methods, and converted the CullVisitor::apply(OcclusionQueryNode&) implementation to use the new getCurrentCamera method. --- src/osgUtil/CullVisitor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index c6664f43b..8d5fcc7d5 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -1461,7 +1461,8 @@ void CullVisitor::apply(osg::OcclusionQueryNode& node) 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 (node.getPassed( camera, getDistanceToEyePoint( node.getBound()._center, false ) )) handle_cull_callbacks_and_traverse(node);