You've really got two questions here.
Forst: Why are the two examples different? The answer: it's probably a mistake.
If they are both doing effectively the same thing, they should probably both set
data variance the same way.
The other question: What is the appropriate way to set data variance, or when
does it need to be set to DYNAMIC? Answer: I wanted to keep the Quick Start
Guide short. Rather than go into the lengthy explanation, I recommended setting
data variance to DYNAMIC for anything your app intends to change. This is the
safe, conservative approach. As you learn more about OSG, you'll learn when
DYNAMIC data variance is strictly required and when it is not. If you need that
information right now, I'd suggest searching any of the osg-users archive sites
for "data variance" or "DataVariance", as this topic has been discussed
extensively in the past.
-Paul
On 5/25/2012 2:42 PM, Dan Nash wrote:
Hello All,
New to OSG and just finished reading the OSG Quick Start guide. I wanted to
make sure I understood when it is necessary to set the data variance of a Node
to DYNAMIC. The OSG Quick Start Callback example set the rotation
MatrixTransform node to DYNAMIC since it would be modifying the transform in
each update callback and that made perfect sense.
However, the Picking example does not do this, even though it is essentially
performing the same thing though with user interaction involved. It's still
modifying one of the MatrixTransform nodes as the Callback example did, but the
node's data variance was specifically set to STATIC when it was created. I
thought maybe the data variance value would be changed to DYNAMIC after it was
determine that it had been selected, but that doesn't appear to be the case.
So, my question is, why aren't the rotation MatrixTransform nodes in the
Picking example set to DYNAMIC like the one MatrixTransform node in the
Callback example was? Wouldn't that leave the possibility of updating the
scene graph during the cull and/or draw phases?
Thank you!
Cheers,
Dan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=47868#47868
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org