This might be too simplistic, (you might have gotten past this already). I was having problems when moving one scene between viewer windows (I also had off-screen PBuffers). I first had to make sure that display lists were turned off. Then I made sure I was calling up the viewer cleanup functions when closing one viewer (sonds like you did that). Then I had to make sure I was calling setContext() on the states with different numbers.
Hope it helps -- Rick On 12/12/06, Andy Skinner <[EMAIL PROTECTED]> wrote:
I'm going to try to explain enough of a pretty large system to see if anybody has a suggestion to help us out. We're switching windows for our OpenSceneGraph tree. When we remove the window we're drawing in, we call releaseAllGLObjects and flushAllDeletedGLObjects(). (I don't know if those are relevant to the problem, but we're trying to let it know that the context is being regenerated.) We do think we're getting a new context. But we seem to have some state wrong in our new window. (This usually happens after the first time we move our window, but seems to be OK after that.) We're looking at glIsEnabled(GL_DEPTH_TEST) in a drawImplementation() call for our quads, and it switches from on to off when we do the reparent. But the mode in the state still thinks it is on. How might the OpenGL mode be diverging from the OSG mode? We wondered whether OSG was setting the depth test to on and never set it again (assuming it hadn't changed), but OpenGL has a new value as we switch windows and contexts. But we tried asking OpenGL before we start culling or drawing, and it always says the depth test is off. If you want to move an OSG scene graph to another context, are there calls (other than the ones I do above) that you'd want to do in order to tell it to reset everything? I know this is sketchy info, but the system is pretty big, and hopefully this will spark an idea that will get us started. Thanks, andy The MathWorks _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/