Hi Wojciech, On Tue, Mar 18, 2008 at 12:13 PM, Wojciech Lewandowski <[EMAIL PROTECTED]> wrote: > In other words from now when we want a fixed projection matrix we need to > make two calls: > > camera->setComputeNearFarMode( osg::Camera::DO_NOT_COMPUTE_NEAR_FAR ); > > camera->setInheritanceMask( camera->getInheritanceMask() & > ~osg::Camera::COMPUTE_NEAR_FAR_MODE );
If we don't change the default setting then this is true. > This sounds like backward compatibility problems. I suspect there is a > number of examples and users code that call setComputeNearFar method only. > > Maybe Camera::setComputeNearFarMode() method could also change inheritance > mask ? > > Or maybe adding additional default adjustInheritanceMask = true parameter > could be added to > setComputeNearFarMode to keep actual inheritance policy and not break > compatibility ie: > > osg::Camera::setComputeNearFarMode( ComputeNearFarMode cnfm, > adjustInheritanceMask = true ); ? I'm open to this approach, but having the two decoupled is cleaner interface wise. This is a general problem with inheritance of properties, if we set the value then it would imply that its important that we retain this value and to not inherit it, this in turn would suggest that we should have the inheritance mask set off by default. Items like back ground colour is certainly something that can be useful to inherit, but... perhaps if the coder wants this then its fair enough to actually require them to set it. Clearly wel need to have a good think about inheritance of settings in viewer and scene graph Cameras, and SceneView which also uses CullSettings behind the scenes in osgViewer. Right now I think the thing to do is apply the fix to osgShadow, then move on to a wider review of inheritance of CullSettings. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org