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

Robert Osfield robert.osfield at gmail.com
Wed Jul 24 04:45:40 PDT 2019

Hi Chris,

To experiment with different approaches to doing the releaseGLObjects()
call management I have created a RegistryRelease branch of the
OpenSceneGraph that is branched off the OpenSceneGrpaph-3.6 branch.  This
branch just contains a single commit so far that wraps up:

  1) Chnage of osgText::DefaultFont to use the osgDB::ObjectCache assigned
to the osgDB::Registry::instance() rather than a local static

  2) Change of osgViewer::Renderer::releaseGLObjects(State*) so that it
calls the osgDB::Registry::instance() that will in turn
      call the osgDB::ObjectCache::releaseGLObjects(State*) which will in
      call DefaultFont::releaseGLObjects(State*)

  3) Debug console output to track the creation, destruction and calls to
releaseGLObjects() of the various players above.

I've done some testing here to confirm that the
DefaultFont::relaseGLObjects() is now being called, but I don't have you
application usage case to thoroughly hammer it. So... I really need you to
test it at your end.  If this works better then I can clean it up and get
it checked into the OpenSceneGraph-3.6 branch and master.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190724/ac6f4359/attachment.html>

More information about the osg-users mailing list