X vs GLX error handling

I’m implementing sevaral Xlib and GLX APIs such as XOpenDisplay, glXCreateContext, glXMakeCurrent and others…
I found a description of Xlib error handling, but I can’t find a detailed explanation regarding GLX error handling.
I understand that it must be a separate mechanism, because the error IDs overlap, but I can’t find a list of realated APIs for GLX erorr handling and overall description of error handling mechanism.

Can anyone help me with a link to such description? Or at least to provide a list of APIs for GLX error handling?

Just to be clear, when I say a list of APIs I mean APIs which resemble the Xlib APIs for errors, such as:
XSetErrorHandler(), XGetErrorText(), XGetErrorDatabaseText(), XSetIOErrorHandler().

If there are no such APIs, how do I handle errors for glx* routines?


Errors from X extensions are reported using the same mechanism as errors from the core protocol. The only difference is that while request codes, event codes and error codes for the core protocol are fixed (compile-time constants), those for extensions are defined (in header files) as offsets relative to base values which must be obtained at run time using XQueryExtension.

On the client side, the Xlib function XESetErrorString can be used by to register a procedure to convert error codes to strings; XGetErrorText will use this procedure to convert error codes which are associated with an extension.

If you have similar questions, you’d probably be better off asking on the X.org mailing lists.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.