comparison test/testgl.c @ 320:66f815c147ed

Date: Thu, 28 Mar 2002 09:20:03 +0200 From: "Mike Gorchak" <mike@malva.ua> Subject: New QNX patch. Hi ! 1. Removed warning (possible bug) with invalid type, passing to the function in ph_WarpedMotion. 2. Rewritten handler of Ph_WM_RESIZE message, now works, but buggy (old handler doesn't work at all). 3. Added stub handler for Ph_WM_MAX (maximize) message. 4. Added more #ifdef HAVE_OPENGL to disable OpenGL stuff when it not needed. 5. Added support for SDL_NOFRAME and SDL_RESIZABLE flags (in OpenGL windows too). 6. Added cosmetic changes, if no SDL_RESIZABLE flag defined, disable resize handlers in window border and maximize button at caption. 7. Fixed my bug with invalid arguments count passed to PtCreateWidget call. 8. Fixed some palette problems. 9. Updated README.QNX file. And I changed testgl.c test application: 10. Added in testgl.c application support for SDL_NOFRAME flag and option -noframe.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 28 Mar 2002 16:20:10 +0000
parents cf4944faad96
children ca0b4ba5313e
comparison
equal deleted inserted replaced
319:189a6a3416c7 320:66f815c147ed
391 /* Show the image on the screen */ 391 /* Show the image on the screen */
392 SDL_UpdateRects(screen, 1, &dst); 392 SDL_UpdateRects(screen, 1, &dst);
393 } 393 }
394 394
395 int RunGLTest( int argc, char* argv[], 395 int RunGLTest( int argc, char* argv[],
396 int logo, int slowly, int bpp, float gamma ) 396 int logo, int slowly, int bpp, float gamma, int noframe )
397 { 397 {
398 int i; 398 int i;
399 int rgb_size[3]; 399 int rgb_size[3];
400 int w = 640; 400 int w = 640;
401 int h = 480; 401 int h = 480;
444 for ( i=1; argv[i]; ++i ) { 444 for ( i=1; argv[i]; ++i ) {
445 if ( strcmp(argv[1], "-fullscreen") == 0 ) { 445 if ( strcmp(argv[1], "-fullscreen") == 0 ) {
446 video_flags |= SDL_FULLSCREEN; 446 video_flags |= SDL_FULLSCREEN;
447 } 447 }
448 } 448 }
449
450 if (noframe) {
451 video_flags |= SDL_NOFRAME;
452 }
449 453
450 /* Initialize the display */ 454 /* Initialize the display */
451 switch (bpp) { 455 switch (bpp) {
452 case 8: 456 case 8:
453 rgb_size[0] = 2; 457 rgb_size[0] = 2;
684 int i, logo; 688 int i, logo;
685 int numtests; 689 int numtests;
686 int bpp = 0; 690 int bpp = 0;
687 int slowly; 691 int slowly;
688 float gamma = 0.0; 692 float gamma = 0.0;
693 int noframe = 0;
689 694
690 logo = 0; 695 logo = 0;
691 slowly = 0; 696 slowly = 0;
692 numtests = 1; 697 numtests = 1;
693 for ( i=1; argv[i]; ++i ) { 698 for ( i=1; argv[i]; ++i ) {
709 bpp = atoi(argv[++i]); 714 bpp = atoi(argv[++i]);
710 } 715 }
711 if ( strcmp(argv[i], "-gamma") == 0 ) { 716 if ( strcmp(argv[i], "-gamma") == 0 ) {
712 gamma = (float)atof(argv[++i]); 717 gamma = (float)atof(argv[++i]);
713 } 718 }
719 if ( strcmp(argv[i], "-noframe") == 0 ) {
720 noframe = 1;
721 }
714 if ( strncmp(argv[i], "-h", 2) == 0 ) { 722 if ( strncmp(argv[i], "-h", 2) == 0 ) {
715 printf( 723 printf(
716 "Usage: %s [-twice] [-logo] [-slow] [-bpp n] [-gamma n]\n", 724 "Usage: %s [-twice] [-logo] [-slow] [-bpp n] [-gamma n] [-noframe]\n",
717 argv[0]); 725 argv[0]);
718 exit(0); 726 exit(0);
719 } 727 }
720 } 728 }
721 for ( i=0; i<numtests; ++i ) { 729 for ( i=0; i<numtests; ++i ) {
722 RunGLTest(argc, argv, logo, slowly, bpp, gamma); 730 RunGLTest(argc, argv, logo, slowly, bpp, gamma, noframe);
723 } 731 }
724 return 0; 732 return 0;
725 } 733 }
726 734
727 #else /* HAVE_OPENGL */ 735 #else /* HAVE_OPENGL */