I was looking at the isCurrent call and way contexts and made current and released.
isCurrent is not virtual, and simply checks to see if the thread on which the context was made current matches the current thread. Every OpenGL api I've looked at provides a way to get a handle to the active context, which could be compared to the handle of the context in the GraphicsContext implementation. That would mean the isContext would always work. Currently something like A->makeCurrent(); B->makeCurrent(); A->isCurrent(); won't work, but it could be fixed pretty easily. At the same time, releaseContext() could check to see if the context is actually the active context and do nothing if it isn't. In wgl, glx, agl, and cgl you can call GetCurrentContext with the respective prefix to accomplish this. Even Qt has QGLContext::currentContext(). I'll be happy to implement it in some cases, although I am still working with 2.8.3 and the changes will have to be ported to the trunk. Thanks, David Guthrie ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31999#31999 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org