Hello Garry,
Garry Hoberg wrote:
> Solved! Thanks!
happy to hear that :)
> I had bracketed the changes in begin/endEditCP() but used
> TransformPtr::dcast(root->getChild(RINGE)) as the begin/endEditCP() parameter
> instead of TransformPtr::dcast(root->getChild(RINGE)->getCore()) ...
> Wouldn't have found it without that bracketing hint. I feel stupid now.
>
> Anyway, I didn't know begin/endEditCP() was important in applications that
> are
> not multithreading/clustering.
in single threaded apps you can get away with leaving out some (probably
most) of them, *but* some are quite important as the endEditCP call also
calls the FieldContainer::changed virtual function which makes sure that
values derived from modified fields are updated. Perhaps most
importantly it invalidates bounding volumes when for example the graph
changes.
We therefore highly recommend to cleanly bracket all changes (or switch
to 2.x which does away with the beginEdit/endEdit stuff [1]) ;)
regards,
Carsten
[1] it still needs to be told when derived data can/should be updated -
you call the global commitChanges function for that - so endEditCP is
still there in disguise, but it need not be called as often.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users