]> git.mxchange.org Git - flightgear.git/commitdiff
Added an option to enable/disable full-screen mode.
authorcurt <curt>
Sun, 3 May 1998 00:47:31 +0000 (00:47 +0000)
committercurt <curt>
Sun, 3 May 1998 00:47:31 +0000 (00:47 +0000)
Main/GLUTmain.cxx
Main/fg_init.cxx
Main/options.cxx
Main/options.hxx

index 60909614213a22caa96fd017529462c7495c436b..637800d19191e430b449a9b47a349b89cd661fc0 100644 (file)
@@ -53,7 +53,7 @@
 #include <Joystick/joystick.h>
 #include <Math/fg_geodesy.h>
 #include <Math/mat3.h>
-#include <Math/polar.h>
+#include <Math/polar3d.h>
 #include <Scenery/scenery.hxx>
 #include <Scenery/tilemgr.hxx>
 #include <Time/event.hxx>
@@ -191,7 +191,10 @@ static void fgInitVisuals( void ) {
     o = &current_options;
     w = &current_weather;
 
-    // xglDisable( GL_DITHER );
+    // Go full screen if requested ...
+    if ( o->fullscreen ) {
+       glutFullScreen();
+    }
 
     // If enabled, normal vectors specified with glNormal are scaled
     // to unit length after transformation.  See glNormal.
@@ -607,6 +610,10 @@ static void fgReshape( int width, int height ) {
 
 // Initialize GLUT and define a main window
 int fgGlutInit( int argc, char **argv ) {
+    fgOPTIONS *o;
+
+    o = &current_options;
+
     // GLUT will extract all glut specific options so later on we only
     // need wory about our own.
     xglutInit(&argc, argv);
@@ -718,6 +725,9 @@ extern "C" {
 
 
 // $Log$
+// Revision 1.10  1998/05/03 00:47:31  curt
+// Added an option to enable/disable full-screen mode.
+//
 // Revision 1.9  1998/04/30 12:34:17  curt
 // Added command line rendering options:
 //   enable/disable fog/haze
index d345bef53bc1f54da7e4c4897a7195f38ae6637c..228626579cb879cee8d4308e594cf009979c23a8 100644 (file)
@@ -104,10 +104,10 @@ int fgInitPosition( void ) {
     // FG_Altitude = FG_Runway_altitude + 3.758099;
 
     // Initial Position at (SEZ) SEDONA airport
-    FG_Longitude = (-111.7884614 + 0.01) * DEG_TO_RAD;
-    FG_Latitude  = (  34.8486289 - 0.015) * DEG_TO_RAD;
-    FG_Runway_altitude = (4827 + 450);
-    FG_Altitude = FG_Runway_altitude + 3.758099;
+    // FG_Longitude = (-111.7884614 + 0.01) * DEG_TO_RAD;
+    // FG_Latitude  = (  34.8486289 - 0.015) * DEG_TO_RAD;
+    // FG_Runway_altitude = (4827 + 450);
+    // FG_Altitude = FG_Runway_altitude + 3.758099;
 
     // Initial Position: Somewhere near the Grand Canyon
     // FG_Longitude = ( -112.5 ) * DEG_TO_RAD;
@@ -381,6 +381,9 @@ int fgInitSubsystems( void ) {
 
 
 // $Log$
+// Revision 1.9  1998/05/03 00:47:31  curt
+// Added an option to enable/disable full-screen mode.
+//
 // Revision 1.8  1998/04/30 12:34:18  curt
 // Added command line rendering options:
 //   enable/disable fog/haze
index b104d2172ff0c0d36eb58834e470868055385773..fa04dda89f4fca5ccf236fbec43fb983c2c7c1d8 100644 (file)
@@ -52,6 +52,7 @@ fgOPTIONS::fgOPTIONS( void ) {
 
     // Rendering options
     fog = 1;
+    fullscreen = 0;
     shading = 1;
     skyblend = 1;
     textures = 1;
@@ -185,6 +186,10 @@ int fgOPTIONS::parse( int argc, char **argv ) {
            fog = 0;    
        } else if ( strcmp(argv[i], "--enable-fog") == 0 ) {
            fog = 1;    
+       } else if ( strcmp(argv[i], "--disable-fullscreen") == 0 ) {
+           fullscreen = 0;     
+       } else if ( strcmp(argv[i], "--enable-fullscreen") == 0 ) {
+           fullscreen = 1;     
        } else if ( strcmp(argv[i], "--shading-flat") == 0 ) {
            shading = 0;        
        } else if ( strcmp(argv[i], "--shading-smooth") == 0 ) {
@@ -235,6 +240,8 @@ void fgOPTIONS::usage ( void ) {
     printf("Rendering Options:\n");
     printf("\t--disable-fog:  disable fog/haze\n");
     printf("\t--enable-fog:  enable fog/haze\n");
+    printf("\t--disable-fullscreen:  disable fullscreen mode\n");
+    printf("\t--enable-fullscreen:  enable fullscreen mode\n");
     printf("\t--shading-flat:  enable flat shading\n");
     printf("\t--shading-smooth:  enable smooth shading\n");
     printf("\t--disable-skyblend:  disable sky blending\n");
@@ -256,6 +263,9 @@ fgOPTIONS::~fgOPTIONS( void ) {
 
 
 // $Log$
+// Revision 1.6  1998/05/03 00:47:32  curt
+// Added an option to enable/disable full-screen mode.
+//
 // Revision 1.5  1998/04/30 12:34:19  curt
 // Added command line rendering options:
 //   enable/disable fog/haze
index 46ce3d6a240543229135c0c628767cdbeb165951..6e23ddf47d8f2e485680e111e36f6584b7d52f43 100644 (file)
@@ -49,6 +49,7 @@ public:
 
     // Rendering options
     int fog;           // Fog enabled/disabled
+    int fullscreen;    // Full screen mode enabled/disabled
     int shading;       // shading method, 0 = Flat, 1 = Smooth
     int skyblend;      // Blend sky to haze (using polygons) or just clear
     int textures;      // Textures enabled/disabled
@@ -79,6 +80,9 @@ extern fgOPTIONS current_options;
 
 
 // $Log$
+// Revision 1.5  1998/05/03 00:47:32  curt
+// Added an option to enable/disable full-screen mode.
+//
 // Revision 1.4  1998/04/30 12:34:19  curt
 // Added command line rendering options:
 //   enable/disable fog/haze