]> git.mxchange.org Git - flightgear.git/commitdiff
Re-enable glut game mode for now
authorandy <andy>
Thu, 1 Apr 2004 15:44:13 +0000 (15:44 +0000)
committerandy <andy>
Thu, 1 Apr 2004 15:44:13 +0000 (15:44 +0000)
src/Main/fg_os.cxx
src/Main/fg_os.hxx
src/Main/main.cxx

index 6e0d96babe3926c7992cccd17232452a0696c138..4a1eb9c0fbb9c1c578c7336b17ff7bfa6bf03ee2 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <plib/pu.h>
 
+#include "fg_props.hxx"
 #include "fg_os.hxx"
 
 //
@@ -176,14 +177,21 @@ void fgRequestRedraw()
     glutPostRedisplay();
 }
 
-void fgOSOpenWindow(int w, int h, bool alpha)
+void fgOSOpenWindow(int w, int h, int bpp, bool alpha)
 {
     int mode = GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE;
     if(alpha) mode |= GLUT_ALPHA;
 
     glutInitDisplayMode(mode);
     glutInitWindowSize(w, h);
-    glutCreateWindow("FlightGear");
+    if(!fgGetBool("/sim/startup/game-mode")) {
+        glutCreateWindow("FlightGear");
+    } else {
+        char game_mode_str[256];
+        sprintf(game_mode_str, "width=%d height=%d bpp=%d", w, h, bpp);
+        glutGameModeString( game_mode_str );
+        glutEnterGameMode();
+    }
 
     // Register these here.  Calling them before the window is open
     // crashes.
@@ -197,4 +205,5 @@ void fgOSOpenWindow(int w, int h, bool alpha)
     glutIdleFunc(GLUTidle);
     glutDisplayFunc(GLUTdraw);
     glutReshapeFunc(GLUTreshape);
+
 }
index 88525af7fe7bcc2f1fd68b7cddaff4eb8f963e3b..ba36a08795f89998a431cfd3a04c16d5d3397e7a 100644 (file)
@@ -38,7 +38,7 @@ enum { KEYMOD_NONE     = 0,
 //
 
 void fgOSInit(int* argc, char** argv);
-void fgOSOpenWindow(int w, int h, bool alpha);
+void fgOSOpenWindow(int w, int h, int bpp, bool alpha);
 void fgOSFullScreen();
 void fgOSMainLoop();
 
index bef1862549afd080627d8a2384054b3e3ea7e991..2cbc135380e86bb1fc4991cb10211d03e34d359e 100644 (file)
@@ -1412,6 +1412,7 @@ bool fgMainInit( int argc, char **argv ) {
     // Clouds3D requires an alpha channel
     fgOSOpenWindow( fgGetInt("/sim/startup/xsize"),
                     fgGetInt("/sim/startup/ysize"),
+                    fgGetInt("/sim/rendering/bits-per-pixel"),
                     fgGetBool("/sim/rendering/clouds3d") );
 
     // This seems to be the absolute earliest in the init sequence