1
0
Fork 0

Tweaked fog command line options.

This commit is contained in:
curt 1998-06-13 00:40:32 +00:00
parent 28ceab0457
commit cc0925be18
2 changed files with 22 additions and 11 deletions

View 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.
//

View 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.