# HG changeset patch # User Sam Lantinga # Date 1062280068 0 # Node ID a33b7819b917b39386e9faf3cd406cc9ebd987af # Parent 6ae8eacccc7cf9fae97ef09f4600fcc665ea96e7 *** empty log message *** diff -r 6ae8eacccc7c -r a33b7819b917 src/video/maccommon/SDL_macgl.c --- a/src/video/maccommon/SDL_macgl.c Sat Aug 30 20:55:38 2003 +0000 +++ b/src/video/maccommon/SDL_macgl.c Sat Aug 30 21:47:48 2003 +0000 @@ -42,29 +42,9 @@ GLboolean noerr; attributes[i++] = AGL_RGBA; - - if ( this->gl_config.double_buffer ) { - attributes[i++] = AGL_DOUBLEBUFFER; - } - if ( this->gl_config.stereo ) { - attributes[i++] = AGL_STEREO; - } - if ( this->gl_config.multisamplebuffers != 0 ) { - attributes[i++] = AGL_SAMPLE_BUFFERS_ARB; - attributes[i++] = this->gl_config.multisamplebuffers; - } - if ( this->gl_config.multisamplesamples != 0 ) { - attributes[i++] = AGL_SAMPLES_ARB; - attributes[i++] = this->gl_config.multisamplesamples; - } - if ( this->gl_config.depth_size != 0 ) { - attributes[i++] = AGL_DEPTH_SIZE; - attributes[i++] = this->gl_config.depth_size; - } if ( this->gl_config.red_size != 0 && this->gl_config.blue_size != 0 && this->gl_config.green_size != 0 ) { - attributes[i++] = AGL_RED_SIZE; attributes[i++] = this->gl_config.red_size; attributes[i++] = AGL_GREEN_SIZE; @@ -74,6 +54,13 @@ attributes[i++] = AGL_ALPHA_SIZE; attributes[i++] = this->gl_config.alpha_size; } + if ( this->gl_config.double_buffer ) { + attributes[i++] = AGL_DOUBLEBUFFER; + } + if ( this->gl_config.depth_size != 0 ) { + attributes[i++] = AGL_DEPTH_SIZE; + attributes[i++] = this->gl_config.depth_size; + } if ( this->gl_config.stencil_size != 0 ) { attributes[i++] = AGL_STENCIL_SIZE; attributes[i++] = this->gl_config.stencil_size; @@ -91,6 +78,19 @@ attributes[i++] = AGL_ACCUM_ALPHA_SIZE; attributes[i++] = this->gl_config.accum_alpha_size; } + if ( this->gl_config.stereo ) { + attributes[i++] = AGL_STEREO; + } +#if defined(AGL_SAMPLE_BUFFERS_ARB) && defined(AGL_SAMPLES_ARB) + if ( this->gl_config.multisamplebuffers != 0 ) { + attributes[i++] = AGL_SAMPLE_BUFFERS_ARB; + attributes[i++] = this->gl_config.multisamplebuffers; + } + if ( this->gl_config.multisamplesamples != 0 ) { + attributes[i++] = AGL_SAMPLES_ARB; + attributes[i++] = this->gl_config.multisamplesamples; + } +#endif attributes[i++] = AGL_ALL_RENDERERS; attributes[i] = AGL_NONE;