comparison test/testgl2.c @ 1936:83946ee0ff1f

Implemented OpenGL support on Mac OS X The OpenGL renderer works without changes, yay! :)
author Sam Lantinga <slouken@libsdl.org>
date Tue, 25 Jul 2006 06:22:42 +0000
parents c773b0c0ac89
children a788656ca29a
comparison
equal deleted inserted replaced
1935:8a9b367a80f3 1936:83946ee0ff1f
242 printf("Renderer : %s\n", glGetString(GL_RENDERER)); 242 printf("Renderer : %s\n", glGetString(GL_RENDERER));
243 printf("Version : %s\n", glGetString(GL_VERSION)); 243 printf("Version : %s\n", glGetString(GL_VERSION));
244 printf("Extensions : %s\n", glGetString(GL_EXTENSIONS)); 244 printf("Extensions : %s\n", glGetString(GL_EXTENSIONS));
245 printf("\n"); 245 printf("\n");
246 246
247 SDL_GL_GetWindowAttribute(state->windows[0], SDL_GL_RED_SIZE, &value); 247 SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value);
248 printf("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value); 248 printf("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value);
249 SDL_GL_GetWindowAttribute(state->windows[0], SDL_GL_GREEN_SIZE, &value); 249 SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value);
250 printf("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value); 250 printf("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value);
251 SDL_GL_GetWindowAttribute(state->windows[0], SDL_GL_BLUE_SIZE, &value); 251 SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value);
252 printf("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value); 252 printf("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value);
253 SDL_GL_GetWindowAttribute(state->windows[0], SDL_GL_DEPTH_SIZE, &value); 253 SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value);
254 printf("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", 16, value); 254 printf("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", 16, value);
255 SDL_GL_GetWindowAttribute(state->windows[0], SDL_GL_DOUBLEBUFFER, &value); 255 SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER, &value);
256 printf("SDL_GL_DOUBLEBUFFER: requested 1, got %d\n", value); 256 printf("SDL_GL_DOUBLEBUFFER: requested 1, got %d\n", value);
257 if (fsaa) { 257 if (fsaa) {
258 SDL_GL_GetWindowAttribute(state->windows[0], 258 SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value);
259 SDL_GL_MULTISAMPLEBUFFERS, &value);
260 printf("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value); 259 printf("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value);
261 SDL_GL_GetWindowAttribute(state->windows[0], 260 SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value);
262 SDL_GL_MULTISAMPLESAMPLES, &value);
263 printf("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, 261 printf("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa,
264 value); 262 value);
265 } 263 }
266 if (accel) { 264 if (accel) {
267 SDL_GL_GetWindowAttribute(state->windows[0], 265 SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value);
268 SDL_GL_ACCELERATED_VISUAL, &value);
269 printf("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value); 266 printf("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value);
270 } 267 }
271 268
272 /* Set rendering settings */ 269 /* Set rendering settings */
273 glMatrixMode(GL_PROJECTION); 270 glMatrixMode(GL_PROJECTION);