[osg-users] Bug in Cull Visitor

Robert Osfield robert.osfield at gmail.com
Mon May 14 01:05:25 PDT 2018

On 13 May 2018 at 18:48, Robert Osfield <robert.osfield at gmail.com> wrote:
> On 13 May 2018 at 17:01, Gedalia Pasternak <gpasternak at mak.com> wrote:
>> Does that mean it’s used incorrectly in
>> OcclusionQueryNode::getPassed()? That was what I was basing my understanding
>> on.
> I'm not the author of OcclisionQueyNode so I have to look it up,
> jikes, yep it shouldn't be using TraversalNumber, it should be using
> nv->getFrameStamp()->getFrameNumber().
> I we amend the code and get it checked in, but it'll have to wait a
> little longer as it's dinner time!! :-)

I have done another review the CullVisitor and OcclusionQueryNode and
the use of FrameNumber,  The OSG's rendering backend does
automatically assign the FrameStampe::getFrameNumber() to the
CullVisitor::setTraversalNumber() so it "should" be safe for it to use
the NodeVisitor::getTraveralNumber() in place of

However, looking that the code in CullVisitor that increments the
_traversalNumber value, this is mis-using that value for a traversal
order number which isn't the same thing as traversal number.  I've
amended the CullVisitor and RenderLeaf/RenderBin so that they now use
_traversalOrderNumber.  This is checked into 3.6 branch and master.

I also checked in a small tweak to the precision of the some of the
local variables in OcclusionQueryNode.


More information about the osg-users mailing list