Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
3569:7f743e9b0b5b | 3570:7812d3e9564e |
---|---|
357 if (_this->gl_config.multisamplesamples) { | 357 if (_this->gl_config.multisamplesamples) { |
358 attribs[i++] = GLX_SAMPLES_ARB; | 358 attribs[i++] = GLX_SAMPLES_ARB; |
359 attribs[i++] = _this->gl_config.multisamplesamples; | 359 attribs[i++] = _this->gl_config.multisamplesamples; |
360 } | 360 } |
361 | 361 |
362 if (_this->gl_config.accelerated >= 0 | 362 if (_this->gl_data->HAS_GLX_EXT_visual_rating) { |
363 && _this->gl_data->HAS_GLX_EXT_visual_rating) { | |
364 attribs[i++] = GLX_VISUAL_CAVEAT_EXT; | 363 attribs[i++] = GLX_VISUAL_CAVEAT_EXT; |
365 attribs[i++] = GLX_NONE_EXT; | 364 attribs[i++] = _this->gl_config.accelerated ? GLX_NONE_EXT : |
366 } | 365 GLX_SLOW_VISUAL_EXT; |
366 } | |
367 | |
367 #ifdef GLX_DIRECT_COLOR /* Try for a DirectColor visual for gamma support */ | 368 #ifdef GLX_DIRECT_COLOR /* Try for a DirectColor visual for gamma support */ |
368 if (X11_UseDirectColorVisuals()) { | 369 if (X11_UseDirectColorVisuals()) { |
369 attribs[i++] = GLX_X_VISUAL_TYPE; | 370 attribs[i++] = GLX_X_VISUAL_TYPE; |
370 attribs[i++] = GLX_DIRECT_COLOR; | 371 attribs[i++] = GLX_DIRECT_COLOR; |
371 } | 372 } |
372 #endif | 373 #endif |
374 | |
373 attribs[i++] = None; | 375 attribs[i++] = None; |
374 | 376 |
375 vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs); | 377 vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs); |
376 #ifdef GLX_DIRECT_COLOR | 378 #ifdef GLX_DIRECT_COLOR |
377 if (!vinfo && X11_UseDirectColorVisuals()) { /* No DirectColor visual? Try again.. */ | 379 if (!vinfo && X11_UseDirectColorVisuals()) { /* No DirectColor visual? Try again.. */ |