Robert, I am not manually managing them, but letting the newly minted osgViewer pick its own contextIDs, which are being recycled. I am using OSG 2.2.0.
I should probably also mention that I am using the _viewer->setUpViewerAsEmbeddedInWindow(...) function to build a Graphics Context for my custom view. Perhaps this is causing me to miss some necessary code built into the "non-embedded" viewer? Thanks. --------------- Ross Anderson [EMAIL PROTECTED] Group 106 - Active Optical Systems MIT Lincoln Laboratory (781) 981-3344 Robert Osfield wrote: > HI Ross, > > OSG 2.x and osgViewer have much better support for handling of > contextID when sharing contexts and opening and closing contexts, you > shouldn't need to manually manage contextID's when working with > osgViewer so perhaps this is the route of the problem. > > Robert. > > On Jan 3, 2008 6:57 PM, Ross Anderson <[EMAIL PROTECTED]> wrote: > >> Hello, >> >> I have a GUI application that recycles ContextIDs. After recently >> porting the app to use osgViewer in place of SceneView I have a puzzling >> issue that involves internal caching of texture objects. I have a >> Texture2D instance shared between two or more contexts in different >> windows. If one of the contexts is closed and a new one opened in it's >> place (using the same context ID), the texture is no longer valid in the >> new context (objects appear white and the OpenGL error 'invalid >> operation' appears in the console). Using an OpenGL debugger indicates >> that the error occurs in osg::Texture::applyTexImage2D_subload when >> glTexSubImage2D is called. >> >> I can work around the problem by explicitly calling dirtyTextureObject() >> on every texture every time a context is being closed down, but I would >> imagine there is a better way since this is quite messy. I have tried a >> suggestion made in a previous thread which is to call this upon context >> closure: >> >> viewer->getSceneData()->releaseGLObjects( graphicsContext->getState() ); >> graphicsContext->getState()->reset(); >> osg::flushAllDeletedGLObjects( >> graphicsContext->getState()->getContextID() ); >> >> Unfortunately this does not solve the problem. Any ideas? >> >> --------------- >> Ross Anderson >> [EMAIL PROTECTED] >> Group 106 - Active Optical Systems >> MIT Lincoln Laboratory >> (781) 981-3344 >> >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

