Jean-Sébastien Guay wrote:
> From scratch, I couldn't find another cull callback that did things
> before and after the traverse() in the examples... Any suggestions?

  I dug back into my e-mail archives and found a message from Robert on 
10/7/2003 that I
used as my inspiration:

There isn't at present a away to disable the computation of the near far for a
subgraph via settings on Node's.  However, what you might be able to try
would be to disable the near far computation via a NodeCallback attached to
the skydome subgraph.  Something like

struct MyCullCallback : public osg::NodeCallback
         virtual void operator()(Node* node, NodeVisitor* nv)
                osgUtil::CullVisitor* cv = 
                osgUtil::CullVisitor::ComputeNearFarMode saveComputeNearFar;
                if (cv)
                        saveComputeNearFar = cv->getComputeNearFarMode()


                if (cv)
                        saveComputeNearFar = cv->getComputeNearFarMode()

  Now, there's some missing semicolons there, but those are easy to fix. Oddly 
though, it
looks like he's recommending switching to 
think it should be DO_NOT_COMPUTE_NEAR_FAR. Also, the lower saveComputeNearFar =
cv->getComputeNearFarMode() should not be there. But, I think this demonstrates 
you're on
the right track, and maybe just need to debug what's really happening at 

> J-S

Chris 'Xenon' Hanson, omo sanza lettere                  Xenon
PixelSense Landsat processing now available!
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
osg-users mailing list

Reply via email to