[osg-users] Removing objects with shared GL state from scene graph
Robert Osfield
robert.osfield at gmail.com
Thu May 16 01:01:32 PDT 2019
On Thu, 16 May 2019 at 00:07, Chris Djali <krizdjali at gmail.com> wrote:
> It looks like this has fallen off the radar again as it's been a month. I'd still rather fix this in a robust way rather than making a guess as to the most sensible approach and creating maintenance problems down the line.
Sorry, I've been submerged in VSG work.
Just now I had a quick scan of your test program but haven't compiled
and run it. My first though is the global World object holds a
ref_ptr<> to the scene graph and there is no mechanism for deleting
this global prior to the viewer cleans up so in essence it's prevent
that scene graph from being deleted and cleaned up. After the exit of
the main frame loop you could explicitly delete this object. Another
approach would be to make this World object a custom Group node in the
scene graph that adds the high level behaviors you want and with it
ensure that you can override any releaseGLObjects() etc on any locally
cached objects that would otherwise be hidden from the OSG's attempts
at cleaning things up.
Robert.
More information about the osg-users
mailing list