Hi All:

I am using OSG in a MFC program base on the exampleMFC project from OSG2.2 
release package. The problem is when I close the main frame window, the 
application can not be terminated, whereas the exampleMFC application can exits 
gracefully. 

When I debug, I found the osgViewer::Viewer can not be "done":

    while(!viewer->done())    //the viewer->done always return false.
    {
        osg->PreFrameUpdate();
        viewer->frame();
        osg->PostFrameUpdate();
        Sleep(10);       
    }

Would you give me some hint about how to exit the rendering thread in a MFC 
program, or what should I to do to make sure all resource is released in a MFC 
program, or what conditions is required to make viewer-done() return 
successfully  itself? I have tried to call viewer->setDone(true), but it 
doesn't help.

Thanks in advance.

Jin WZ.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to