[osg-users] Removing objects with shared GL state from scene graph

Chris Djali krizdjali at gmail.com
Sun Jun 30 09:00:55 PDT 2019


Hi,

I still think you're completely missing my point because of a criticism of my example code. For now, ignore the symptoms that brought me here. Just consider your bog-standard single-viewer situation.

If a text node is added to the scene graph and stays attached for the whole lifetime of the viewer, everything is fine.

If two text nodes are added to the scene graph and stay attached for the whole lifetime of the viewer, everything is fine.

If a text node is added to the scene graph and is removed before the viewer is destroyed, you can either not release GL objects, and have a bunch of things leak, or release them, and have everything be fine.

If you have two text nodes in the scene graph, and one is removed before the viewer is destroyed, you can either not release GL objects, and have some things leak (and some get cleaned up), or release them, and break the still-attached node.


Are you seriously telling me that OpenSceneGraph provides no mechanism to safely remove nodes that at one point were attached to the scene graph and this is intentional? If so, it's misleading to even have functions like osg::Group::removeChild as they're providing unsupported behaviour. I'd be very surprised if this is actually what you're saying.

Cheers,
Chris

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=76343#76343







More information about the osg-users mailing list