obtaining glX errors.

i would like to know how to obtain the GLX generated errors e.g.
GLXBadDrawable, GLXBadCurrentWindow,etc…

OpenGL provides glGetError() for obtaining the openGL generated errors, do we have something similar for glx?

any help is appreciated. Thanks.


this question should be posted in the Linux forum (because you’d get more people who knew what glX was:-).

Having said that, what you need to do is set up an X error handler. This is mine (as an example):

int xerrorhandler(Display *dsp, XErrorEvent *error)
  char errorstring[128];
  XGetErrorText(dsp, error->error_code, errorstring, 128);
  std::cerr << "ack!fatal: X error--" << errorstring << std::endl;

OK, it doesn’t HANDLE the errors, but throws its hands up in proverbial horror, but you get the idea. You need to register the handler with