Canvas troubleshooting: Difference between revisions

Jump to navigation Jump to search
m
→‎Using Osg::Optimizer for complex Canvases: https://www.mail-archive.com/osg-users%40lists.openscenegraph.org/msg23909.html
m (→‎Using Osg::Optimizer for complex Canvases: https://www.mail-archive.com/osg-users%40lists.openscenegraph.org/msg23909.html)
Line 510: Line 510:
<syntaxhighlight lang="diff">
<syntaxhighlight lang="diff">
</syntaxhighlight>
</syntaxhighlight>
=== Exposing setDataVariance() for finalized elements ===
Calling setDataVariance() is only required for Drawables and StateSet's, changes to Nodes don't make it into the draw traversal so aren't affected by the
requirement to set the DataVariance to DYNAMIC that the DrawThreadPerContext threading model requires.
The DataVariance is used during the draw traversal to monitor when all DYNAMIC StateSet and Drawables have been dispatched, as once they have been the next frame can be started in a parallel with the remaining STATIC objects are rendered (in DrawThreadPerContex, CullThreadPerCameraDrawThreadPerContext threading models.)
Nodes do not need to be set to DYNAMIC for the purposes of update, event, cull and draw traveresals.  The only part of the OSG that checks the DataVariance of Nodes is the osgUtil::Optimizer.
If you plan using the osgUtil::Optimizer on your data then the DataVaraince value is used as a hint about what can safely be optimized and what can't be, for instance a DYNAMIC transform node can't be optimized away.  This is unlikely to be an issue for in frame updates.


=== Tracking update frequency per Canvas/Element ===
=== Tracking update frequency per Canvas/Element ===

Navigation menu