I was just thinking of making isCurrent() virtual and implementing it for each 
of the windowing implementations.

Then in releaseContext, it could check to see if the context being released is 
actually the current context.  

It may be nice to get the current GraphicsContext, but the cost of that is 
someone could change the context using a direct api call and the osg calls 
would be broken again.  Using the native api call internally would prevent that.

Having a GetCurrentContext static call like you said could still be 
implemented, and it could be made more robust by verifying it using the 
isCurrent() call that works with the system level api.  The best it could do, 
however, if isCurrent() returns false on the suspected current context would be 
to return NULL.  Either way, the GetCurrentContext() call would be an 
additional feature to fixing isCurrent().

Cheers,
David

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32046#32046





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to