Hi Dan,

Daniel E. Shipton wrote:
> Is there a thorough verbose list somewhere of when commitChanges must be 
> called for OpenSG2?
> I know about http://opensg.vrsource.org/trac/wiki/Dev/Changes1To2 
> <http://opensg.vrsource.org/trac/wiki/Dev/Changes1To2> but it is not 
> very verbose.
> I am looking for something like:
> 
> OSG::commitChanges() must be called after/before:
> setX
> getY
> doZ
> ....
> ....

There is no hard and simple list (and it would be a significant pain to keep 
up-to-date if there was).

In most cases you're fine just calling commitChanges() once per frame before 
rendering (which is done automatically). However, to be safe you should call 
commitChanges after a bunch of sets before the next get.

The reason is that some derived values are updated in ::changed() processing, 
which is triggered by commitChanges(). As long as you're not accessing any of 
those you don't have to call commitChanges(). But it's hard to predict which 
ones are affected.

My rule of thumb for apps: call it after you've set up everything you need to 
set up. That way you don't have to worry about calling it before gets. For 
libs: 
  call it when you return to the app after setting things up. An empty 
commitChanges is fairly cheap, so I'd rather call it more often than necessary 
than forgot one and hunt magic bugs.

My $.02

        Dirk

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to