To share OpenGL objects between different contexts (presumably running in different threads) we use wglShareLists() on Windows.How is it done for Linux?Has glx an API to do this kind of things?
1 Answer
To do this in GLX, you would pass a handle to the context you want to share resources with in your call to glXCreateContext (...) or glXCreateNewContext (...). It is really that simple, instead of having a special API function for this purpose in GLX, it's built-in to the function you use to create a context.
3 Comments
Michael IV
For real? Didn't realize it is that simple!
Andon M. Coleman
Yeah, ignore the part in that manual page for
glXCreateNewContext (...) where they duplicate the word share_list when it should say direct. Countless bug reports later, it is clear nobody cares about the accuracy of the GLX specification :PMichael IV
Well,this is really late )) But neither of the above mentioned methods works for modern OpenGL. glXCreateContextAttribsARB does