[osg-users] DataVariance questions
robert.osfield at gmail.com
Mon Nov 16 07:50:15 PST 2009
On Mon, Nov 16, 2009 at 3:42 PM, Glenn Waldron <gwaldron at gmail.com> wrote:
> Hi all, I have a questions about DataVariance in DrawThreadPerContext mode.
> I understand conceptually how it is supposed to work, but I am unclear on a
> Does setting the data variance on a Node affect the drawables/statesets in
> the render graph?
No, Nodes have no effect on the render graph as only StateSet and
Drawables make it into the rendering backend.
> When you call View::setSceneData(), it runs the StaticObjectDetectionVisitor
> to automatically compute data variance on all the drawables and statesets.
> Good. But what data that you load or page in at runtime? Do I need to run
> that visitor on dynamically loaded data?
Your data really should have the DataVariance set appropriately before
passing it back to be merged, the StaticObjectDetectionVisitor is
really just a fallback for when scenegraphs aren't set up explcitly.
> From looking at the source, it would appear that unless you run that
> Visitor, setting the data variance to DYNAMIC on a Node only affects the
> Optimizer, and has no effect on the data variance of drawables in the render
> graph. I'm going to fire up the debugger and try to test this out, but any
> insights in the meantime would be appreciated. Thanks.
This is correct, the Optimizer is the currently the only traverser
that uses the DataVariance hint on nodes.
More information about the osg-users