test/testgl.c
changeset 1737 eacc5bc01d1c
parent 1736 3b2a92126f4d
child 1815 871090feb7ad
     1.1 --- a/test/testgl.c	Thu Apr 27 07:59:16 2006 +0000
     1.2 +++ b/test/testgl.c	Thu Apr 27 08:39:51 2006 +0000
     1.3 @@ -445,7 +445,7 @@
     1.4  }
     1.5  
     1.6  int RunGLTest( int argc, char* argv[],
     1.7 -               int logo, int logocursor, int slowly, int bpp, float gamma, int noframe, int fsaa, int sync )
     1.8 +               int logo, int logocursor, int slowly, int bpp, float gamma, int noframe, int fsaa, int sync, int accel )
     1.9  {
    1.10  	int i;
    1.11  	int rgb_size[3];
    1.12 @@ -531,6 +531,9 @@
    1.13  		SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, 1 );
    1.14  		SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, fsaa );
    1.15  	}
    1.16 +	if ( accel ) {
    1.17 +		SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );
    1.18 +	}
    1.19  	if ( sync ) {
    1.20  		SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, 1 );
    1.21  	} else {
    1.22 @@ -566,6 +569,10 @@
    1.23  		SDL_GL_GetAttribute( SDL_GL_MULTISAMPLESAMPLES, &value );
    1.24  		printf("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, value );
    1.25  	}
    1.26 +	if ( accel ) {
    1.27 +		SDL_GL_GetAttribute( SDL_GL_ACCELERATED_VISUAL, &value );
    1.28 +		printf( "SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value );
    1.29 +	}
    1.30  	if ( sync ) {
    1.31  		SDL_GL_GetAttribute( SDL_GL_SWAP_CONTROL, &value );
    1.32  		printf( "SDL_GL_SWAP_CONTROL: requested 1, got %d\n", value );
    1.33 @@ -779,6 +786,7 @@
    1.34  	float gamma = 0.0;
    1.35  	int noframe = 0;
    1.36  	int fsaa = 0;
    1.37 +	int accel = 0;
    1.38  	int sync = 0;
    1.39  
    1.40  	logo = 0;
    1.41 @@ -814,6 +822,9 @@
    1.42  		if ( strcmp(argv[i], "-fsaa") == 0 ) {
    1.43   		       ++fsaa;
    1.44  		}
    1.45 +		if ( strcmp(argv[i], "-accel") == 0 ) {
    1.46 + 		       ++accel;
    1.47 +		}
    1.48  		if ( strcmp(argv[i], "-sync") == 0 ) {
    1.49   		       ++sync;
    1.50  		}
    1.51 @@ -825,7 +836,7 @@
    1.52  		}
    1.53  	}
    1.54  	for ( i=0; i<numtests; ++i ) {
    1.55 - 		RunGLTest(argc, argv, logo, logocursor, slowly, bpp, gamma, noframe, fsaa, sync);
    1.56 + 		RunGLTest(argc, argv, logo, logocursor, slowly, bpp, gamma, noframe, fsaa, sync, accel);
    1.57  	}
    1.58  	return 0;
    1.59  }