Refactored the way that the camera settings are inhertied

This commit is contained in:
Robert Osfield 2008-03-04 16:03:37 +00:00
parent 1d18bc7f48
commit 23bc6c2fe5

View File

@ -1155,8 +1155,16 @@ void CullVisitor::apply(osg::Camera& camera)
// Save current cull settings // Save current cull settings
CullSettings saved_cull_settings(*this); CullSettings saved_cull_settings(*this);
#if 1
// set cull settings from this Camera
setCullSettings(camera);
// inherit the settings from above
inheritCullSettings(saved_cull_settings, camera.getInheritanceMask());
#else
// activate all active cull settings from this Camera // activate all active cull settings from this Camera
inheritCullSettings(camera); inheritCullSettings(camera);
#endif
// set the cull mask. // set the cull mask.
unsigned int savedTraversalMask = getTraversalMask(); unsigned int savedTraversalMask = getTraversalMask();