Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11opengl.c @ 2963:ee331407574f
Don't use DirectColor visuals until we implement DirectColor colormap support
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 02 Jan 2009 15:47:49 +0000 |
parents | 99210400e8b9 |
children | 8f4ed5ec2b06 |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11opengl.c Fri Jan 02 10:30:53 2009 +0000 +++ b/src/video/x11/SDL_x11opengl.c Fri Jan 02 15:47:49 2009 +0000 @@ -391,7 +391,7 @@ attribs[i++] = GLX_NONE_EXT; } #ifdef GLX_DIRECT_COLOR /* Try for a DirectColor visual for gamma support */ - if (!SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR")) { + if (X11_UseDirectColorVisuals()) { attribs[i++] = GLX_X_VISUAL_TYPE; attribs[i++] = GLX_DIRECT_COLOR; } @@ -400,7 +400,7 @@ vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs); #ifdef GLX_DIRECT_COLOR - if (!vinfo && !SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR")) { /* No DirectColor visual? Try again.. */ + if (!vinfo && X11_UseDirectColorVisuals()) { /* No DirectColor visual? Try again.. */ attribs[i - 3] = None; vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs); }