From 4637b78bd1b774b60a238a4aac9449412a80960c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 16 Apr 2007 19:40:36 +0000 Subject: [PATCH] From Jason Howlett, using suggestion from Robert Osfield, "CullVisitor.cpp was modified, beginning at line 1115. Code was added to check if the camera inherits its cull mask. If not, the CullVisitor sets its traversal mask to the camera's cull mask." --- src/osgUtil/CullVisitor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index ff44faa6c..2ea7caf43 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -1112,6 +1112,14 @@ void CullVisitor::apply(osg::Camera& camera) // activate all active cull settings from this Camera inheritCullSettings(camera); + bool hasSetCullMask = + (camera.getInheritanceMask() & osg::CullSettings::CULL_MASK) == 0; + + if (hasSetCullMask) + { + setTraversalMask(camera.getCullMask()); + } + RefMatrix& originalModelView = *getModelViewMatrix(); osg::RefMatrix* projection = 0;