]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui_local.cxx
Fix line endings
[flightgear.git] / src / GUI / gui_local.cxx
index 1342ce2f83516409c6534f5d2168b904e07508a2..0feed8a7e6f5dbdfff50c50d5035088e50c94707 100644 (file)
@@ -6,7 +6,6 @@
 #  include <windows.h>
 #endif
 
-#include <GL/glut.h>        // needed before pu.h
 #include <plib/pu.h>        // plib include
 
 #include <FDM/flight.hxx>
 #include <Main/globals.hxx>
 #include <Main/fg_init.hxx>
 #include <Main/fg_props.hxx>
+#include <Main/renderer.hxx>
 #include <Scenery/tilemgr.hxx>
 #include <Time/light.hxx>
 
 #include "gui.h"
 #include "trackball.h"
 
-// from main.cxx
-extern void fgReshape(int, int);
-
 // FOR MOUSE VIEW MODE
 // stashed trackball(_quat0, 0.0, 0.0, 0.0, 0.0);
 static float _quat0[4];
@@ -73,6 +70,9 @@ void reInit(puObject *cb)
 
     globals->restoreInitialState();
 
+    // update our position based on current presets
+    fgInitPosition();
+
     SGTime *t = globals->get_time_params();
     delete t;
     t = fgInitTime();
@@ -80,13 +80,10 @@ void reInit(puObject *cb)
 
     fgReInitSubsystems();
 
-    global_tile_mgr.update( fgGetDouble("/position/longitude-deg"),
-                            fgGetDouble("/position/latitude-deg"),
-                            fgGetDouble("/environment/visibility-m") );
-    
-    cur_light_params.Update();
+    globals->get_tile_mgr()->update( fgGetDouble("/environment/visibility-m") );
+    globals->get_renderer()->resize( xsize, ysize );
 
-    fgReshape( xsize, ysize );
+    fgSetBool("/sim/signals/reinit", true);
 
     // BusyCursor(1);