How to get glXMakeCurrent error code?


I have a call to glXMakeCurrent() which is failing (i.e. it returns False). The docs say that it “generates” an error code giving more detail on the nature of the failure. I would like to retrieve that error code, but cannot figure out how to do it.

I’ve tried calling glGetError() but it just returns GL_NO_ERROR. I used XSetErrorHandler() to set up my own error handler, but it was never called. I’ve looked in /var/log/Xorg.0.log and /var/log/messages but there’s no message there for the failure.


GLX errors are reported via the X error handling mechanism.

Also, if this is related to your other thread where you’re writing a plug-in for another application, all bets are off. It’s impossible to reason about what’s going on without knowing what the application is doing.