]> git.mxchange.org Git - flightgear.git/commitdiff
Tweaked fog command line options.
authorcurt <curt>
Sat, 13 Jun 1998 00:40:32 +0000 (00:40 +0000)
committercurt <curt>
Sat, 13 Jun 1998 00:40:32 +0000 (00:40 +0000)
Main/GLUTmain.cxx
Main/options.cxx

index 5ffe464e1784e95a789b352920303c33b5e3db8c..b80378d166a928730887ea04bd74cece80d0a1cf 100644 (file)
@@ -1,3 +1,4 @@
+
 //
 // GLUTmain.cxx -- top level sim routines
 //
@@ -141,13 +142,14 @@ static void fgInitVisuals( void ) {
     xglLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
 
     // xglFogi (GL_FOG_MODE, GL_LINEAR);
-    xglFogi (GL_FOG_MODE, GL_EXP);
+    xglFogi (GL_FOG_MODE, GL_EXP2);
     // Fog density is now set when the weather system is initialized
     // xglFogf (GL_FOG_DENSITY, w->fog_density);
-    if ( o->shading ) {
-       xglHint (GL_FOG_HINT, GL_NICEST );
-    } else {
+    if ( (o->fog == 1) || (o->shading == 0) ) {
+       // if fastest fog requested, or if flat shading force fastest
        xglHint (GL_FOG_HINT, GL_FASTEST );
+    } else if ( o->fog == 2 ) {
+       xglHint (GL_FOG_HINT, GL_NICEST );
     }
     if ( o->wireframe ) {
        // draw wire frame
@@ -352,7 +354,7 @@ static void fgRenderFrame( void ) {
        xglShadeModel( GL_FLAT ); 
     }
     xglEnable( GL_DEPTH_TEST );
-    if ( o->fog ) {
+    if ( o->fog > 0 ) {
        xglEnable( GL_FOG );
        xglFogfv (GL_FOG_COLOR, l->fog_color);
     }
@@ -750,6 +752,9 @@ int main( int argc, char **argv ) {
 
 
 // $Log$
+// Revision 1.26  1998/06/13 00:40:32  curt
+// Tweaked fog command line options.
+//
 // Revision 1.25  1998/06/12 14:27:26  curt
 // Pui -> PUI, Gui -> GUI.
 //
index 83883862365ded34b38afd41d0831a9eea9a4671..8e0894aa465a8088d0496a7c8a42dff3b115fe36 100644 (file)
@@ -71,7 +71,7 @@ fgOPTIONS::fgOPTIONS( void ) {
     hud_status = 0;
 
     // Rendering options
-    fog = 1;
+    fog = 2;    // nicest
     fov = 65.0;
     fullscreen = 0;
     shading = 1;
@@ -281,10 +281,12 @@ int fgOPTIONS::parse_option( char *arg ) {
     } else if ( strncmp(arg, "--fg-root=", 10) == 0 ) {
        arg += 10;
        strcpy(fg_root, arg);
-    } else if ( strcmp(arg, "--disable-fog") == 0 ) {
+    } else if ( strcmp(arg, "--fog-disable") == 0 ) {
        fog = 0;        
-    } else if ( strcmp(arg, "--enable-fog") == 0 ) {
+    } else if ( strcmp(arg, "--fog-fastest") == 0 ) {
        fog = 1;        
+    } else if ( strcmp(arg, "--fog-nicest") == 0 ) {
+       fog = 2;        
     } else if ( strncmp(arg, "--fov=", 6) == 0 ) {
        fov = parse_fov(arg);
     } else if ( strcmp(arg, "--disable-fullscreen") == 0 ) {
@@ -400,9 +402,10 @@ void fgOPTIONS::usage ( void ) {
     printf("\n");
 
     printf("Rendering Options:\n");
-    printf("\t--disable-fog:  disable fog/haze\n");
-    printf("\t--enable-fog:  enable fog/haze\n");
-    printf("\t--fov=xx.x:  specify the field of view angle in degrees\n");
+    printf("\t--fog-disable:  disable fog/haze\n");
+    printf("\t--fog-fastest:  enable fastest fog/haze\n");
+    printf("\t--fog-nicest:  enable nicest fog/haze\n");
+    printf("\t--fov=xx.x:  specify initial field of view angle in degrees\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");
@@ -430,6 +433,9 @@ fgOPTIONS::~fgOPTIONS( void ) {
 
 
 // $Log$
+// Revision 1.11  1998/06/13 00:40:33  curt
+// Tweaked fog command line options.
+//
 // Revision 1.10  1998/05/16 13:08:36  curt
 // C++ - ified views.[ch]xx
 // Shuffled some additional view parameters into the fgVIEW class.