comparison test/testalpha.c @ 886:05c551e5bc64

Date: Sat, 24 Apr 2004 15:13:32 +0300 From: "Mike Gorchak" Subject: SDL updates for the QNX6 1. Updated the README.QNX 2. Updated libtool scripts, which are shipped with SDL for QNX6 support. 3. Added some code to support the new QNX 6.3.0, which is in beta now. 4. Added code to detect the hw features, which driver supports. 5. Added hw alpha blits code. 6. Fixed bug when application switches to fullscreen more the 2 times. (afte\ r that window becames always stay on top). 7. Updated a bit README for the tests. 8. Added information about acceleration show in the testalpha.c test. 9. Added small fixes to the testoverlay2.c test. 10. Added alpha and cc+alpha blits benchmarks to the testvidinfo.c test.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 06 May 2004 15:55:06 +0000
parents 609543e2b3a1
children be9c9c8f6d53
comparison
equal deleted inserted replaced
885:9f6ad2286011 886:05c551e5bc64
378 if ( LoadSprite(screen, "icon.bmp") < 0 ) { 378 if ( LoadSprite(screen, "icon.bmp") < 0 ) {
379 SDL_FreeSurface(light); 379 SDL_FreeSurface(light);
380 exit(1); 380 exit(1);
381 } 381 }
382 382
383 /* Print out information about our surfaces */
384 printf("Screen is at %d bits per pixel\n",screen->format->BitsPerPixel);
385 if ( (screen->flags & SDL_HWSURFACE) == SDL_HWSURFACE ) {
386 printf("Screen is in video memory\n");
387 } else {
388 printf("Screen is in system memory\n");
389 }
390 if ( (screen->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF ) {
391 printf("Screen has double-buffering enabled\n");
392 }
393 if ( (sprite->flags & SDL_HWSURFACE) == SDL_HWSURFACE ) {
394 printf("Sprite is in video memory\n");
395 } else {
396 printf("Sprite is in system memory\n");
397 }
398
399 /* Run a sample blit to trigger blit acceleration */
400 { SDL_Rect dst;
401 dst.x = 0;
402 dst.y = 0;
403 dst.w = sprite->w;
404 dst.h = sprite->h;
405 SDL_BlitSurface(sprite, NULL, screen, &dst);
406 SDL_FillRect(screen, &dst, 0);
407 }
408 if ( (sprite->flags & SDL_HWACCEL) == SDL_HWACCEL ) {
409 printf("Sprite blit uses hardware alpha acceleration\n");
410 } else {
411 printf("Sprite blit dosn't uses hardware alpha acceleration\n");
412 }
413
383 /* Set a clipping rectangle to clip the outside edge of the screen */ 414 /* Set a clipping rectangle to clip the outside edge of the screen */
384 { SDL_Rect clip; 415 { SDL_Rect clip;
385 clip.x = 32; 416 clip.x = 32;
386 clip.y = 32; 417 clip.y = 32;
387 clip.w = screen->w-(2*32); 418 clip.w = screen->w-(2*32);