Hi Bjorn,

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.

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...

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.

Robert.

On 18 August 2015 at 10:21, Björn Blissing <[email protected]> wrote:

> Hi,
>
> More odd questions connected to my Oculus integration.
>
> 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.
>
> 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.
>
> Best regards
> Björn
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=64814#64814
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to