]> git.mxchange.org Git - flightgear.git/blobdiff - Main/GLUTmain.c
Merged in make system changes from Bob Kuehne <rpk@sgi.com>
[flightgear.git] / Main / GLUTmain.c
index fe3fc150bd7006816692775c87abd2095847ff98..4776739188f90e452f3454715564c91d5cf8f628 100644 (file)
 #endif
 
 #include <GL/glut.h>
-#include "../XGL/xgl.h"
+#include <XGL/xgl.h>
 #include <stdio.h>
 
-#include "GLUTkey.h"
-#include "fg_init.h"
-#include "views.h"
-
-#include "../Include/constants.h"
-#include "../Include/general.h"
-
-#include "../Aircraft/aircraft.h"
-#include "../Cockpit/cockpit.h"
-#include "../Joystick/joystick.h"
-#include "../Math/fg_geodesy.h"
-#include "../Math/mat3.h"
-#include "../Math/polar.h"
-#include "../Scenery/mesh.h"
-#include "../Scenery/moon.h"
-#include "../Scenery/scenery.h"
-#include "../Scenery/sky.h"
-#include "../Scenery/stars.h"
-#include "../Scenery/sun.h"
-#include "../Time/event.h"
-#include "../Time/fg_time.h"
-#include "../Time/fg_timer.h"
-#include "../Time/sunpos.h"
-#include "../Weather/weather.h"
+#include <Main/GLUTkey.h>
+#include <Main/fg_init.h>
+#include <Main/views.h>
+
+#include <Include/constants.h>
+#include <Include/general.h>
+
+#include <Aircraft/aircraft.h>
+#include <Astro/moon.h>
+#include <Astro/sky.h>
+#include <Astro/stars.h>
+#include <Astro/sun.h>
+#include <Cockpit/cockpit.h>
+#include <Joystick/joystick.h>
+#include <Math/fg_geodesy.h>
+#include <Math/mat3.h>
+#include <Math/polar.h>
+#include <Scenery/mesh.h>
+#include <Scenery/scenery.h>
+#include <Scenery/tilemgr.h>
+#include <Time/event.h>
+#include <Time/fg_time.h>
+#include <Time/fg_timer.h>
+#include <Time/sunpos.h>
+#include <Weather/weather.h>
 
 
 /* This is a record containing global housekeeping information */
@@ -69,7 +70,7 @@ static GLint winWidth, winHeight;
 /* pointer to scenery structure */
 /* static GLint scenery, runway; */
 
-double Simtime;
+/* double Simtime; */
 
 /* Another hack */
 int use_signals = 0;
@@ -85,7 +86,7 @@ int displayInstruments;
  * fgInitVisuals() -- Initialize various GL/view parameters
  **************************************************************************/
 
-static void fgInitVisuals() {
+static void fgInitVisuals( void ) {
     struct fgLIGHT *l;
     struct fgTIME *t;
     struct fgWEATHER *w;
@@ -110,6 +111,9 @@ static void fgInitVisuals() {
     xglFogf (GL_FOG_END, w->visibility);
     /* xglFogf (GL_FOG_DENSITY, w->visibility); */
     xglHint (GL_FOG_HINT, GL_NICEST /* GL_FASTEST */ );
+
+    /* draw wire frame */
+    /* xglPolygonMode(GL_FRONT_AND_BACK,GL_LINE); */
 }
 
 
@@ -117,7 +121,7 @@ static void fgInitVisuals() {
  * Update the view volume, position, and orientation
  **************************************************************************/
 
-static void fgUpdateViewParams() {
+static void fgUpdateViewParams( void ) {
     struct fgFLIGHT *f;
     struct fgLIGHT *l;
     struct fgTIME *t;
@@ -179,7 +183,7 @@ static void fgUpdateViewParams() {
 /*************************************************************************
  * Draw a basic instrument panel
  ************************************************************************/
-static void fgUpdateInstrViewParams() {
+static void fgUpdateInstrViewParams( void ) {
     xglViewport(0, 0 , (GLint)winWidth, (GLint)winHeight / 2);
   
     xglMatrixMode(GL_PROJECTION);
@@ -282,7 +286,8 @@ static void fgRenderFrame( void ) {
     /* set lighting parameters */
     xglLightfv(GL_LIGHT0, GL_AMBIENT, l->scene_ambient );
     xglLightfv(GL_LIGHT0, GL_DIFFUSE, l->scene_diffuse );
-    fgSceneryRender();
+    fgTileMgrRender();
+    /* fgSceneryRender(); */
 
     /* display HUD */
     if( show_hud ) {
@@ -352,7 +357,7 @@ void fgUpdateTimeDepCalcs(int multi_loop) {
 }
 
 
-void fgInitTimeDepCalcs() {
+void fgInitTimeDepCalcs( void ) {
     /* initialize timer */
 
 #ifdef USE_ITIMER
@@ -512,7 +517,10 @@ static void fgMainLoop( void ) {
               FG_Altitude * FEET_TO_METER);
     }
 
-    /* fgAircraftOutputCurrent(a); */
+    fgAircraftOutputCurrent(a);
+
+    /* see if we need to load any new scenery tiles */
+    /* fgTileMgrUpdate(); */
 
     /* Process/manage pending events */
     fgEventProcess();
@@ -622,15 +630,35 @@ int main( int argc, char *argv[] ) {
 
 #ifdef NO_PRINTF
   #include <stdarg.h>
-  int printf (const char *format, ...) {
-  }
+  int printf (const char *format, ...) {}
 #endif
 
 
 /* $Log$
-/* Revision 1.44  1997/12/30 22:22:31  curt
-/* Further integration of event manager.
+/* Revision 1.50  1998/01/19 19:27:07  curt
+/* Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+/* This should simplify things tremendously.
 /*
+ * Revision 1.49  1998/01/19 18:40:31  curt
+ * Tons of little changes to clean up the code and to remove fatal errors
+ * when building with the c++ compiler.
+ *
+ * Revision 1.48  1998/01/19 18:35:46  curt
+ * Minor tweaks and fixes for cygwin32.
+ *
+ * Revision 1.47  1998/01/13 00:23:08  curt
+ * Initial changes to support loading and management of scenery tiles.  Note,
+ * there's still a fair amount of work left to be done.
+ *
+ * Revision 1.46  1998/01/08 02:22:06  curt
+ * Beginning to integrate Tile management subsystem.
+ *
+ * Revision 1.45  1998/01/07 03:18:55  curt
+ * Moved astronomical stuff from .../Src/Scenery to .../Src/Astro/
+ *
+ * Revision 1.44  1997/12/30 22:22:31  curt
+ * Further integration of event manager.
+ *
  * Revision 1.43  1997/12/30 20:47:43  curt
  * Integrated new event manager with subsystem initializations.
  *