diff src/video/x11/SDL_x11opengl.c @ 3570:7812d3e9564e

OpenGL hardware acceleration defaults on
author Sam Lantinga <slouken@libsdl.org>
date Tue, 15 Dec 2009 20:36:31 +0000
parents d559edc85610
children 19691cebb866
line wrap: on
line diff
--- a/src/video/x11/SDL_x11opengl.c	Tue Dec 15 20:14:50 2009 +0000
+++ b/src/video/x11/SDL_x11opengl.c	Tue Dec 15 20:36:31 2009 +0000
@@ -359,17 +359,19 @@
         attribs[i++] = _this->gl_config.multisamplesamples;
     }
 
-    if (_this->gl_config.accelerated >= 0
-        && _this->gl_data->HAS_GLX_EXT_visual_rating) {
+    if (_this->gl_data->HAS_GLX_EXT_visual_rating) {
         attribs[i++] = GLX_VISUAL_CAVEAT_EXT;
-        attribs[i++] = GLX_NONE_EXT;
+        attribs[i++] = _this->gl_config.accelerated ? GLX_NONE_EXT :
+                                                      GLX_SLOW_VISUAL_EXT;
     }
+
 #ifdef GLX_DIRECT_COLOR         /* Try for a DirectColor visual for gamma support */
     if (X11_UseDirectColorVisuals()) {
         attribs[i++] = GLX_X_VISUAL_TYPE;
         attribs[i++] = GLX_DIRECT_COLOR;
     }
 #endif
+
     attribs[i++] = None;
 
     vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs);