Hi Mike,

The only objects that you need to delete from a specific place are the
OpenGL objects, and these are cached and then flushed at the
appropriate point by an explicit call to the flush* static functions
(or just SceneView::flushAllDeletedGLObjects()).

The rest of OSG objects are almost all managed through
osg::Referenced, and it allows you to use a custom osg::DeleteHandler
to capture and manage the final delete operations. osgViewer::Viewer
now uses a DeleteHandler to control when actual deletes happen, to
prevent the DrawThreadPerContext,
CullThreadPerCameraDrawThreadPerContext threading modes for having
problems with dangling pointers.

My guess is that you might be able to use a custom DeleteHandler to
tightly control deletion of scene graph objects.

Robert.

On 4/10/07, Mike Wittman <[EMAIL PROTECTED]> wrote:




Hi Robert,



Can you provide guidance on which OSG class objects need to be deleted from
the render thread, vs. which can be deleted from any thread?  In C# the
garbage collector can run on an arbitrary thread, so I need to ensure it
isn't deleting anybody incorrectly.




Mike Wittman

[EMAIL PROTECTED]

___________________________________________________

Seismic Micro-Technology, Inc.

8584 Katy Freeway, Suite 400 / Houston, Texas 77024

Tel.  +1 (713) 464-6188

Fax. +1 (713) 464-6440

Web:  www.seismicmicro.com

___________________________________________________

Seismic through Simulation with KINGDOM, (RC)2, and SURE! - CONTACT US TODAY
for more information.




_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to