summaryrefslogtreecommitdiff
path: root/src/video/x11/SDL_x11opengl.c
diff options
context:
space:
mode:
authorRyan C. Gordon <icculus@icculus.org>2017-08-24 21:30:53 -0400
committerRyan C. Gordon <icculus@icculus.org>2017-08-24 21:30:53 -0400
commita2ede16eebef9ca9fb0b6d11e523aea97fdc01ef (patch)
tree40484374281b69c516e010b15a285a18732c92a9 /src/video/x11/SDL_x11opengl.c
parent5f752872394d20333e844e5f0671bf52f5f64db0 (diff)
opengl: add support for GL_KHR_no_error.
This is completely untested! Fixes Bugzilla #3721.
Diffstat (limited to 'src/video/x11/SDL_x11opengl.c')
-rw-r--r--src/video/x11/SDL_x11opengl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c
index 8a658dfbf2..37267edaec 100644
--- a/src/video/x11/SDL_x11opengl.c
+++ b/src/video/x11/SDL_x11opengl.c
@@ -114,6 +114,13 @@ typedef GLXContext(*PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display * dpy,
#endif
#endif
+#ifndef GLX_ARB_create_context_no_error
+#define GLX_ARB_create_context_no_error
+#ifndef GLX_CONTEXT_OPENGL_NO_ERROR_ARB
+#define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3
+#endif
+#endif
+
#ifndef GLX_EXT_swap_control
#define GLX_SWAP_INTERVAL_EXT 0x20F1
#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
@@ -494,6 +501,11 @@ X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int si
attribs[i++] = True; /* always needed, for_FBConfig or not! */
}
+ if (_this->gl_config.no_error) {
+ attribs[i++] = GLX_CONTEXT_OPENGL_NO_ERROR_ARB;
+ attribs[i++] = _this->gl_config.no_error;
+ }
+
if (_this->gl_config.accelerated >= 0 &&
_this->gl_data->HAS_GLX_EXT_visual_rating) {
attribs[i++] = GLX_VISUAL_CAVEAT_EXT;