comparison src/video/maccommon/SDL_macgl.c @ 706:a33b7819b917

*** empty log message ***
author Sam Lantinga <slouken@libsdl.org>
date Sat, 30 Aug 2003 21:47:48 +0000
parents 864e2d2a9a55
children b8d311d90021
comparison
equal deleted inserted replaced
705:6ae8eacccc7c 706:a33b7819b917
40 int i = 0; 40 int i = 0;
41 GLint attributes [ 24 ]; /* 24 is max possible in this setup */ 41 GLint attributes [ 24 ]; /* 24 is max possible in this setup */
42 GLboolean noerr; 42 GLboolean noerr;
43 43
44 attributes[i++] = AGL_RGBA; 44 attributes[i++] = AGL_RGBA;
45
46 if ( this->gl_config.double_buffer ) {
47 attributes[i++] = AGL_DOUBLEBUFFER;
48 }
49 if ( this->gl_config.stereo ) {
50 attributes[i++] = AGL_STEREO;
51 }
52 if ( this->gl_config.multisamplebuffers != 0 ) {
53 attributes[i++] = AGL_SAMPLE_BUFFERS_ARB;
54 attributes[i++] = this->gl_config.multisamplebuffers;
55 }
56 if ( this->gl_config.multisamplesamples != 0 ) {
57 attributes[i++] = AGL_SAMPLES_ARB;
58 attributes[i++] = this->gl_config.multisamplesamples;
59 }
60 if ( this->gl_config.depth_size != 0 ) {
61 attributes[i++] = AGL_DEPTH_SIZE;
62 attributes[i++] = this->gl_config.depth_size;
63 }
64 if ( this->gl_config.red_size != 0 && 45 if ( this->gl_config.red_size != 0 &&
65 this->gl_config.blue_size != 0 && 46 this->gl_config.blue_size != 0 &&
66 this->gl_config.green_size != 0 ) { 47 this->gl_config.green_size != 0 ) {
67
68 attributes[i++] = AGL_RED_SIZE; 48 attributes[i++] = AGL_RED_SIZE;
69 attributes[i++] = this->gl_config.red_size; 49 attributes[i++] = this->gl_config.red_size;
70 attributes[i++] = AGL_GREEN_SIZE; 50 attributes[i++] = AGL_GREEN_SIZE;
71 attributes[i++] = this->gl_config.green_size; 51 attributes[i++] = this->gl_config.green_size;
72 attributes[i++] = AGL_BLUE_SIZE; 52 attributes[i++] = AGL_BLUE_SIZE;
73 attributes[i++] = this->gl_config.blue_size; 53 attributes[i++] = this->gl_config.blue_size;
74 attributes[i++] = AGL_ALPHA_SIZE; 54 attributes[i++] = AGL_ALPHA_SIZE;
75 attributes[i++] = this->gl_config.alpha_size; 55 attributes[i++] = this->gl_config.alpha_size;
76 } 56 }
57 if ( this->gl_config.double_buffer ) {
58 attributes[i++] = AGL_DOUBLEBUFFER;
59 }
60 if ( this->gl_config.depth_size != 0 ) {
61 attributes[i++] = AGL_DEPTH_SIZE;
62 attributes[i++] = this->gl_config.depth_size;
63 }
77 if ( this->gl_config.stencil_size != 0 ) { 64 if ( this->gl_config.stencil_size != 0 ) {
78 attributes[i++] = AGL_STENCIL_SIZE; 65 attributes[i++] = AGL_STENCIL_SIZE;
79 attributes[i++] = this->gl_config.stencil_size; 66 attributes[i++] = this->gl_config.stencil_size;
80 } 67 }
81 if ( this->gl_config.accum_red_size != 0 && 68 if ( this->gl_config.accum_red_size != 0 &&
89 attributes[i++] = AGL_ACCUM_BLUE_SIZE; 76 attributes[i++] = AGL_ACCUM_BLUE_SIZE;
90 attributes[i++] = this->gl_config.accum_blue_size; 77 attributes[i++] = this->gl_config.accum_blue_size;
91 attributes[i++] = AGL_ACCUM_ALPHA_SIZE; 78 attributes[i++] = AGL_ACCUM_ALPHA_SIZE;
92 attributes[i++] = this->gl_config.accum_alpha_size; 79 attributes[i++] = this->gl_config.accum_alpha_size;
93 } 80 }
81 if ( this->gl_config.stereo ) {
82 attributes[i++] = AGL_STEREO;
83 }
84 #if defined(AGL_SAMPLE_BUFFERS_ARB) && defined(AGL_SAMPLES_ARB)
85 if ( this->gl_config.multisamplebuffers != 0 ) {
86 attributes[i++] = AGL_SAMPLE_BUFFERS_ARB;
87 attributes[i++] = this->gl_config.multisamplebuffers;
88 }
89 if ( this->gl_config.multisamplesamples != 0 ) {
90 attributes[i++] = AGL_SAMPLES_ARB;
91 attributes[i++] = this->gl_config.multisamplesamples;
92 }
93 #endif
94 attributes[i++] = AGL_ALL_RENDERERS; 94 attributes[i++] = AGL_ALL_RENDERERS;
95 attributes[i] = AGL_NONE; 95 attributes[i] = AGL_NONE;
96 96
97 format = aglChoosePixelFormat(NULL, 0, attributes); 97 format = aglChoosePixelFormat(NULL, 0, attributes);
98 if ( format == NULL ) { 98 if ( format == NULL ) {