comparison src/video/x11/SDL_x11opengl.c @ 5248:3a8a452b49f0

Removed gamma support since it wasn't widely used and not well supported.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 10 Feb 2011 11:39:08 -0800
parents cd3a1d87cab7
children 762e40fb8e28
comparison
equal deleted inserted replaced
5247:78ce7bfd0faf 5248:3a8a452b49f0
363 attribs[i++] = GLX_VISUAL_CAVEAT_EXT; 363 attribs[i++] = GLX_VISUAL_CAVEAT_EXT;
364 attribs[i++] = _this->gl_config.accelerated ? GLX_NONE_EXT : 364 attribs[i++] = _this->gl_config.accelerated ? GLX_NONE_EXT :
365 GLX_SLOW_VISUAL_EXT; 365 GLX_SLOW_VISUAL_EXT;
366 } 366 }
367 367
368 #ifdef GLX_DIRECT_COLOR /* Try for a DirectColor visual for gamma support */
369 if (X11_UseDirectColorVisuals()) {
370 attribs[i++] = GLX_X_VISUAL_TYPE;
371 attribs[i++] = GLX_DIRECT_COLOR;
372 }
373 #endif
374
375 attribs[i++] = None; 368 attribs[i++] = None;
376 369
377 vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs); 370 vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs);
378 #ifdef GLX_DIRECT_COLOR
379 if (!vinfo && X11_UseDirectColorVisuals()) { /* No DirectColor visual? Try again.. */
380 attribs[i - 3] = None;
381 vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs);
382 }
383 #endif
384 if (!vinfo) { 371 if (!vinfo) {
385 SDL_SetError("Couldn't find matching GLX visual"); 372 SDL_SetError("Couldn't find matching GLX visual");
386 } 373 }
387 return vinfo; 374 return vinfo;
388 } 375 }