Use the extension to retrieve the display of the current context, or other information about the context, as follows:
To retrieve the current display associated with the current context, call glxGetCurrentDisplayEXT(). If there is no current context, NULL is returned. No round trip is forced to the server; unlike most X calls that return a value, glXGetCurrentDisplayEXT() does not flush any pending events.
To obtain the value of a context's attribute, call glXQueryContextInfoEXT(). The values and types corresponding to each GLX context attribute are listed in Table 9-1.
Type and Context Information for GLX Context Attributes