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."
This commit is contained in:
Robert Osfield
2007-04-16 19:40:36 +00:00
parent 835e315494
commit 4637b78bd1

View File

@@ -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;