<div dir="ltr"><div dir="ltr">Hi Chris,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 26 Jul 2019 at 17:46, Chris Djali <<a href="mailto:krizdjali@gmail.com">krizdjali@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This does solve the problem. Is it definitely safe it do this, though? What if the camera references stuff still shared by another context (e.g. RTT cameras that get added to and removed from an existing context)? I don't imagine you want to add a regression while fixing this.<br></blockquote><div><br></div><div>O bugger, good point, yep lucky it didn't make it into 3.6.4 :-)</div><div><br></div><div>This issue is like juggling with a dozen different ball, with each ball being a different usage case!</div><div><br></div><div>You can always subclass from Camera and override the destruct if you want to add this "fix" if it suits your usage case.<br></div><div><br></div><div>The approach I have taken with the VSG is for the GPU objects to hold a ref_ptr<> to the VkInstance wrapper preventing it being deleted when the objects are still in use.  It's thread safe, robust for a lots of different usage cases and straight forward.  Alas OpenGL can't be managed like this, or at least I don't think you can keep a graphics context around after a window has been deleted.  If I was to writing an OpenGL scene graph from scratch I'd probably try to resolve this topic in a more flexible way than the OSG which has evolve from narrower usage cases to more and more general usage cases as users have pushed and pulled it in various directions.<br></div><div><br></div><div>For now I'll need to focus on getting my BOF presentation written rather than bug fixing, it's end of the working here in Scotland so I'm in weekend mode too and not about to try to think too hard about anything other than chilling wit my family.<br></div><div><br></div><div>Cheers,<br></div><div>Robert.<br></div></div></div>