Hi Robert,

>>  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 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.

If I understand correctly you opt for default NULL inheritance mask. Right ? 
I agree that this should solve this particular issue. Don't know how this 
would affect other cull settings, though.

[...]
> I'm open to this approach, but having the two decoupled is cleaner
> interface wise.
[...]
> 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.

I think I understand your motives. Do you want me to add this second line 
and send a fix for osgShadow::ShadowMap ? I may try to update PSSM and SSM 
as well but I won't guarantee I will be able to fully test them.

Cheers,
Wojtek

PS. For the reference I attached a list of remaining files from search for 
"setComputeNearFarMode" below (removed PSSM, SSM, SM .and files with 
commented setComputeNearFarMode cases). They may require similar tweaks 
before you change default inheritance mask.

OpenSceneGraph\src\osgSim\OverlayNode.cpp(973):
overlayData._camera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

OpenSceneGraph\examples\osgdepthpartition\DepthPartitionNode.cpp(219):
camera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

OpenSceneGraph\examples\osgdepthpeeling\osgdepthpeeling.cpp(247):
viewer.getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

OpenSceneGraph\examples\osgfadetext\osgfadetext.cpp(129):
viewer.getCamera()->setComputeNearFarMode(osg::CullSettings::COMPUTE_NEAR_FAR_USING_PRIMITIVES);

OpenSceneGraph\examples\osgsimulation\osgsimulation.cpp(224):
viewer.getCamera()->setComputeNearFarMode(osg::CullSettings::COMPUTE_NEAR_FAR_USING_PRIMITIVES);

OpenSceneGraph\examples\osgslice\osgslice.cpp(162):
sceneView->setComputeNearFarMode(osgUtil::CullVisitor::DO_NOT_COMPUTE_NEAR_FAR);
 

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to