paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/test dblbuffer.cpp,1.4.2.6,1.4.2.7


From: Teunis Peters <address@hidden>
Subject: [paragui-cvs] CVS: paragui/test dblbuffer.cpp,1.4.2.6,1.4.2.7
Date: Thu, 31 Oct 2002 17:43:34 -0500

Update of /cvsroot/paragui/paragui/test
In directory subversions:/tmp/cvs-serv32725/test

Modified Files:
      Tag: devel-opengl
        dblbuffer.cpp 
Log Message:
A couple of OpenGL updates to remove some log info
and adding graphics loader to dblbuffer


Index: dblbuffer.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/dblbuffer.cpp,v
retrieving revision 1.4.2.6
retrieving revision 1.4.2.7
diff -C2 -r1.4.2.6 -r1.4.2.7
*** dblbuffer.cpp       30 Oct 2002 09:16:29 -0000      1.4.2.6
--- dblbuffer.cpp       31 Oct 2002 22:43:32 -0000      1.4.2.7
***************
*** 10,13 ****
--- 10,14 ----
  #include "pgtheme.h"
  #include "pgdraw.h"
+ #include "pgdriver.h"
  
  #include <ctime>
***************
*** 145,148 ****
--- 146,150 ----
  
        PG_Application& app = PG_Application::GetInstance();
+       PG_VideoDriver* gldriver = NULL;
  
        numsprites = NUM_SPRITES;
***************
*** 184,187 ****
--- 186,208 ----
                        videoflags ^= SDL_FULLSCREEN;
                } else
+ #ifdef HAVE_OPENGL
+               if(strcmp(argv[argc], "-gl") == 0) {
+                 fprintf(stderr, "Initializing OpenGL driver\n");
+                 gldriver = new PG_VideoDriver(app, PG_GLVIDEO);
+               } else
+ #endif
+ 
+ #ifdef HAVE_DUMMYVIDEO
+               if(strcmp(argv[argc], "-dummy") == 0) {
+                 fprintf(stderr, "Initializing Dummy driver\n");
+                 gldriver = new PG_VideoDriver(app, PG_DUMMYVIDEO);
+               } else
+ #endif
+ #ifdef HAVE_DIRECTX
+               if(strcmp(argv[argc], "-DX") == 0) {
+                 fprintf(stderr, "Initializing DirectX driver\n");
+                 gldriver = new PG_VideoDriver(app, PG_DXVIDEO);
+               }
+ #endif
                if ( isdigit(argv[argc][0]) ) {
                        numsprites = atoi(argv[argc]);
***************
*** 193,196 ****
--- 214,226 ----
                }
        }
+       if (gldriver != NULL) {
+         if (gldriver->valid()) {
+           fprintf(stderr, "Initializing provided graphics driver\n");
+           gldriver->attach();
+         } else {
+           fprintf(stderr, "graphics driver failed to initialize! - 
Quitting...");
+           return -1;
+         };
+       };
  
        /* Set video mode */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]