comparison src/video/SDL_video.c @ 1938:861893943d53

Actually use the function we took the trouble to get the pointer for.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 25 Jul 2006 07:14:40 +0000
parents 83946ee0ff1f
children bf09d535e014
comparison
equal deleted inserted replaced
1937:05e88d266921 1938:861893943d53
2259 { 2259 {
2260 GLint bits = 0; 2260 GLint bits = 0;
2261 GLint component; 2261 GLint component;
2262 2262
2263 /* there doesn't seem to be a single flag in OpenGL for this! */ 2263 /* there doesn't seem to be a single flag in OpenGL for this! */
2264 glGetIntegerv(GL_RED_BITS, &component); 2264 glGetIntegervFunc(GL_RED_BITS, &component);
2265 bits += component; 2265 bits += component;
2266 glGetIntegerv(GL_GREEN_BITS, &component); 2266 glGetIntegervFunc(GL_GREEN_BITS, &component);
2267 bits += component; 2267 bits += component;
2268 glGetIntegerv(GL_BLUE_BITS, &component); 2268 glGetIntegervFunc(GL_BLUE_BITS, &component);
2269 bits += component; 2269 bits += component;
2270 glGetIntegerv(GL_ALPHA_BITS, &component); 2270 glGetIntegervFunc(GL_ALPHA_BITS, &component);
2271 bits += component; 2271 bits += component;
2272 2272
2273 *value = bits; 2273 *value = bits;
2274 return 0; 2274 return 0;
2275 } 2275 }
2282 default: 2282 default:
2283 SDL_SetError("Unknown OpenGL attribute"); 2283 SDL_SetError("Unknown OpenGL attribute");
2284 return -1; 2284 return -1;
2285 } 2285 }
2286 2286
2287 glGetIntegerv(attrib, (GLint *) value); 2287 glGetIntegervFunc(attrib, (GLint *) value);
2288 return 0; 2288 return 0;
2289 #else 2289 #else
2290 SDL_Unsupported(); 2290 SDL_Unsupported();
2291 return -1; 2291 return -1;
2292 #endif /* SDL_VIDEO_OPENGL */ 2292 #endif /* SDL_VIDEO_OPENGL */