Hi OSG Users,
Can anyone suggest a good way to get osgViewer stuff to coexist with
Motif in a single window?
Here is my approach which doesn't work:
1. derive "GraphicsWindowXm" (gw) from osgViewer::GraphicsWindow and
OpenThreads::Thread
2. the motif window has a glwDrawingArea (da) for rendering
3. from main, tell the gw to make itself current, etc.
4. create an osgViewer::SimpleViewer (sv) and setSceneData(model)
5. run the GWXm thread
6. enter the while loop: sv->frame(); gw->swapBuffers();
This works fine until i move the window, at which point i get:
Xlib: unexpected async reply
The window can be resized, maximized, everything execpt moved.
The Xlib error is due to two threads referencing the same X connection.
I don't know why it only crashes on window move and nothing else.
2 areas which seem like they might be of some use are:
osg::GraphicsContext::set/createGraphicsThread()
osg::Camera::setRenderTargetImplementation()
Another idea is to catch expose events and set a flag which tells
the osg-loop to pause while moving the window...but that seems like a
bad hack.
Any advice on this would be very appreciated. Thank you,
-Charlie
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/