Well, I have tried a strategy 1 Viewer per 1 ClientWnd. I'm not using Doc/View model. It works pretty well for me.
The only thing I have discovered so far: you shouldn't initialize OSG and render thread in WM_CREATE handler. This will cause a crash. Because of this, I have to initialize OSG and render thread in first call to WM_PAINT. Of course, it could be done from MainFrame OnNew method, but then I have to traverse all chain MainFrame->ChildFrame->ClientWnd. I don't like this kind of dependencies. More disturbing is a very slippery glitch with app hang. I have discovered this in my current version of 3d-module, which have been written using Ogre3D. After transferring to Windows 7, application hangs in about 50% of runs in Ogre's Present method. This method swaps backbuffer to show it on a display. Usually app hangs somewhere deep inside video driver or Windows ntdll. My current app using a somewhat complicated threading model, so I decided, that it is something completely wrong with it. But today I have experienced a similar hang in my new version of 3D-module, written using OSG. In render thread's call to viewer->frame() method. As I understand, this method swaps a backbuffer. Not this again! It happened once so far, but I don't like this. Something have changed seriously in Windows 7 graphics. So, multithreaded rendering using accelerated 3D graphics should be done in a different way. Maybe someone know the issue? ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62533#62533 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

