[osg-users] stopping an asynchronous viewer

Robert Osfield robert.osfield at gmail.com
Thu Mar 12 01:56:48 PDT 2009


Hi Cory,

On Wed, Mar 11, 2009 at 8:24 PM, Cory Riddell <cory at codeware.com> wrote:
> If I started the viewer with the run() method (in a separate thread), is
> it sufficient to call viewer->setDone(true) to stop it? Do I have to
> call viewer->stopThreading() after calling setDone?

Setting viewer->setDone(true) should be sufficient, it should cause
the view to exit the main frame loop inside Viewer::run().  It won't
destroy any threads though, if you want to do this then you'll need to
call stopThreading.

Robert.



More information about the osg-users mailing list