Robert, On Tuesday 04 March 2008 14:07, Robert Osfield wrote: > Could you back out a little and explain what you think is going on > right now, and what you think should be happening and why, I'm afraid > my brain doesn't work well with just a diff output. Well sorry, I thought you know your own CullVisitor by heart :)
Take a simpe scenegraph. Camera(name=Parent) |- Camera(name=Child) The child camera has a inheritance mask of say COMPUTE_NEAR_FAR_MODE. When culling is done, the cull visitor's default inheritance mask is set to all. when the Parent Camera is entered, this does not change and all cull settings from the parent camera are copied into the cull visitor. Then when the cull visitor enters the child camera, the same happens with the child cameras cull settings. Note that this is independent of the inheritance mask in the child camera. But I would either expect that this mask in the child camera masks out the setting that are inherited from the parent camera or masks them in. That is: I would expect that the cull visitor should leave those settings in the cull visitor untouched where the bits in the mask are set (= inherit them from the parent cameras settings) and should take this settings from the child camera where the bits are unset. But the current implementation just uses all settings from the child camera because of the default setting ot the inheritance mask in the cull visitor that is never changed. Ok, this shows that the change should then read (note the bitwise not): Index: OpenSceneGraph/src/osgUtil/CullVisitor.cpp =================================================================== --- OpenSceneGraph/src/osgUtil/CullVisitor.cpp (revision 7906) +++ OpenSceneGraph/src/osgUtil/CullVisitor.cpp (working copy) @@ -1156,7 +1156,7 @@ CullSettings saved_cull_settings(*this); // activate all active cull settings from this Camera - inheritCullSettings(camera); + inheritCullSettings(camera, ~camera.getInheritanceMask()); // set the cull mask. unsigned int savedTraversalMask = getTraversalMask(); Am I missing something? Gretings Mahias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org