Hi All,

I was reviewing osg::State today and came across some code had the
potential of causing problems under Windows when running with multiple
graphics contexts. The particular issue was related to the use of
static variables to store function pointers to the extensions/later
OpenGL features such as vertex arrays and multi-texturing (yes these
wern't in OpenGL 1.1).

The problem with statics is that there will one instance of each of
these variables, depsite the fact that under Windows the get OpenGL
function pointers might have different values for each context.  I
don't believe this happens on any other platform, so it won't
typically be a problem, however, under Windows it looks dangerous.

To avoid any problems with this I have removed the static function
pointers, making them local member variables of osg::State, and have
created one initialize function for all the function pointers.  These
changes are now checked into CVS.

Could windows users who have multi-core/processor systems + multiple
graphics card please try out the latest in CVS and see if multiple
contexts now come up ok?

I suspect there may well be other issues lurking elsewhere, be it in
the OSG or in Producer, or perhaps just plain in the OpenGL driver or
OS, but at least this should one more potential problem licked.

Thanks in advance for any feedback/fixes for any remaining problems.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to