src/video/x11/SDL_x11gl.c
changeset 1060 86885b40a53b
parent 862 f7a8b0ca2ae3
child 1168 045f186426e1
equal deleted inserted replaced
1059:de22ea8440d2 1060:86885b40a53b
   143 		attribs[i++] = GLX_SAMPLES_ARB;
   143 		attribs[i++] = GLX_SAMPLES_ARB;
   144 		attribs[i++] = this->gl_config.multisamplesamples;
   144 		attribs[i++] = this->gl_config.multisamplesamples;
   145 	}
   145 	}
   146 
   146 
   147 #ifdef GLX_DIRECT_COLOR /* Try for a DirectColor visual for gamma support */
   147 #ifdef GLX_DIRECT_COLOR /* Try for a DirectColor visual for gamma support */
   148 	attribs[i++] = GLX_X_VISUAL_TYPE;
   148 	if ( !getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ) {
   149 	attribs[i++] = GLX_DIRECT_COLOR;
   149 		attribs[i++] = GLX_X_VISUAL_TYPE;
       
   150 		attribs[i++] = GLX_DIRECT_COLOR;
       
   151 	}
   150 #endif
   152 #endif
   151 	attribs[i++] = None;
   153 	attribs[i++] = None;
   152 
   154 
   153  	glx_visualinfo = this->gl_data->glXChooseVisual(GFX_Display, 
   155  	glx_visualinfo = this->gl_data->glXChooseVisual(GFX_Display, 
   154 						  SDL_Screen, attribs);
   156 						  SDL_Screen, attribs);
   155 #ifdef GLX_DIRECT_COLOR
   157 #ifdef GLX_DIRECT_COLOR
   156 	if( !glx_visualinfo ) { /* No DirectColor visual?  Try again.. */
   158 	if( !glx_visualinfo && !getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ) { /* No DirectColor visual?  Try again.. */
   157 		attribs[i-3] = None;
   159 		attribs[i-3] = None;
   158  		glx_visualinfo = this->gl_data->glXChooseVisual(GFX_Display, 
   160  		glx_visualinfo = this->gl_data->glXChooseVisual(GFX_Display, 
   159 						  SDL_Screen, attribs);
   161 						  SDL_Screen, attribs);
   160 	}
   162 	}
   161 #endif
   163 #endif