|
@@ -406,6 +406,11 @@ X11_GL_InitExtensions(_THIS)
|
|
|
if (HasExtension("GLX_ARB_create_context_robustness", extensions)) {
|
|
|
_this->gl_data->HAS_GLX_ARB_create_context_robustness = SDL_TRUE;
|
|
|
}
|
|
|
+
|
|
|
+ /* Check for GLX_ARB_create_context_no_error */
|
|
|
+ if (HasExtension("GLX_ARB_create_context_no_error", extensions)) {
|
|
|
+ _this->gl_data->HAS_GLX_ARB_create_context_no_error = SDL_TRUE;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/* glXChooseVisual and glXChooseFBConfig have some small differences in
|
|
@@ -501,11 +506,6 @@ 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;
|
|
@@ -638,8 +638,8 @@ X11_GL_CreateContext(_THIS, SDL_Window * window)
|
|
|
context =
|
|
|
_this->gl_data->glXCreateContext(display, vinfo, share_context, True);
|
|
|
} else {
|
|
|
- /* max 12 attributes plus terminator */
|
|
|
- int attribs[13] = {
|
|
|
+ /* max 14 attributes plus terminator */
|
|
|
+ int attribs[15] = {
|
|
|
GLX_CONTEXT_MAJOR_VERSION_ARB,
|
|
|
_this->gl_config.major_version,
|
|
|
GLX_CONTEXT_MINOR_VERSION_ARB,
|
|
@@ -678,6 +678,12 @@ X11_GL_CreateContext(_THIS, SDL_Window * window)
|
|
|
GLX_NO_RESET_NOTIFICATION_ARB;
|
|
|
}
|
|
|
|
|
|
+ /* only set if glx extension is available */
|
|
|
+ if( _this->gl_data->HAS_GLX_ARB_create_context_no_error ) {
|
|
|
+ attribs[iattr++] = GLX_CONTEXT_OPENGL_NO_ERROR_ARB;
|
|
|
+ attribs[iattr++] = _this->gl_config.no_error;
|
|
|
+ }
|
|
|
+
|
|
|
attribs[iattr++] = 0;
|
|
|
|
|
|
/* Get a pointer to the context creation function for GL 3.0 */
|