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?
Asked
Active
Viewed 1,884 times
1 Answers
5
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.

Andon M. Coleman
- 42,359
- 2
- 81
- 106
-
For real? Didn't realize it is that simple! – Michael IV Sep 18 '13 at 18:35
-
4Yeah, 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 :P – Andon M. Coleman Sep 18 '13 at 18:52
-
Well,this is really late )) But neither of the above mentioned methods works for modern OpenGL. glXCreateContextAttribsARB does – Michael IV Apr 06 '18 at 21:21