OpenGL hardware acceleration defaults on

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404319
This commit is contained in:
Sam Lantinga 2009-12-15 20:36:31 +00:00
parent abec9e44fa
commit fe2b42f86c
6 changed files with 37 additions and 41 deletions

View file

@ -359,17 +359,19 @@ X11_GL_GetVisual(_THIS, Display * display, int screen)
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);