Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11gl.c @ 450:8a43e0cbf02f
Added SDL_GL_STEREO for stereoscopic OpenGL contexts
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 19 Aug 2002 17:58:08 +0000 |
parents | f6ffac90895c |
children | d6e7d7006062 |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11gl.c Mon Aug 19 03:40:44 2002 +0000 +++ b/src/video/x11/SDL_x11gl.c Mon Aug 19 17:58:08 2002 +0000 @@ -67,8 +67,8 @@ } /* Setup our GLX attributes according to the gl_config. */ - i = 0; - attribs[i++] = GLX_RGBA; + i = 0; + attribs[i++] = GLX_RGBA; attribs[i++] = GLX_RED_SIZE; attribs[i++] = this->gl_config.red_size; attribs[i++] = GLX_GREEN_SIZE; @@ -82,8 +82,8 @@ } if( this->gl_config.buffer_size ) { - attribs[i++] = GLX_BUFFER_SIZE; - attribs[i++] = this->gl_config.buffer_size; + attribs[i++] = GLX_BUFFER_SIZE; + attribs[i++] = this->gl_config.buffer_size; } if( this->gl_config.double_buffer ) { @@ -99,25 +99,30 @@ } if( this->gl_config.accum_red_size ) { - attribs[i++] = GLX_ACCUM_RED_SIZE; + attribs[i++] = GLX_ACCUM_RED_SIZE; attribs[i++] = this->gl_config.accum_red_size; } if( this->gl_config.accum_green_size ) { - attribs[i++] = GLX_ACCUM_GREEN_SIZE; + attribs[i++] = GLX_ACCUM_GREEN_SIZE; attribs[i++] = this->gl_config.accum_green_size; } if( this->gl_config.accum_blue_size ) { - attribs[i++] = GLX_ACCUM_BLUE_SIZE; + attribs[i++] = GLX_ACCUM_BLUE_SIZE; attribs[i++] = this->gl_config.accum_blue_size; } if( this->gl_config.accum_alpha_size ) { - attribs[i++] = GLX_ACCUM_ALPHA_SIZE; + attribs[i++] = GLX_ACCUM_ALPHA_SIZE; attribs[i++] = this->gl_config.accum_alpha_size; } + if( this->gl_config.stereo ) { + attribs[i++] = GLX_STEREO; + attribs[i++] = this->gl_config.stereo; + } + #ifdef GLX_DIRECT_COLOR /* Try for a DirectColor visual for gamma support */ attribs[i++] = GLX_X_VISUAL_TYPE; attribs[i++] = GLX_DIRECT_COLOR; @@ -288,6 +293,9 @@ case SDL_GL_ACCUM_ALPHA_SIZE: glx_attrib = GLX_ACCUM_ALPHA_SIZE; break; + case SDL_GL_STEREO: + glx_attrib = GLX_STEREO; + break; default: return(-1); }