Hi Laurens, the new changes fix the problem and are nice and clean, and self contained, thanks for extra effort on this one, Cheers, Robert.
On 28 January 2013 10:27, Laurens Voerman <[email protected]> wrote: > > On 1/25/2013 6:20 PM, Robert Osfield wrote: >> >> Hi Laurens, >> >> On 25 January 2013 16:57, Laurens Voerman <[email protected]> wrote: >>> >>> Hi Robbert, >>> the _resultmask is now inherited from an unrelated node, and not set to >>> _maskStack.back() like it would be if osg::Polytope::contains(const >>> osg::BoundingSphere& bs) would do if culling was enabled. >> >> OK, this makes it a bit clearer. >> >> Could the problem stem from the fact that Polytop::popCullingMask() >> doesn't set the _resultsMask, instead deferring to the next >> isCulled(BoundingSphere&)? >> >> Or perhaps just change CullStack::isCulling(Node&) so that it does >> something like: >> >> if (node.isCullingActive()) return >> getCurrentCullingSet().isCulled(node.getBound()); >> else getCurrentCullingSet().resetCullingMask(); // where >> resetCullingMask() needs to be implemented to the _resultMask = >> _maskStack.back(); >> >> I'm more inclined to think that popCullingMask might be the most >> appropriate place to do a _resultMask = _maskStack.back(); as this >> would keep it's state more self consistent. >> >> Robert. > > Hi Robbert, > sorry for the delay, I needed to read the code to check your suggestions. I > don't think your last suggestion works with current code, because > popCurrentMask() is not called after the _resultMask is changed in > isCulled(node) if the result is true, nor when isCulled is called from > "CullVisitor::apply(Geode& node)" and CullVisitor::apply(Billboard& node). > > I have implemented and tested (on windows only) your suggestion for > resetCullingMask(), it's far less intrusive than my previous submission. > attached are the changes to current svn (28 Jan 2013 / rev :13312). > > changed files: > include/osg/CullingSet > include/osg/CullStack > > Laurens. > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
