Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
2962:1e242954330b | 2963:ee331407574f |
---|---|
389 && _this->gl_data->HAS_GLX_EXT_visual_rating) { | 389 && _this->gl_data->HAS_GLX_EXT_visual_rating) { |
390 attribs[i++] = GLX_VISUAL_CAVEAT_EXT; | 390 attribs[i++] = GLX_VISUAL_CAVEAT_EXT; |
391 attribs[i++] = GLX_NONE_EXT; | 391 attribs[i++] = GLX_NONE_EXT; |
392 } | 392 } |
393 #ifdef GLX_DIRECT_COLOR /* Try for a DirectColor visual for gamma support */ | 393 #ifdef GLX_DIRECT_COLOR /* Try for a DirectColor visual for gamma support */ |
394 if (!SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR")) { | 394 if (X11_UseDirectColorVisuals()) { |
395 attribs[i++] = GLX_X_VISUAL_TYPE; | 395 attribs[i++] = GLX_X_VISUAL_TYPE; |
396 attribs[i++] = GLX_DIRECT_COLOR; | 396 attribs[i++] = GLX_DIRECT_COLOR; |
397 } | 397 } |
398 #endif | 398 #endif |
399 attribs[i++] = None; | 399 attribs[i++] = None; |
400 | 400 |
401 vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs); | 401 vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs); |
402 #ifdef GLX_DIRECT_COLOR | 402 #ifdef GLX_DIRECT_COLOR |
403 if (!vinfo && !SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR")) { /* No DirectColor visual? Try again.. */ | 403 if (!vinfo && X11_UseDirectColorVisuals()) { /* No DirectColor visual? Try again.. */ |
404 attribs[i - 3] = None; | 404 attribs[i - 3] = None; |
405 vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs); | 405 vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs); |
406 } | 406 } |
407 #endif | 407 #endif |
408 if (!vinfo) { | 408 if (!vinfo) { |