comparison src/video/wincommon/SDL_wingl.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 c638fde8a824
children a6fa62b1be09
comparison
equal deleted inserted replaced
449:8a687496061f 450:8a43e0cbf02f
104 GL_pfd.nVersion = 1; 104 GL_pfd.nVersion = 1;
105 GL_pfd.dwFlags = (PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL); 105 GL_pfd.dwFlags = (PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL);
106 if ( this->gl_config.double_buffer ) { 106 if ( this->gl_config.double_buffer ) {
107 GL_pfd.dwFlags |= PFD_DOUBLEBUFFER; 107 GL_pfd.dwFlags |= PFD_DOUBLEBUFFER;
108 } 108 }
109 if ( this->gl_config.stereo ) {
110 GL_pfd.dwFlags |= PFD_STEREO;
111 }
109 GL_pfd.iPixelType = PFD_TYPE_RGBA; 112 GL_pfd.iPixelType = PFD_TYPE_RGBA;
110 GL_pfd.cColorBits = this->gl_config.buffer_size; 113 GL_pfd.cColorBits = this->gl_config.buffer_size;
111 GL_pfd.cRedBits = this->gl_config.red_size; 114 GL_pfd.cRedBits = this->gl_config.red_size;
112 GL_pfd.cGreenBits = this->gl_config.green_size; 115 GL_pfd.cGreenBits = this->gl_config.green_size;
113 GL_pfd.cBlueBits = this->gl_config.blue_size; 116 GL_pfd.cBlueBits = this->gl_config.blue_size;
240 *value = GL_pfd.cAccumBlueBits; 243 *value = GL_pfd.cAccumBlueBits;
241 break; 244 break;
242 case SDL_GL_ACCUM_ALPHA_SIZE: 245 case SDL_GL_ACCUM_ALPHA_SIZE:
243 *value = GL_pfd.cAccumAlphaBits; 246 *value = GL_pfd.cAccumAlphaBits;
244 break; 247 break;
248 case SDL_GL_STEREO:
249 if ( GL_pfd.dwFlags & PFD_STEREO ) {
250 *value = 1;
251 } else {
252 *value = 0;
253 }
254 break;
245 default: 255 default:
246 retval = -1; 256 retval = -1;
247 break; 257 break;
248 } 258 }
249 return retval; 259 return retval;