comparison test/testgl2.c @ 3139:7f684f249ec9

indent
author Sam Lantinga <slouken@libsdl.org>
date Sat, 23 May 2009 22:41:08 +0000
parents 82e60908fab1
children 55541ddf13e3
comparison
equal deleted inserted replaced
3125:d71d8ceda8b3 3139:7f684f249ec9
240 printf("Renderer : %s\n", glGetString(GL_RENDERER)); 240 printf("Renderer : %s\n", glGetString(GL_RENDERER));
241 printf("Version : %s\n", glGetString(GL_VERSION)); 241 printf("Version : %s\n", glGetString(GL_VERSION));
242 printf("Extensions : %s\n", glGetString(GL_EXTENSIONS)); 242 printf("Extensions : %s\n", glGetString(GL_EXTENSIONS));
243 printf("\n"); 243 printf("\n");
244 244
245 status=SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value); 245 status = SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value);
246 if (!status) { 246 if (!status) {
247 printf("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value); 247 printf("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value);
248 } else { 248 } else {
249 printf("Failed to get SDL_GL_RED_SIZE: %s\n", SDL_GetError()); 249 printf("Failed to get SDL_GL_RED_SIZE: %s\n", SDL_GetError());
250 } 250 }
251 status=SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value); 251 status = SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value);
252 if (!status) { 252 if (!status) {
253 printf("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value); 253 printf("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value);
254 } else { 254 } else {
255 printf("Failed to get SDL_GL_GREEN_SIZE: %s\n", SDL_GetError()); 255 printf("Failed to get SDL_GL_GREEN_SIZE: %s\n", SDL_GetError());
256 } 256 }
257 status=SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value); 257 status = SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value);
258 if (!status) { 258 if (!status) {
259 printf("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value); 259 printf("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value);
260 } else { 260 } else {
261 printf("Failed to get SDL_GL_BLUE_SIZE: %s\n", SDL_GetError()); 261 printf("Failed to get SDL_GL_BLUE_SIZE: %s\n", SDL_GetError());
262 } 262 }
263 status=SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value); 263 status = SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value);
264 if (!status) { 264 if (!status) {
265 printf("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", 16, value); 265 printf("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", 16, value);
266 } else { 266 } else {
267 printf("Failed to get SDL_GL_DEPTH_SIZE: %s\n", SDL_GetError()); 267 printf("Failed to get SDL_GL_DEPTH_SIZE: %s\n", SDL_GetError());
268 } 268 }
269 if (fsaa) { 269 if (fsaa) {
270 status=SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value); 270 status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value);
271 if (!status) { 271 if (!status) {
272 printf("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value); 272 printf("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value);
273 } else { 273 } else {
274 printf("Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", SDL_GetError()); 274 printf("Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n",
275 } 275 SDL_GetError());
276 status=SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value); 276 }
277 status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value);
277 if (!status) { 278 if (!status) {
278 printf("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, value); 279 printf("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa,
280 value);
279 } else { 281 } else {
280 printf("Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", SDL_GetError()); 282 printf("Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n",
283 SDL_GetError());
281 } 284 }
282 } 285 }
283 if (accel) { 286 if (accel) {
284 status=SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value); 287 status = SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value);
285 if (!status) 288 if (!status) {
286 {
287 printf("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value); 289 printf("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value);
288 } else { 290 } else {
289 printf("Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", SDL_GetError()); 291 printf("Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n",
292 SDL_GetError());
290 } 293 }
291 } 294 }
292 295
293 /* Set rendering settings */ 296 /* Set rendering settings */
294 glMatrixMode(GL_PROJECTION); 297 glMatrixMode(GL_PROJECTION);