]> git.mxchange.org Git - flightgear.git/blob - Main/GLUTmain.c
Tweaked time of day lighting equations. Don't draw stars during the day.
[flightgear.git] / Main / GLUTmain.c
1 /**************************************************************************
2  * GLUTmain.c -- top level sim routines
3  *
4  * Written by Curtis Olson for OpenGL, started May 1997.
5  *
6  * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of the
11  * License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  *
22  * $Id$
23  * (Log is kept at end of this file)
24  **************************************************************************/
25
26
27 #ifdef WIN32
28 #  include <windows.h>                     
29 #endif
30
31 #include <GL/glut.h>
32 #include <stdio.h>
33
34 #include "GLUTkey.h"
35 #include "fg_init.h"
36 #include "views.h"
37
38 #include "../constants.h"
39 #include "../general.h"
40
41 #include "../Aircraft/aircraft.h"
42 #include "../Cockpit/cockpit.h"
43 #include "../Joystick/joystick.h"
44 #include "../Math/fg_geodesy.h"
45 #include "../Math/mat3.h"
46 #include "../Math/polar.h"
47 #include "../Scenery/mesh.h"
48 #include "../Scenery/scenery.h"
49 #include "../Time/fg_time.h"
50 #include "../Time/fg_timer.h"
51 #include "../Time/sunpos.h"
52 #include "../Weather/weather.h"
53
54
55 /* This is a record containing all the info for the aircraft currently
56    being operated */
57 struct AIRCRAFT current_aircraft;
58
59 /* This is a record containing global housekeeping information */
60 struct GENERAL general;
61
62 /* This is a record containing current weather info */
63 struct WEATHER current_weather;
64
65 /* This is a record containing current view parameters */
66 struct VIEW current_view;
67
68 /* view parameters */
69 static GLfloat win_ratio = 1.0;
70
71 /* sun direction */
72 /* static GLfloat sun_vec[4] = {1.0, 0.0, 0.0, 0.0 }; */
73
74 /* if the 4th field is 0.0, this specifies a direction ... */
75 /* clear color (sky) */
76 static GLfloat fgClearColor[4] = {0.60, 0.60, 0.90, 1.0};
77 /* fog color */
78 static GLfloat fgFogColor[4] =   {0.65, 0.65, 0.85, 1.0};
79
80 /* temporary hack */
81 /* extern struct mesh *mesh_ptr; */
82 /* Function prototypes */
83 /* GLint fgSceneryCompile_OLD(); */
84 /* static void fgSceneryDraw_OLD(); */
85
86 /* pointer to scenery structure */
87 /* static GLint scenery, runway; */
88
89 double Simtime;
90
91 /* Another hack */
92 int use_signals = 0;
93
94 /* Yet another hack. This one used by the HUD code. Michele */
95 int show_hud;
96
97
98 /**************************************************************************
99  * fgInitVisuals() -- Initialize various GL/view parameters
100  **************************************************************************/
101
102 static void fgInitVisuals() {
103     struct fgTIME *t;
104     struct WEATHER *w;
105
106     t = &cur_time_params;
107     w = &current_weather;
108
109     glEnable( GL_DEPTH_TEST );
110     /* glFrontFace(GL_CW); */
111     glEnable( GL_CULL_FACE );
112
113     /* If enabled, normal vectors specified with glNormal are scaled
114        to unit length after transformation.  See glNormal. */
115     glEnable( GL_NORMALIZE );
116
117     glLightfv( GL_LIGHT0, GL_POSITION, t->sun_vec );
118     glEnable( GL_LIGHTING );
119     glEnable( GL_LIGHT0 );
120
121     glShadeModel( GL_FLAT ); /* glShadeModel( GL_SMOOTH ); */
122
123     glEnable( GL_FOG );
124     glFogi (GL_FOG_MODE, GL_LINEAR);
125     /* glFogf (GL_FOG_START, 1.0); */
126     glFogf (GL_FOG_END, w->visibility);
127     glFogfv (GL_FOG_COLOR, fgFogColor);
128     /* glFogf (GL_FOG_DENSITY, w->visibility); */
129     /* glHint (GL_FOG_HINT, GL_FASTEST); */
130
131     glClearColor(fgClearColor[0], fgClearColor[1], fgClearColor[2], 
132                  fgClearColor[3]);
133 }
134
135
136 /**************************************************************************
137  * Update the view volume, position, and orientation
138  **************************************************************************/
139
140 static void fgUpdateViewParams() {
141     struct FLIGHT *f;
142     struct fgTIME *t;
143     struct VIEW *v;
144     double x_2, x_4, x_8, x_10;
145     double ambient, diffuse, sky;
146     GLfloat color[4] = { 1.0, 1.0, 0.50, 1.0 };
147     GLfloat amb[3], diff[3], fog[4], clear[4];
148
149     f = &current_aircraft.flight;
150     t = &cur_time_params;
151     v = &current_view;
152
153     fgViewUpdate(f, v);
154
155     /* Tell GL we are about to modify the projection parameters */
156     glMatrixMode(GL_PROJECTION);
157     glLoadIdentity();
158     gluPerspective(60.0, 1.0/win_ratio, 1.0, 200000.0);
159
160     glMatrixMode(GL_MODELVIEW);
161     glLoadIdentity();
162     
163     /* set up our view volume */
164     gluLookAt(v->view_pos.x, v->view_pos.y, v->view_pos.z,
165               v->view_pos.x + v->view_forward[0], 
166               v->view_pos.y + v->view_forward[1], 
167               v->view_pos.z + v->view_forward[2],
168               v->view_up[0], v->view_up[1], v->view_up[2]);
169
170     /* set the sun position */
171     glLightfv( GL_LIGHT0, GL_POSITION, t->sun_vec );
172
173     /* calculate lighting parameters based on sun's relative angle to
174      * local up */
175     /* ya kind'a have to plot this to see the magic */
176
177     /* x = t->sun_angle^8 */
178     x_2 = t->sun_angle * t->sun_angle;
179     x_4 = x_2 * x_2;
180     x_8 = x_4 * x_4;
181     x_10 = x_8 * x_2;
182
183     ambient = 0.4 * pow(1.2, -x_10 / 30.0);
184
185     /* diffuse = 0.4 * cos(0.3 * x_2);
186     if ( t->sun_angle > FG_PI_2 + 0.05 ) {
187         diffuse = 0.0;
188     }
189     */
190
191     diffuse = ambient;
192
193     sky = 0.85 * pow(1.2, -x_8 / 20.0) + 0.15;
194
195     if ( ambient < 0.1 ) { ambient = 0.1; }
196     if ( diffuse < 0.0 ) { diffuse = 0.0; }
197
198     if ( sky < 0.0 ) { sky = 0.0; }
199
200     amb[0] = color[0] * ambient;
201     amb[1] = color[1] * ambient;
202     amb[2] = color[2] * ambient;
203
204     diff[0] = color[0] * diffuse;
205     diff[1] = color[1] * diffuse;
206     diff[2] = color[2] * diffuse;
207
208     /* set lighting parameters */
209     glLightfv(GL_LIGHT0, GL_AMBIENT, amb );
210     glLightfv(GL_LIGHT0, GL_DIFFUSE, diff );
211
212     /* set fog color */
213     fog[0] = fgFogColor[0] * (ambient + diffuse);
214     fog[1] = fgFogColor[1] * (ambient + diffuse);
215     fog[2] = fgFogColor[2] * (ambient + diffuse);
216     fog[3] = fgFogColor[3];
217     glFogfv (GL_FOG_COLOR, fog);
218
219     /* set sky color */
220     clear[0] = fgClearColor[0] * sky;
221     clear[1] = fgClearColor[1] * sky;
222     clear[2] = fgClearColor[2] * sky;
223     clear[3] = fgClearColor[3];
224     glClearColor(clear[0], clear[1], clear[2], clear[3]);
225 }
226
227
228 /**************************************************************************
229  * Update all Visuals (redraws anything graphics related)
230  **************************************************************************/
231
232 static void fgUpdateVisuals( void ) {
233     /* update view volume parameters */
234     fgUpdateViewParams();
235
236     glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
237
238     /* Tell GL we are switching to model view parameters */
239     glMatrixMode(GL_MODELVIEW);
240     /* glLoadIdentity(); */
241
242     /* draw scenery */
243     fgSceneryRender();
244
245     /* display HUD */
246     if( show_hud )
247         fgCockpitUpdate();
248
249     #ifdef GLUT
250       glutSwapBuffers();
251     #endif
252 }
253
254
255 /**************************************************************************
256  * Update internal time dependent calculations (i.e. flight model)
257  **************************************************************************/
258
259 void fgUpdateTimeDepCalcs(int multi_loop) {
260     struct FLIGHT *f;
261     struct fgTIME *t;
262     struct VIEW *v;
263     int i;
264
265     f = &current_aircraft.flight;
266     t = &cur_time_params;
267     v = &current_view;
268
269     /* update the flight model */
270     if ( multi_loop < 0 ) {
271         multi_loop = DEFAULT_MULTILOOP;
272     }
273
274     /* printf("updating flight model x %d\n", multi_loop); */
275     fgFlightModelUpdate(FG_LARCSIM, f, multi_loop);
276
277     /* refresh shared sun position and sun_vec */
278     fgUpdateSunPos(scenery.center);
279
280     /* update the view angle */
281     for ( i = 0; i < multi_loop; i++ ) {
282         if ( fabs(v->goal_view_offset - v->view_offset) < 0.05 ) {
283             v->view_offset = v->goal_view_offset;
284             break;
285         } else {
286             /* move v->view_offset towards v->goal_view_offset */
287             if ( v->goal_view_offset > v->view_offset ) {
288                 if ( v->goal_view_offset - v->view_offset < FG_PI ) {
289                     v->view_offset += 0.01;
290                 } else {
291                     v->view_offset -= 0.01;
292                 }
293             } else {
294                 if ( v->view_offset - v->goal_view_offset < FG_PI ) {
295                     v->view_offset -= 0.01;
296                 } else {
297                     v->view_offset += 0.01;
298                 }
299             }
300             if ( v->view_offset > FG_2PI ) {
301                 v->view_offset -= FG_2PI;
302             } else if ( v->view_offset < 0 ) {
303                 v->view_offset += FG_2PI;
304             }
305         }
306     }
307 }
308
309
310 void fgInitTimeDepCalcs() {
311     /* initialize timer */
312
313 #ifdef USE_ITIMER
314     fgTimerInit( 1.0 / DEFAULT_TIMER_HZ, fgUpdateTimeDepCalcs );
315 #endif USE_ITIMER
316
317 }
318
319
320 /**************************************************************************
321  * Scenery management routines
322  **************************************************************************/
323
324 /* static void fgSceneryInit_OLD() { */
325     /* make scenery */
326 /*     scenery = fgSceneryCompile_OLD();
327     runway = fgRunwayHack_OLD(0.69, 53.07);
328 } */
329
330
331 /* create the scenery */
332 /* GLint fgSceneryCompile_OLD() {
333     GLint scenery;
334
335     scenery = mesh2GL(mesh_ptr_OLD);
336
337     return(scenery);
338 }
339 */
340
341 /* hack in a runway */
342 /* GLint fgRunwayHack_OLD(double width, double length) {
343     static GLfloat concrete[4] = { 0.5, 0.5, 0.5, 1.0 };
344     static GLfloat line[4]     = { 0.9, 0.9, 0.9, 1.0 };
345     int i;
346     int num_lines = 16;
347     float line_len, line_width_2, cur_pos;
348
349     runway = glGenLists(1);
350     glNewList(runway, GL_COMPILE);
351     */
352     /* draw concrete */
353 /*    glBegin(GL_POLYGON);
354     glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, concrete );
355     glNormal3f(0.0, 0.0, 1.0);
356
357     glVertex3d( 0.0,   -width/2.0, 0.0);
358     glVertex3d( 0.0,    width/2.0, 0.0);
359     glVertex3d(length,  width/2.0, 0.0);
360     glVertex3d(length, -width/2.0, 0.0);
361     glEnd();
362     */
363     /* draw center line */
364 /*    glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, line );
365     line_len = length / ( 2 * num_lines + 1);
366     printf("line_len = %.3f\n", line_len);
367     line_width_2 = 0.02;
368     cur_pos = line_len;
369     for ( i = 0; i < num_lines; i++ ) {
370         glBegin(GL_POLYGON);
371         glVertex3d( cur_pos, -line_width_2, 0.005);
372         glVertex3d( cur_pos,  line_width_2, 0.005);
373         cur_pos += line_len;
374         glVertex3d( cur_pos,  line_width_2, 0.005);
375         glVertex3d( cur_pos, -line_width_2, 0.005);
376         cur_pos += line_len;
377         glEnd();
378     }
379
380     glEndList();
381
382     return(runway);
383 }
384 */
385
386 /* draw the scenery */
387 /*static void fgSceneryDraw_OLD() {
388     static float z = 32.35;
389
390     glPushMatrix();
391
392     glCallList(scenery);
393
394     printf("*** Drawing runway at %.2f\n", z);
395
396     glTranslatef( -398391.28, 120070.41, 32.35);
397     glRotatef(170.0, 0.0, 0.0, 1.0);
398     glCallList(runway);
399
400     glPopMatrix();
401 }
402 */
403
404 /* What should we do when we have nothing else to do?  How about get
405  * ready for the next move and update the display? */
406 static void fgMainLoop( void ) {
407     static int remainder = 0;
408     int elapsed, multi_loop;
409     double cur_elev;
410     double joy_x, joy_y;
411     int joy_b1, joy_b2;
412     struct AIRCRAFT *a;
413     struct FLIGHT *f;
414     struct fgTIME *t;
415
416     a = &current_aircraft;
417     f = &a->flight;
418     t = &cur_time_params;
419
420     /* update "time" */
421     fgTimeUpdate(f, t);
422
423     /* Read joystick */
424     /* fgJoystickRead( &joy_x, &joy_y, &joy_b1, &joy_b2 );
425     printf( "Joystick X %f  Y %f  B1 %d  B2 %d\n",  
426             joy_x, joy_y, joy_b1, joy_b2 );
427     fgElevSet( -joy_y );
428     fgAileronSet( joy_x ); */
429
430     /* update the weather for our current position */
431     fgWeatherUpdate(FG_Longitude * RAD_TO_ARCSEC, 
432                     FG_Latitude * RAD_TO_ARCSEC, 
433                     FG_Altitude * FEET_TO_METER);
434
435     /* Calculate model iterations needed */
436     elapsed = fgGetTimeInterval();
437     printf("Time interval is = %d, previous remainder is = %d\n", elapsed, 
438            remainder);
439     printf("--> Frame rate is = %.2f\n", 1000.0 / (float)elapsed);
440     elapsed += remainder;
441
442     multi_loop = ((float)elapsed * 0.001) * DEFAULT_MODEL_HZ;
443     remainder = elapsed - ((multi_loop*1000) / DEFAULT_MODEL_HZ);
444     printf("Model iterations needed = %d, new remainder = %d\n", multi_loop, 
445            remainder);
446
447     if ( ! use_signals ) {
448         /* flight model */
449         fgUpdateTimeDepCalcs(multi_loop);
450     }
451
452     /* I'm just sticking this here for now, it should probably move 
453      * eventually */
454     cur_elev = mesh_altitude(FG_Longitude * RAD_TO_ARCSEC, 
455                                FG_Latitude  * RAD_TO_ARCSEC);
456     printf("Ground elevation is %.2f meters here.\n", cur_elev);
457     /* FG_Runway_altitude = cur_elev * METER_TO_FEET; */
458
459     if ( FG_Altitude * FEET_TO_METER < cur_elev + 3.758099) {
460         /* set this here, otherwise if we set runway height above our
461            current height we get a really nasty bounce. */
462         FG_Runway_altitude = FG_Altitude - 3.758099;
463
464         /* now set aircraft altitude above ground */
465         FG_Altitude = cur_elev * METER_TO_FEET + 3.758099;
466         printf("<*> resetting altitude to %.0f meters\n", 
467                FG_Altitude * FEET_TO_METER);
468     }
469
470     fgAircraftOutputCurrent(a);
471
472     /* redraw display */
473     fgUpdateVisuals();
474 }
475
476
477 /**************************************************************************
478  * Handle new window size or exposure
479  **************************************************************************/
480
481 static void fgReshape( int width, int height ) {
482     /* Do this so we can call fgReshape(0,0) ourselves without having to know
483      * what the values of width & height are. */
484     if ( (height > 0) && (width > 0) ) {
485         win_ratio = (GLfloat) height / (GLfloat) width;
486     }
487
488     /* Inform gl of our view window size */
489     glViewport(0, 0, (GLint)width, (GLint)height);
490
491     fgUpdateViewParams();
492     
493     glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
494 }
495
496
497 /**************************************************************************
498  * Main ...
499  **************************************************************************/
500
501 int main( int argc, char *argv[] ) {
502     struct FLIGHT *f;
503
504     f = &current_aircraft.flight;
505
506     printf("Flight Gear: prototype version %s\n\n", VERSION);
507
508     /**********************************************************************
509      * Initialize the Window/Graphics environment.
510      **********************************************************************/
511
512     #ifdef GLUT
513       /* initialize GLUT */
514       glutInit(&argc, argv);
515
516       /* Define Display Parameters */
517       glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
518
519       /* Define initial window size */
520       glutInitWindowSize(640, 480);
521
522       /* Initialize windows */
523       glutCreateWindow("Flight Gear");
524     #endif
525
526     /* This is the general house keeping init routine */
527     fgInitGeneral();
528
529     /* This is the top level init routine which calls all the other
530      * subsystem initialization routines.  If you are adding a
531      * subsystem to flight gear, its initialization call should
532      * located in this routine.*/
533     fgInitSubsystems();
534
535     /* setup view parameters, only makes GL calls */
536     fgInitVisuals();
537
538     if ( use_signals ) {
539         /* init timer routines, signals, etc.  Arrange for an alarm
540            signal to be generated, etc. */
541         fgInitTimeDepCalcs();
542     }
543
544    /**********************************************************************
545      * Initialize the Event Handlers.
546      **********************************************************************/
547
548     #ifdef GLUT
549       /* call fgReshape() on window resizes */
550       glutReshapeFunc( fgReshape );
551
552       /* call key() on keyboard event */
553       glutKeyboardFunc( GLUTkey );
554       glutSpecialFunc( GLUTspecialkey );
555
556       /* call fgMainLoop() whenever there is nothing else to do */
557       glutIdleFunc( fgMainLoop );
558
559       /* draw the scene */
560       glutDisplayFunc( fgUpdateVisuals );
561
562       /* pass control off to the GLUT event handler */
563       glutMainLoop();
564     #endif
565
566     return(0);
567 }
568
569
570 #ifdef NO_PRINTF
571   #include <stdarg.h>
572   int printf (const char *format, ...) {
573   }
574 #endif
575
576
577 /* $Log$
578 /* Revision 1.18  1997/09/16 22:14:51  curt
579 /* Tweaked time of day lighting equations.  Don't draw stars during the day.
580 /*
581  * Revision 1.17  1997/09/16 15:50:29  curt
582  * Working on star alignment and time issues.
583  *
584  * Revision 1.16  1997/09/13 02:00:06  curt
585  * Mostly working on stars and generating sidereal time for accurate star
586  * placement.
587  *
588  * Revision 1.15  1997/09/05 14:17:27  curt
589  * More tweaking with stars.
590  *
591  * Revision 1.14  1997/09/05 01:35:53  curt
592  * Working on getting stars right.
593  *
594  * Revision 1.13  1997/09/04 02:17:34  curt
595  * Shufflin' stuff.
596  *
597  * Revision 1.12  1997/08/27 21:32:24  curt
598  * Restructured view calculation code.  Added stars.
599  *
600  * Revision 1.11  1997/08/27 03:30:16  curt
601  * Changed naming scheme of basic shared structures.
602  *
603  * Revision 1.10  1997/08/25 20:27:22  curt
604  * Merged in initial HUD and Joystick code.
605  *
606  * Revision 1.9  1997/08/22 21:34:39  curt
607  * Doing a bit of reorganizing and house cleaning.
608  *
609  * Revision 1.8  1997/08/19 23:55:03  curt
610  * Worked on better simulating real lighting.
611  *
612  * Revision 1.7  1997/08/16 12:22:38  curt
613  * Working on improving the lighting/shading.
614  *
615  * Revision 1.6  1997/08/13 20:24:56  curt
616  * Changes due to changing sunpos interface.
617  *
618  * Revision 1.5  1997/08/06 21:08:32  curt
619  * Sun position now *really* works (I think) ... I still have sun time warping
620  * code in place, probably should remove it soon.
621  *
622  * Revision 1.4  1997/08/06 15:41:26  curt
623  * Working on correct sun position.
624  *
625  * Revision 1.3  1997/08/06 00:24:22  curt
626  * Working on correct real time sun lighting.
627  *
628  * Revision 1.2  1997/08/04 20:25:15  curt
629  * Organizational tweaking.
630  *
631  * Revision 1.1  1997/08/02 18:45:00  curt
632  * Renamed GLmain.c GLUTmain.c
633  *
634  * Revision 1.43  1997/08/02 16:23:47  curt
635  * Misc. tweaks.
636  *
637  * Revision 1.42  1997/08/01 19:43:33  curt
638  * Making progress with coordinate system overhaul.
639  *
640  * Revision 1.41  1997/07/31 22:52:37  curt
641  * Working on redoing internal coordinate systems & scenery transformations.
642  *
643  * Revision 1.40  1997/07/30 16:12:42  curt
644  * Moved fg_random routines from Util/ to Math/
645  *
646  * Revision 1.39  1997/07/21 14:45:01  curt
647  * Minor tweaks.
648  *
649  * Revision 1.38  1997/07/19 23:04:47  curt
650  * Added an initial weather section.
651  *
652  * Revision 1.37  1997/07/19 22:34:02  curt
653  * Moved PI definitions to ../constants.h
654  * Moved random() stuff to ../Utils/ and renamed fg_random()
655  *
656  * Revision 1.36  1997/07/18 23:41:25  curt
657  * Tweaks for building with Cygnus Win32 compiler.
658  *
659  * Revision 1.35  1997/07/18 14:28:34  curt
660  * Hacked in some support for wind/turbulence.
661  *
662  * Revision 1.34  1997/07/16 20:04:48  curt
663  * Minor tweaks to aid Win32 port.
664  *
665  * Revision 1.33  1997/07/12 03:50:20  curt
666  * Added an #include <Windows32/Base.h> to help compiling for Win32
667  *
668  * Revision 1.32  1997/07/11 03:23:18  curt
669  * Solved some scenery display/orientation problems.  Still have a positioning
670  * (or transformation?) problem.
671  *
672  * Revision 1.31  1997/07/11 01:29:58  curt
673  * More tweaking of terrian floor.
674  *
675  * Revision 1.30  1997/07/10 04:26:37  curt
676  * We now can interpolated ground elevation for any position in the grid.  We
677  * can use this to enforce a "hard" ground.  We still need to enforce some
678  * bounds checking so that we don't try to lookup data points outside the
679  * grid data set.
680  *
681  * Revision 1.29  1997/07/09 21:31:12  curt
682  * Working on making the ground "hard."
683  *
684  * Revision 1.28  1997/07/08 18:20:12  curt
685  * Working on establishing a hard ground.
686  *
687  * Revision 1.27  1997/07/07 20:59:49  curt
688  * Working on scenery transformations to enable us to fly fluidly over the
689  * poles with no discontinuity/distortion in scenery.
690  *
691  * Revision 1.26  1997/07/05 20:43:34  curt
692  * renamed mat3 directory to Math so we could add other math related routines.
693  *
694  * Revision 1.25  1997/06/29 21:19:17  curt
695  * Working on scenery management system.
696  *
697  * Revision 1.24  1997/06/26 22:14:53  curt
698  * Beginning work on a scenery management system.
699  *
700  * Revision 1.23  1997/06/26 19:08:33  curt
701  * Restructuring make, adding automatic "make dep" support.
702  *
703  * Revision 1.22  1997/06/25 15:39:47  curt
704  * Minor changes to compile with rsxnt/win32.
705  *
706  * Revision 1.21  1997/06/22 21:44:41  curt
707  * Working on intergrating the VRML (subset) parser.
708  *
709  * Revision 1.20  1997/06/21 17:12:53  curt
710  * Capitalized subdirectory names.
711  *
712  * Revision 1.19  1997/06/18 04:10:31  curt
713  * A couple more runway tweaks ...
714  *
715  * Revision 1.18  1997/06/18 02:21:24  curt
716  * Hacked in a runway
717  *
718  * Revision 1.17  1997/06/17 16:51:58  curt
719  * Timer interval stuff now uses gettimeofday() instead of ftime()
720  *
721  * Revision 1.16  1997/06/17 04:19:16  curt
722  * More timer related tweaks with respect to view direction changes.
723  *
724  * Revision 1.15  1997/06/17 03:41:10  curt
725  * Nonsignal based interval timing is now working.
726  * This would be a good time to look at cleaning up the code structure a bit.
727  *
728  * Revision 1.14  1997/06/16 19:32:51  curt
729  * Starting to add general timer support.
730  *
731  * Revision 1.13  1997/06/02 03:40:06  curt
732  * A tiny bit more view tweaking.
733  *
734  * Revision 1.12  1997/06/02 03:01:38  curt
735  * Working on views (side, front, back, transitions, etc.)
736  *
737  * Revision 1.11  1997/05/31 19:16:25  curt
738  * Elevator trim added.
739  *
740  * Revision 1.10  1997/05/31 04:13:52  curt
741  * WE CAN NOW FLY!!!
742  *
743  * Continuing work on the LaRCsim flight model integration.
744  * Added some MSFS-like keyboard input handling.
745  *
746  * Revision 1.9  1997/05/30 19:27:01  curt
747  * The LaRCsim flight model is starting to look like it is working.
748  *
749  * Revision 1.8  1997/05/30 03:54:10  curt
750  * Made a bit more progress towards integrating the LaRCsim flight model.
751  *
752  * Revision 1.7  1997/05/29 22:39:49  curt
753  * Working on incorporating the LaRCsim flight model.
754  *
755  * Revision 1.6  1997/05/29 12:31:39  curt
756  * Minor tweaks, moving towards general flight model integration.
757  *
758  * Revision 1.5  1997/05/29 02:33:23  curt
759  * Updated to reflect changing interfaces in other "modules."
760  *
761  * Revision 1.4  1997/05/27 17:44:31  curt
762  * Renamed & rearranged variables and routines.   Added some initial simple
763  * timer/alarm routines so the flight model can be updated on a regular 
764  * interval.
765  *
766  * Revision 1.3  1997/05/23 15:40:25  curt
767  * Added GNU copyright headers.
768  * Fog now works!
769  *
770  * Revision 1.2  1997/05/23 00:35:12  curt
771  * Trying to get fog to work ...
772  *
773  * Revision 1.1  1997/05/21 15:57:51  curt
774  * Renamed due to added GLUT support.
775  *
776  * Revision 1.3  1997/05/19 18:22:42  curt
777  * Parameter tweaking ... starting to stub in fog support.
778  *
779  * Revision 1.2  1997/05/17 00:17:34  curt
780  * Trying to stub in support for standard OpenGL.
781  *
782  * Revision 1.1  1997/05/16 16:05:52  curt
783  * Initial revision.
784  *
785  */