GLXContextID glXGetGLXContextIDEXT(const GLXContext ctx)
This function is client-side only. No round trip is forced to the server; unlike most X calls that return a value, glXGetGLXContextIDEXT() does not flush any pending events.
GLXContext glXImportGLXContextEXT( Display *dpy,
GLXContextID contextID)
Only the server-side context information can be shared between X clients; client-side state, such as pixel storage modes, cannot be shared. Thus, glXImportGLXContextEXT() must allocate memory to store client-side information.
This call does not create a new XID. It merely makes an existing XID available to the importing client. The XID goes away when the creating client drops its connection or the ID is explicitly deleted. The object goes away when the XID goes away and the context is not current to any thread.
void glXFreeGLXContextEXT(Display *dpy, GLXContext ctx)
glXFreeGLXContextEXT() does not free the server-side context information or the XID associated with the server-side context.