test/testalpha.c
changeset 886 05c551e5bc64
parent 691 609543e2b3a1
child 1151 be9c9c8f6d53
     1.1 --- a/test/testalpha.c	Fri Apr 30 18:33:30 2004 +0000
     1.2 +++ b/test/testalpha.c	Thu May 06 15:55:06 2004 +0000
     1.3 @@ -380,6 +380,37 @@
     1.4  		exit(1);
     1.5  	}
     1.6  
     1.7 +	/* Print out information about our surfaces */
     1.8 +	printf("Screen is at %d bits per pixel\n",screen->format->BitsPerPixel);
     1.9 +	if ( (screen->flags & SDL_HWSURFACE) == SDL_HWSURFACE ) {
    1.10 +		printf("Screen is in video memory\n");
    1.11 +	} else {
    1.12 +		printf("Screen is in system memory\n");
    1.13 +	}
    1.14 +	if ( (screen->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF ) {
    1.15 +		printf("Screen has double-buffering enabled\n");
    1.16 +	}
    1.17 +	if ( (sprite->flags & SDL_HWSURFACE) == SDL_HWSURFACE ) {
    1.18 +		printf("Sprite is in video memory\n");
    1.19 +	} else {
    1.20 +		printf("Sprite is in system memory\n");
    1.21 +	}
    1.22 +
    1.23 +	/* Run a sample blit to trigger blit acceleration */
    1.24 +	{ SDL_Rect dst;
    1.25 +		dst.x = 0;
    1.26 +		dst.y = 0;
    1.27 +		dst.w = sprite->w;
    1.28 +		dst.h = sprite->h;
    1.29 +		SDL_BlitSurface(sprite, NULL, screen, &dst);
    1.30 +		SDL_FillRect(screen, &dst, 0);
    1.31 +	}
    1.32 +	if ( (sprite->flags & SDL_HWACCEL) == SDL_HWACCEL ) {
    1.33 +		printf("Sprite blit uses hardware alpha acceleration\n");
    1.34 +	} else {
    1.35 +		printf("Sprite blit dosn't uses hardware alpha acceleration\n");
    1.36 +	}
    1.37 +
    1.38  	/* Set a clipping rectangle to clip the outside edge of the screen */
    1.39  	{ SDL_Rect clip;
    1.40  		clip.x = 32;