<div dir="ltr"><div><div>Hi Bjorn,<br><br></div>I can't think of any callback or similar class similar to the RealizeOperation().  It would be straight forward to add but this would only help things for a future rev of the OSG.<br><br></div><div>Perhaps you might be able to use a osg::Camera::FinalDrawCallback that is only enabled on the last frame(), but this would need one to signal that it's that last frame...<br><br></div><div>Failing these approaches you could build the viewer so once you exit the frame loop you stop threading, make the context in question current and then call what you need to do and then let the viewer destruct all the contexts.<br></div><div><br></div>Robert.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 August 2015 at 10:21, Björn Blissing <span dir="ltr"><<a href="mailto:bjorn.blissing@vti.se" target="_blank">bjorn.blissing@vti.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
More odd questions connected to my Oculus integration.<br>
<br>
Is there a simple way to detect when the osg::viewer is ordered to close? I need to execute some Oculus related code before the OpenGL context is closed. So what I am looking for is some form of opposite of viewerBase.setRealizeOperation() function.<br>
<br>
My first idea was to subclass the osg::GraphicContext class and run my own custom destructor before the default constructor. But that idea is a no go, because the OS dependent windowing APIs are already implemented as subclasses to osg::GraphicContext.<br>
<br>
Best regards<br>
Björn<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=64814#64814" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=64814#64814</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div><br></div>