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