HI Sherman & David,
This makes it sounds very much like a threading issue associated with
making the graphics context current. In the GraphicsContext::close()
method there is a section that does the flushing of deleted OpenGL
objects, the code is:
if (callCloseImplementation && _state.valid() && isRealized())
{
osg::notify(osg::INFO)<<"Closing still viable window
"<<sharedContextExists<<"
_state->getContextID()="<<_state->getContextID()<<std::endl;
makeCurrent();
osg::notify(osg::INFO)<<"Doing Flush"<<std::endl;
// flush all the OpenGL object buffer for this context.
double availableTime = 100.0f;
double currentTime =
_state->getFrameStamp()?_state->getFrameStamp()->getReferenceTime():0.0;
osg::FrameBufferObject::flushDeletedFrameBufferObjects(_state->getContextID(),currentTime,availableTime);
osg::RenderBuffer::flushDeletedRenderBuffers(_state->getContextID(),currentTime,availableTime);
osg::Texture::flushAllDeletedTextureObjects(_state->getContextID());
osg::Drawable::flushAllDeletedDisplayLists(_state->getContextID());
osg::Drawable::flushDeletedVertexBufferObjects(_state->getContextID(),currentTime,availableTime);
osg::VertexProgram::flushDeletedVertexProgramObjects(_state->getContextID(),currentTime,availableTime);
osg::FragmentProgram::flushDeletedFragmentProgramObjects(_state->getContextID(),currentTime,availableTime);
osg::Program::flushDeletedGlPrograms(_state->getContextID(),currentTime,availableTime);
osg::Shader::flushDeletedGlShaders(_state->getContextID(),currentTime,availableTime);
osg::notify(osg::INFO)<<"Done Flush "<<availableTime<<std::endl;
_state->reset();
releaseContext();
}
Now there is a makeCurrent() in there, but perhaps this is failing.
It'd be interesting to focus on the success/failure of this call.
makeCurrent() should return true on success so this would be something
one could test against.
Robert.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org