[osg-users] event callback after viewer is done

Riccardo Corsi riccardo.corsi at kairos3d.it
Tue Oct 6 10:03:53 PDT 2015


Hi all,

I have an event callback which needed to be called before some custom code
I call in the main application loop, something like:

while()
{
viewer.eventTraversal();  // << needed callback here

// custom code
// prepare stuff to be drawn during next frames

viewer.updateTraversal();
// ...
}

When the viewer is about to exit, the event callbacks are not called.
In my case the callback is needed instead,
not to cause a segfault to the custom code between osg calls.

The obvious solution is to place the callback directly in the main loop,
but I'd like to avoid that
(to keep it more "transparent", as it's a kind of framework to be used in
several applications).

Have you got any suggestion?
Thank you!
Ricky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151006/6e122f80/attachment-0002.htm>


More information about the osg-users mailing list