Mercurial > sdl-ios-xcode
comparison test/testgl.c @ 656:864e2d2a9a55
Merged in Ryan's multisample code for MacOS, and changed the constants to match.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 22 Jul 2003 15:33:28 +0000 |
parents | 9c42ee1b7d77 |
children | 4ab6d1fd028f |
comparison
equal
deleted
inserted
replaced
655:9c42ee1b7d77 | 656:864e2d2a9a55 |
---|---|
474 SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, rgb_size[1] ); | 474 SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, rgb_size[1] ); |
475 SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, rgb_size[2] ); | 475 SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, rgb_size[2] ); |
476 SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 ); | 476 SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 ); |
477 SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); | 477 SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); |
478 if ( fsaa ) { | 478 if ( fsaa ) { |
479 SDL_GL_SetAttribute( SDL_GL_SAMPLE_BUFFERS, 1 ); | 479 SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, 1 ); |
480 SDL_GL_SetAttribute( SDL_GL_SAMPLES, fsaa ); | 480 SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, fsaa ); |
481 } | 481 } |
482 if ( SDL_SetVideoMode( w, h, bpp, video_flags ) == NULL ) { | 482 if ( SDL_SetVideoMode( w, h, bpp, video_flags ) == NULL ) { |
483 fprintf(stderr, "Couldn't set GL mode: %s\n", SDL_GetError()); | 483 fprintf(stderr, "Couldn't set GL mode: %s\n", SDL_GetError()); |
484 SDL_Quit(); | 484 SDL_Quit(); |
485 exit(1); | 485 exit(1); |
502 SDL_GL_GetAttribute( SDL_GL_DEPTH_SIZE, &value ); | 502 SDL_GL_GetAttribute( SDL_GL_DEPTH_SIZE, &value ); |
503 printf( "SDL_GL_DEPTH_SIZE: requested %d, got %d\n", bpp, value ); | 503 printf( "SDL_GL_DEPTH_SIZE: requested %d, got %d\n", bpp, value ); |
504 SDL_GL_GetAttribute( SDL_GL_DOUBLEBUFFER, &value ); | 504 SDL_GL_GetAttribute( SDL_GL_DOUBLEBUFFER, &value ); |
505 printf( "SDL_GL_DOUBLEBUFFER: requested 1, got %d\n", value ); | 505 printf( "SDL_GL_DOUBLEBUFFER: requested 1, got %d\n", value ); |
506 if ( fsaa ) { | 506 if ( fsaa ) { |
507 SDL_GL_GetAttribute( SDL_GL_SAMPLE_BUFFERS, &value ); | 507 SDL_GL_GetAttribute( SDL_GL_MULTISAMPLEBUFFERS, &value ); |
508 printf( "SDL_GL_SAMPLE_BUFFERS: requested 1, got %d\n", value ); | 508 printf( "SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value ); |
509 SDL_GL_GetAttribute( SDL_GL_SAMPLES, &value ); | 509 SDL_GL_GetAttribute( SDL_GL_MULTISAMPLESAMPLES, &value ); |
510 printf( "SDL_GL_SAMPLES: requested %d, got %d\n", fsaa, value ); | 510 printf( "SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, value ); |
511 } | 511 } |
512 | 512 |
513 /* Set the window manager title bar */ | 513 /* Set the window manager title bar */ |
514 SDL_WM_SetCaption( "SDL GL test", "testgl" ); | 514 SDL_WM_SetCaption( "SDL GL test", "testgl" ); |
515 | 515 |