Am Mittwoch, 10. Januar 2007 07:02 schrieb steve:
> So - what you need to do is to declare a global GLXcontext which
> is initially NULL. Every time you call glXCreateContext, pass that
> value as the third parameter - and update the global with the value
> new context handle.
> We don't want to do this in the released copy of freeglut though
> because we need compatibility with GLUT - but this is OpenSourced
> code - so you can easily make your own version.
We already have a tiny extension in freeglut, namely the
GLUT_RENDERING_CONTEXT state, which can currently have one of two values:
GLUT_CREATE_NEW_CONTEXT (default, no sharing at all) or
GLUT_USE_CURRENT_CONTEXT (the whole OpenGL state machine is shared). What is
actually required to make the behaviour under GLX and WGL consistent is
something in the middle (GLUT_SHARE_RESOURCES?), which can do what Steve
describes above. Although we will probably keep the current behaviour as it
is (although inconsistent across platforms), a user can have the choice
without having to hack the sources. Would that be acceptable?