This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 1749 - SDL_GL_CreateContext() causes fatal X11 protocol err…
…ors that should just be caught instead Lee Salzman When using SDL_GL_CreateContext() to create a >= 3.0 version or core/forward-compatible context, internally glXCreateContextAttribsARB is used. Mesa in particular seems to be having trouble with this call and returning all sorts of errors, so it is dangerous to poll for the highest GL version by using calls to SDL_GL_CreateContext unless you are sure, a priori, that the call will suceed, defeating the point of its use. X11 protocol errors are of the following form, with varying details depending on user, but the cause is always SDL_GL_CreateContext as above... X Error of failed request: GLXBadFBConfig Major opcode of failed request: 153 (GLX) Minor opcode of failed request: 34 () Serial number of failed request: 215 Current serial number in output stream: 221 These sorts of errors can be temporarily filtered out by setting an X11 error handler to catch and ignore them, which is safe with respect to SDL_GL_CreateContext behavior because this function is allowed to return NULL to indicate failure. A patch is attached to do this temporary filtering/catching of errors generated by trying to use glXCreateContextAttribs and friends...
- Loading branch information