src/video/x11/SDL_x11gl.c
changeset 450 8a43e0cbf02f
parent 297 f6ffac90895c
child 566 d6e7d7006062
     1.1 --- a/src/video/x11/SDL_x11gl.c	Mon Aug 19 03:40:44 2002 +0000
     1.2 +++ b/src/video/x11/SDL_x11gl.c	Mon Aug 19 17:58:08 2002 +0000
     1.3 @@ -67,8 +67,8 @@
     1.4  	}
     1.5  
     1.6          /* Setup our GLX attributes according to the gl_config. */
     1.7 -        i = 0;
     1.8 -        attribs[i++] = GLX_RGBA;
     1.9 +	i = 0;
    1.10 +	attribs[i++] = GLX_RGBA;
    1.11  	attribs[i++] = GLX_RED_SIZE;
    1.12  	attribs[i++] = this->gl_config.red_size;
    1.13  	attribs[i++] = GLX_GREEN_SIZE;
    1.14 @@ -82,8 +82,8 @@
    1.15  	}
    1.16  
    1.17  	if( this->gl_config.buffer_size ) {
    1.18 -                attribs[i++] = GLX_BUFFER_SIZE;
    1.19 -	        attribs[i++] = this->gl_config.buffer_size;
    1.20 +		attribs[i++] = GLX_BUFFER_SIZE;
    1.21 +		attribs[i++] = this->gl_config.buffer_size;
    1.22  	}
    1.23  
    1.24  	if( this->gl_config.double_buffer ) {
    1.25 @@ -99,25 +99,30 @@
    1.26  	}
    1.27  
    1.28  	if( this->gl_config.accum_red_size ) {
    1.29 -	        attribs[i++] = GLX_ACCUM_RED_SIZE;
    1.30 +		attribs[i++] = GLX_ACCUM_RED_SIZE;
    1.31  		attribs[i++] = this->gl_config.accum_red_size;
    1.32  	}
    1.33  
    1.34  	if( this->gl_config.accum_green_size ) {
    1.35 -	        attribs[i++] = GLX_ACCUM_GREEN_SIZE;
    1.36 +		attribs[i++] = GLX_ACCUM_GREEN_SIZE;
    1.37  		attribs[i++] = this->gl_config.accum_green_size;
    1.38  	}
    1.39  
    1.40  	if( this->gl_config.accum_blue_size ) {
    1.41 -	        attribs[i++] = GLX_ACCUM_BLUE_SIZE;
    1.42 +		attribs[i++] = GLX_ACCUM_BLUE_SIZE;
    1.43  		attribs[i++] = this->gl_config.accum_blue_size;
    1.44  	}
    1.45  
    1.46  	if( this->gl_config.accum_alpha_size ) {
    1.47 -	        attribs[i++] = GLX_ACCUM_ALPHA_SIZE;
    1.48 +		attribs[i++] = GLX_ACCUM_ALPHA_SIZE;
    1.49  		attribs[i++] = this->gl_config.accum_alpha_size;
    1.50  	}
    1.51  
    1.52 +	if( this->gl_config.stereo ) {
    1.53 +		attribs[i++] = GLX_STEREO;
    1.54 +		attribs[i++] = this->gl_config.stereo;
    1.55 +	}
    1.56 +
    1.57  #ifdef GLX_DIRECT_COLOR /* Try for a DirectColor visual for gamma support */
    1.58  	attribs[i++] = GLX_X_VISUAL_TYPE;
    1.59  	attribs[i++] = GLX_DIRECT_COLOR;
    1.60 @@ -288,6 +293,9 @@
    1.61  	    case SDL_GL_ACCUM_ALPHA_SIZE:
    1.62  		glx_attrib = GLX_ACCUM_ALPHA_SIZE;
    1.63  		break;
    1.64 +	    case SDL_GL_STEREO:
    1.65 +		glx_attrib = GLX_STEREO;
    1.66 +		break;
    1.67  	    default:
    1.68  		return(-1);
    1.69  	}