+
//
// GLUTmain.cxx -- top level sim routines
//
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
xglShadeModel( GL_FLAT );
}
xglEnable( GL_DEPTH_TEST );
- if ( o->fog ) {
+ if ( o->fog > 0 ) {
xglEnable( GL_FOG );
xglFogfv (GL_FOG_COLOR, l->fog_color);
}
// $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.
//
hud_status = 0;
// Rendering options
- fog = 1;
+ fog = 2; // nicest
fov = 65.0;
fullscreen = 0;
shading = 1;
} 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 ) {
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");
// $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.