Hello,
I'm developing an application that runs an osgProducer::Viewer window
in one thread (ViewerThread) and a FLTK window in another thread
(UIThread). I start the threads in main() with:
uiThread->start();
viewerThread->start();
viewerThread->join();
uiThread->join();
IThe FLTK window can be closed anytime and reopened from within the
Viewer window.
In the ViewerThread::run() method I setup the viewer as in most
examples and run the main loop:
...
viewer->realize(Producer::CameraGroup::ThreadPerCamera);
while (!viewer->done()) {
viewer->sync(); viewer->update(); viewer->frame();
}
viewer->sync(); viewer->cleanup_frame(); viewer->sync();
Now I want to close the Viewer window from within the FLTK window. If
I call viewerThread->viewer->setDone(true) from within this window,
the viewer hangs and the window stays open. viewerThread->isRunning()
returns false. (Same behavior, if I press the Escape key)
Does anybody know, what I need to call to close the Viewer window correctly?
And how can I reopen a Viewer window from my FLTK window.
I would be grateful to get any advices!
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/