# include <windows.h>
#endif
-#include 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];
void reInit(puObject *cb)
{
- // BusyCursor(0);
Quat0();
static const SGPropertyNode *master_freeze
fgSetBool("/sim/freeze/master", true);
}
+ fgSetBool("/sim/signals/reinit", true);
cur_fdm_state->unbind();
// in case user has changed window size as
// update our position based on current presets
fgInitPosition();
+ // We don't know how to resize the window, so keep the last values
+ // for xsize and ysize, and don't use the one set initially
+ fgSetInt("/sim/startup/xsize",xsize);
+ fgSetInt("/sim/startup/ysize",ysize);
+
SGTime *t = globals->get_time_params();
delete t;
t = fgInitTime();
fgReInitSubsystems();
globals->get_tile_mgr()->update( fgGetDouble("/environment/visibility-m") );
-
- cur_light_params.Update();
-
- fgReshape( xsize, ysize );
+ globals->get_renderer()->resize( xsize, ysize );
+ fgSetBool("/sim/signals/reinit", false);
- // BusyCursor(1);
-
if ( !freeze ) {
fgSetBool("/sim/freeze/master", false);
}