Subject: Re: [osg-users] Modifying Scene Graph in viewing loop...

HI Stephen,

Modifying the scene graph between viewer.sync() and viewer.frame() is the appropriate thing to do. As to what might be the cause of the problem I
have can't say with so little to go on.

Robert.

Hi Robert,

Thanks.. I solved the issue..

What it appears I did not realize was that when I am removing a node from my tree (hoping to reference it later) it is actually getting destroyed. I did not realize that removeChild actually cleans up all parts of the 'removed Child' from memory.

Is this really the case? Or could it be something to do with the way I am initializing them? I am afraid I am very naughty and use lots of 'news' and pointers, and don't use the automatic pointers that *all* of your docs tell us we should use (if we are being good)! However, I can't see that that would make much difference to this particular issue though. :-)

I have worked around the problem for now using Switches for the objects which can always be in memory, so they are always part of the scene graph... And for the large items I am destroying them and then re-creating them. Surely there is a more elegant solution than that. Am I missing something?

Thanks.

Kind regards,
Stephen.





_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to