preventing us from wiping properties on reset/reinit/subsystem recreate.
(more work required for "native_gui" and "ATC-Outputs" protocols)
int leg = 0;
+ trans_num = globals->get_props()->getNode("/sim/atc/transmission-num", true);
+
// find a reasonable controller for our user's aircraft..
// Let's start by working out the following three scenarios:
// Starting on ground at a parking position
//string airport = fgGetString("/sim/presets/airport-id");
//FGAirport *apt = FGAirport::findByIdent(airport);
// AT this stage we should update the flightplan, so that waypoint incrementing is conducted as well as leg loading.
- static SGPropertyNode_ptr trans_num = globals->get_props()->getNode("/sim/atc/transmission-num", true);
- int n = trans_num->getIntValue();
+ int n = trans_num->getIntValue();
if (n == 1) {
//cerr << "Toggling ground network visibility " << networkVisible << endl;
networkVisible = !networkVisible;
FGATCController *controller, *prevController; // The ATC controller that is responsible for the user's aircraft.
bool networkVisible;
bool initSucceeded;
+ SGPropertyNode_ptr trans_num;
public:
FGATCManager();
void update(double time);
};
-#endif // _ATC_MRG_HXX_
\ No newline at end of file
+#endif // _ATC_MRG_HXX_
} else {
_gui->showDialog(dialog_name);
}
- //dialogVisible = !dialogVisible;
- return;
- /*
- static SGPropertyNode_ptr trans_num = globals->get_props()->getNode("/sim/atc/transmission-num", true);
- int n = trans_num->getIntValue();
- if (n >= 0) {
- trans_num->setIntValue(-1);
- // PopupCallback(n);
- cerr << "Selected transmission message" << n << endl;
- } */
}
if ((msgDir == ATC_AIR_TO_GROUND) && isUserAircraft(i->getAircraft())) {
//cerr << "Checking state " << st << " for " << i->getAircraft()->getCallSign() << endl;
- static SGPropertyNode_ptr trans_num = globals->get_props()->getNode("/sim/atc/transmission-num", true);
+ SGPropertyNode_ptr trans_num = globals->get_props()->getNode("/sim/atc/transmission-num", true);
int n = trans_num->getIntValue();
if (n == 0) {
trans_num->setIntValue(-1);
if ((state >= minState) && (state <= maxState) && available) {
if ((msgDir == ATC_AIR_TO_GROUND) && isUserAircraft(i->getAircraft())) {
//cerr << "Checking state " << state << " for " << i->getAircraft()->getCallSign() << endl;
- static SGPropertyNode_ptr trans_num = globals->get_props()->getNode("/sim/atc/transmission-num", true);
+ SGPropertyNode_ptr trans_num = globals->get_props()->getNode("/sim/atc/transmission-num", true);
int n = trans_num->getIntValue();
if (n == 0) {
trans_num->setIntValue(-1);
ab_brake_left_pct = fgGetNode("/autopilot/autobrake/brake-left-output", true);
ab_brake_right_pct = fgGetNode("/autopilot/autobrake/brake-right-output", true);
+ altitude = fgGetNode("/position/altitude-ft");
temperature = fgGetNode("/environment/temperature-degc",true);
pressure = fgGetNode("/environment/pressure-inhg",true);
pressureSL = fgGetNode("/environment/pressure-sea-level-inhg",true);
//Positions
void FGJSBsim::set_Latitude(double lat)
{
- static SGConstPropertyNode_ptr altitude = fgGetNode("/position/altitude-ft");
double alt = altitude->getDoubleValue();
double sea_level_radius_meters, lat_geoc;
SGPropertyNode_ptr wing_fold_pos_pct;
SGPropertyNode_ptr tailhook_pos_pct;
+ SGConstPropertyNode_ptr altitude;
SGPropertyNode_ptr temperature;
SGPropertyNode_ptr pressure;
SGPropertyNode_ptr pressureSL;
fgSetDouble("/engines/engine/running", eng.getRunningFlag());
fgSetDouble("/engines/engine/cranking", eng.getCrankingFlag());
- static const SGPropertyNode *fuel_freeze
+ const SGPropertyNode *fuel_freeze
= fgGetNode("/sim/freeze/fuel");
if ( ! fuel_freeze->getBoolValue() ) {
fgSetDouble("/engines/engine/running", eng.getRunningFlag());
fgSetDouble("/engines/engine/cranking", eng.getCrankingFlag());
- static const SGPropertyNode *fuel_freeze
+ const SGPropertyNode *fuel_freeze
= fgGetNode("/sim/freeze/fuel");
if ( ! fuel_freeze->getBoolValue() ) {
clear3(f_wheel_local_v);
reaction_normal_force=0;
-#if 0
- static const SGPropertyNode * gear_wow
- = fgGetNode("/gear/gear[0]/wow", false);
- static const SGPropertyNode * gear_wow1
- = fgGetNode("/gear/gear[1]/wow", false);
- static const SGPropertyNode * gear_wow2
- = fgGetNode("/gear/gear[2]/wow", false);
-#endif
+
fgSetBool("/gear/gear[0]/wow", false);
fgSetBool("/gear/gear[1]/wow", false);
fgSetBool("/gear/gear[2]/wow", false);
char *filename = new char [24];
static int count = 1;
- static const SGPropertyNode *master_freeze
- = fgGetNode("/sim/freeze/master");
+ SGPropertyNode *master_freeze = fgGetNode("/sim/freeze/master");
bool freeze = master_freeze->getBoolValue();
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", true);
+ master_freeze->setBoolValue(true);
}
fgSetBool("/sim/menubar/visibility", false);
fgSetBool("/sim/menubar/visibility", menu_status);
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", false);
+ master_freeze->setBoolValue(false);
}
}
#endif // #if defined( TR_HIRES_SNAP)
return GUISnapShotOperation::start();
#else
// obsolete code => remove when new code is stable
- static SGConstPropertyNode_ptr master_freeze = fgGetNode("/sim/freeze/master");
+ SGPropertyNode_ptr master_freeze = fgGetNode("/sim/freeze/master");
bool freeze = master_freeze->getBoolValue();
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", true);
+ master_freeze->setBoolValue(true);
}
int mouse = fgGetMouseCursor();
fgSetMouseCursor(mouse);
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", false);
+ master_freeze->setBoolValue(false);
}
return result;
#endif
string message;
static int count = 1;
- static const SGPropertyNode *master_freeze
- = fgGetNode("/sim/freeze/master");
+ SGPropertyNode *master_freeze = fgGetNode("/sim/freeze/master");
bool freeze = master_freeze->getBoolValue();
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", true);
+ master_freeze->setBoolValue(true);
}
while (count < 1000) {
delete [] filename;
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", false);
+ master_freeze->setBoolValue(false);
}
}
string message;
static int count = 1;
- static const SGPropertyNode *master_freeze
- = fgGetNode("/sim/freeze/master");
+ SGPropertyNode *master_freeze = fgGetNode("/sim/freeze/master");
bool freeze = master_freeze->getBoolValue();
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", true);
+ master_freeze->setBoolValue(true);
}
while (count < 1000) {
delete [] filename;
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", false);
+ master_freeze->setBoolValue(false);
}
}
void fgPrintVisibleSceneInfoCommand()
{
- static const SGPropertyNode *master_freeze
- = fgGetNode("/sim/freeze/master");
+ SGPropertyNode *master_freeze = fgGetNode("/sim/freeze/master");
bool freeze = master_freeze->getBoolValue();
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", true);
+ master_freeze->setBoolValue(true);
}
flightgear::printVisibleSceneInfo(globals->get_renderer());
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", false);
+ master_freeze->setBoolValue(false);
}
}
-
-
-
// calculate the difference between the indicated heading
// and the selected heading for use with an autopilot
- static SGPropertyNode *bnode
+ SGPropertyNode *bnode
= fgGetNode( "/autopilot/settings/heading-bug-deg", false );
if ( bnode ) {
double diff = bnode->getDoubleValue() - heading;
// calculate the difference between the indicated heading
// and the selected heading for use with an autopilot
- static SGPropertyNode *bnode
+ SGPropertyNode *bnode
= fgGetNode( "/autopilot/settings/heading-bug-deg", false );
double diff = 0;
if ( bnode ){
indicated_hdg_rate = _last_yaw_rate;
// calculate the difference between the indicated heading
// and the selected heading for use with an autopilot
- static SGPropertyNode *bnode
+ SGPropertyNode *bnode
= fgGetNode( "/autopilot/settings/heading-bug-deg", false );
if ( bnode ) {
static bool
do_tile_cache_reload (const SGPropertyNode * arg)
{
- static const SGPropertyNode *master_freeze
- = fgGetNode("/sim/freeze/master");
+ SGPropertyNode *master_freeze = fgGetNode("/sim/freeze/master");
bool freeze = master_freeze->getBoolValue();
SG_LOG(SG_INPUT, SG_INFO, "ReIniting TileCache");
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", true);
+ master_freeze->setBoolValue(true);
}
globals->get_subsystem("tile-manager")->reinit();
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", false);
+ master_freeze->setBoolValue(false);
}
return true;
}
// Reset: this is what the 'reset' command (and hence, GUI) is attached to
void fgReInitSubsystems()
{
- static const SGPropertyNode *master_freeze
- = fgGetNode("/sim/freeze/master");
+ SGPropertyNode *master_freeze = fgGetNode("/sim/freeze/master");
SG_LOG( SG_GENERAL, SG_INFO, "fgReInitSubsystems()");
// setup state to begin re-init
bool freeze = master_freeze->getBoolValue();
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", true);
+ master_freeze->setBoolValue(true);
}
fgSetBool("/sim/signals/reinit", true);
// setup state to end re-init
fgSetBool("/sim/signals/reinit", false);
if ( !freeze ) {
- fgSetBool("/sim/freeze/master", false);
+ master_freeze->setBoolValue(false);
}
fgSetBool("/sim/sceneryloaded",false);
}
glFrontFace ( GL_CW );
}
-static const char *
-getLongitudeString ()
+////////////////////////////////////////////////////////////////////////
+// Tie the properties.
+////////////////////////////////////////////////////////////////////////
+SGConstPropertyNode_ptr FGProperties::_longDeg;
+SGConstPropertyNode_ptr FGProperties::_latDeg;
+SGConstPropertyNode_ptr FGProperties::_lonLatformat;
+
+const char *
+FGProperties::getLongitudeString ()
{
- static SGConstPropertyNode_ptr n = fgGetNode("/position/longitude-deg", true);
- static SGConstPropertyNode_ptr f = fgGetNode("/sim/lon-lat-format", true);
static char buf[32];
- double d = n->getDoubleValue();
- int format = f->getIntValue();
+ double d = _longDeg->getDoubleValue();
+ int format = _lonLatformat->getIntValue();
char c = d < 0.0 ? 'W' : 'E';
if (format == 0) {
return buf;
}
-static const char *
-getLatitudeString ()
+const char *
+FGProperties::getLatitudeString ()
{
- static SGConstPropertyNode_ptr n = fgGetNode("/position/latitude-deg", true);
- static SGConstPropertyNode_ptr f = fgGetNode("/sim/lon-lat-format", true);
static char buf[32];
- double d = n->getDoubleValue();
- int format = f->getIntValue();
+ double d = _latDeg->getDoubleValue();
+ int format = _lonLatformat->getIntValue();
char c = d < 0.0 ? 'S' : 'N';
if (format == 0) {
\f
-////////////////////////////////////////////////////////////////////////
-// Tie the properties.
-////////////////////////////////////////////////////////////////////////
FGProperties::FGProperties ()
{
void
FGProperties::bind ()
{
+ _longDeg = fgGetNode("/position/longitude-deg", true);
+ _latDeg = fgGetNode("/position/latitude-deg", true);
+ _lonLatformat = fgGetNode("/sim/lon-lat-format", true);
+
+ _offset = fgGetNode("/sim/time/local-offset", true);
+
+ // utc date/time
+ _uyear = fgGetNode("/sim/time/utc/year", true);
+ _umonth = fgGetNode("/sim/time/utc/month", true);
+ _uday = fgGetNode("/sim/time/utc/day", true);
+ _uhour = fgGetNode("/sim/time/utc/hour", true);
+ _umin = fgGetNode("/sim/time/utc/minute", true);
+ _usec = fgGetNode("/sim/time/utc/second", true);
+ _uwday = fgGetNode("/sim/time/utc/weekday", true);
+ _udsec = fgGetNode("/sim/time/utc/day-seconds", true);
+
+ // real local date/time
+ _ryear = fgGetNode("/sim/time/real/year", true);
+ _rmonth = fgGetNode("/sim/time/real/month", true);
+ _rday = fgGetNode("/sim/time/real/day", true);
+ _rhour = fgGetNode("/sim/time/real/hour", true);
+ _rmin = fgGetNode("/sim/time/real/minute", true);
+ _rsec = fgGetNode("/sim/time/real/second", true);
+ _rwday = fgGetNode("/sim/time/real/weekday", true);
+
_tiedProperties.setRoot(globals->get_props());
// Simulation
FGProperties::unbind ()
{
_tiedProperties.Untie();
+
+ // drop static references to properties
+ _longDeg = 0;
+ _latDeg = 0;
+ _lonLatformat = 0;
}
void
FGProperties::update (double dt)
{
- static SGPropertyNode_ptr offset = fgGetNode("/sim/time/local-offset", true);
- offset->setIntValue(globals->get_time_params()->get_local_offset());
+ _offset->setIntValue(globals->get_time_params()->get_local_offset());
// utc date/time
- static SGPropertyNode_ptr uyear = fgGetNode("/sim/time/utc/year", true);
- static SGPropertyNode_ptr umonth = fgGetNode("/sim/time/utc/month", true);
- static SGPropertyNode_ptr uday = fgGetNode("/sim/time/utc/day", true);
- static SGPropertyNode_ptr uhour = fgGetNode("/sim/time/utc/hour", true);
- static SGPropertyNode_ptr umin = fgGetNode("/sim/time/utc/minute", true);
- static SGPropertyNode_ptr usec = fgGetNode("/sim/time/utc/second", true);
- static SGPropertyNode_ptr uwday = fgGetNode("/sim/time/utc/weekday", true);
- static SGPropertyNode_ptr udsec = fgGetNode("/sim/time/utc/day-seconds", true);
-
struct tm *u = globals->get_time_params()->getGmt();
- uyear->setIntValue(u->tm_year + 1900);
- umonth->setIntValue(u->tm_mon + 1);
- uday->setIntValue(u->tm_mday);
- uhour->setIntValue(u->tm_hour);
- umin->setIntValue(u->tm_min);
- usec->setIntValue(u->tm_sec);
- uwday->setIntValue(u->tm_wday);
-
- udsec->setIntValue(u->tm_hour * 3600 + u->tm_min * 60 + u->tm_sec);
-
+ _uyear->setIntValue(u->tm_year + 1900);
+ _umonth->setIntValue(u->tm_mon + 1);
+ _uday->setIntValue(u->tm_mday);
+ _uhour->setIntValue(u->tm_hour);
+ _umin->setIntValue(u->tm_min);
+ _usec->setIntValue(u->tm_sec);
+ _uwday->setIntValue(u->tm_wday);
+ _udsec->setIntValue(u->tm_hour * 3600 + u->tm_min * 60 + u->tm_sec);
// real local date/time
- static SGPropertyNode_ptr ryear = fgGetNode("/sim/time/real/year", true);
- static SGPropertyNode_ptr rmonth = fgGetNode("/sim/time/real/month", true);
- static SGPropertyNode_ptr rday = fgGetNode("/sim/time/real/day", true);
- static SGPropertyNode_ptr rhour = fgGetNode("/sim/time/real/hour", true);
- static SGPropertyNode_ptr rmin = fgGetNode("/sim/time/real/minute", true);
- static SGPropertyNode_ptr rsec = fgGetNode("/sim/time/real/second", true);
- static SGPropertyNode_ptr rwday = fgGetNode("/sim/time/real/weekday", true);
-
time_t real = time(0);
struct tm *r = localtime(&real);
- ryear->setIntValue(r->tm_year + 1900);
- rmonth->setIntValue(r->tm_mon + 1);
- rday->setIntValue(r->tm_mday);
- rhour->setIntValue(r->tm_hour);
- rmin->setIntValue(r->tm_min);
- rsec->setIntValue(r->tm_sec);
- rwday->setIntValue(r->tm_wday);
+ _ryear->setIntValue(r->tm_year + 1900);
+ _rmonth->setIntValue(r->tm_mon + 1);
+ _rday->setIntValue(r->tm_mday);
+ _rhour->setIntValue(r->tm_hour);
+ _rmin->setIntValue(r->tm_min);
+ _rsec->setIntValue(r->tm_sec);
+ _rwday->setIntValue(r->tm_wday);
}
private:
simgear::TiedPropertyList _tiedProperties;
+
+ static const char* getLatitudeString ();
+ static const char* getLongitudeString ();
+
+ static SGConstPropertyNode_ptr _longDeg, _latDeg, _lonLatformat;
+
+ SGPropertyNode_ptr _offset;
+ SGPropertyNode_ptr _uyear, _umonth, _uday, _uhour, _umin, _usec, _uwday, _udsec;
+ SGPropertyNode_ptr _ryear, _rmonth, _rday, _rhour, _rmin, _rsec, _rwday, _rdsec;
};
// is initialized.
extern int _bootstrap_OSInit;
+static SGPropertyNode_ptr frame_signal;
+
// What should we do when we have nothing else to do? Let's get ready
// for the next move and update the display?
static void fgMainLoop( void )
{
- static SGPropertyNode_ptr frame_signal
- = fgGetNode("/sim/signals/frame", true);
-
frame_signal->fireValueChanged();
SG_LOG( SG_GENERAL, SG_DEBUG, "Running Main Loop");
// We've finished all our initialization steps, from now on we
// run the main loop.
fgSetBool("sim/sceneryloaded", false);
+ // stash current frame signal property
+ frame_signal = fgGetNode("/sim/signals/frame", true);
fgRegisterIdleHandler( fgMainLoop );
}
}
// or an empty string otherwise.
const char *fgValidatePath (const char *str, bool write)
{
- static SGPropertyNode_ptr r, w;
- if (!r) {
- r = fgGetNode("/sim/paths/validate/read", true);
- r->setAttribute(SGPropertyNode::READ, true);
- r->setAttribute(SGPropertyNode::WRITE, true);
-
- w = fgGetNode("/sim/paths/validate/write", true);
- w->setAttribute(SGPropertyNode::READ, true);
- w->setAttribute(SGPropertyNode::WRITE, true);
- }
+ SGPropertyNode_ptr r, w;
+ r = fgGetNode("/sim/paths/validate/read", true);
+ r->setAttribute(SGPropertyNode::READ, true);
+ r->setAttribute(SGPropertyNode::WRITE, true);
+
+ w = fgGetNode("/sim/paths/validate/write", true);
+ w->setAttribute(SGPropertyNode::READ, true);
+ w->setAttribute(SGPropertyNode::WRITE, true);
+
SGPropertyNode *prop = write ? w : r;
prop->setStringValue(str);
const char *result = prop->getStringValue();
//
// $Id$
+// TODO FIXME Module still contains lots of "static SGPropertyNode"s below.
#ifdef HAVE_CONFIG_H
# include <config.h>
#include "atlas.hxx"
-FGAtlas::FGAtlas() {
- fdm = new FlightProperties;
+FGAtlas::FGAtlas() :
+ length(0),
+ fdm(new FlightProperties)
+{
+ _adf_freq = fgGetNode("/instrumentation/adf/frequencies/selected-khz", true);
+ _nav1_freq = fgGetNode("/instrumentation/nav/frequencies/selected-mhz", true);
+ _nav1_sel_radial = fgGetNode("/instrumentation/nav/radials/selected-deg", true);
+ _nav2_freq = fgGetNode("/instrumentation/nav[1]/frequencies/selected-mhz", true);
+ _nav2_sel_radial = fgGetNode("/instrumentation/nav[1]/radials/selected-deg", true);
}
FGAtlas::~FGAtlas() {
// generate Atlas message
bool FGAtlas::gen_message() {
// cout << "generating atlas message" << endl;
-
- static SGPropertyNode *adf_freq
- = fgGetNode("/instrumentation/adf/frequencies/selected-khz", true);
- static SGPropertyNode *nav1_freq
- = fgGetNode("/instrumentation/nav/frequencies/selected-mhz", true);
- static SGPropertyNode *nav1_sel_radial
- = fgGetNode("/instrumentation/nav/radials/selected-deg", true);
- static SGPropertyNode *nav2_freq
- = fgGetNode("/instrumentation/nav[1]/frequencies/selected-mhz", true);
- static SGPropertyNode *nav2_sel_radial
- = fgGetNode("/instrumentation/nav[1]/radials/selected-deg", true);
-
char rmc[256], gga[256], patla[256];
char rmc_sum[10], gga_sum[10], patla_sum[10];
char dir;
sprintf( gga_sum, "%02X", calc_atlas_cksum(gga) );
sprintf( patla, "PATLA,%.2f,%.1f,%.2f,%.1f,%.0f",
- nav1_freq->getDoubleValue(),
- nav1_sel_radial->getDoubleValue(),
- nav2_freq->getDoubleValue(),
- nav2_sel_radial->getDoubleValue(),
- adf_freq->getDoubleValue() );
+ _nav1_freq->getDoubleValue(),
+ _nav1_sel_radial->getDoubleValue(),
+ _nav2_freq->getDoubleValue(),
+ _nav2_sel_radial->getDoubleValue(),
+ _adf_freq->getDoubleValue() );
sprintf( patla_sum, "%02X", calc_atlas_cksum(patla) );
SG_LOG( SG_IO, SG_DEBUG, rmc );
#include <string>
#include "protocol.hxx"
+#include <simgear/props/props.hxx>
class FlightProperties;
char buf[ FG_MAX_MSG_SIZE ];
int length;
FlightProperties* fdm;
-
+ SGPropertyNode_ptr _adf_freq, _nav1_freq,_nav1_sel_radial, _nav2_freq, _nav2_sel_radial;
+
public:
FGAtlas();
//
// $Id$
+// TODO FIXME Module still contains lots of "static SGPropertyNode"s below.
#ifdef HAVE_CONFIG_H
# include <config.h>
_sunAngleRad = prop->getNode("/sim/time/sun-angle-rad", true);
_sunAngleRad->setDoubleValue(_sun_angle);
+ _humidity = fgGetNode("/environment/relative-humidity", true);
// Read Only
tie(prop,"/rendering/scene/ambient/red", SGRawValuePointer<float>(&_scene_ambient[0]));
// calculate lighting parameters based on sun's relative angle to
// local up
- static SGConstPropertyNode_ptr humidity = fgGetNode("/environment/relative-humidity");
- float av = humidity->getFloatValue() * 45;
+ float av = _humidity->getFloatValue() * 45;
float visibility_log = log(av)/11.0;
float visibility_inv = (45000.0 - av)/45000.0;
SGPropertyNode_ptr _sunAngleRad;
+ SGPropertyNode_ptr _humidity;
+
simgear::TiedPropertyList _tiedProperties;
/**
for (int i = 0; i < 128; i++)
release_keys[i] = i;
+
+ _display = fgGetNode("/sim/rendering/on-screen-statistics", true);
+ _print = fgGetNode("/sim/rendering/print-statistics", true);
}
namespace
void FGEventHandler::handleStats(osgGA::GUIActionAdapter& us)
{
- static SGPropertyNode_ptr display = fgGetNode("/sim/rendering/on-screen-statistics", true);
- static SGPropertyNode_ptr print = fgGetNode("/sim/rendering/print-statistics", true);
-
- int type = display->getIntValue() % osgViewer::StatsHandler::LAST;
+ int type = _display->getIntValue() % osgViewer::StatsHandler::LAST;
if (type != statsType) {
statsEvent->setKey(displayStatsKey);
do {
}
} while (statsType != type);
- display->setIntValue(statsType);
+ _display->setIntValue(statsType);
}
- if (print->getBoolValue()) {
+ if (_print->getBoolValue()) {
statsEvent->setKey(printStatsKey);
statsHandler->handle(*statsEvent, us);
- print->setBoolValue(false);
+ _print->setBoolValue(false);
}
}
int release_keys[128];
void handleStats(osgGA::GUIActionAdapter& us);
bool changeStatsCameraRenderOrder;
+ SGPropertyNode_ptr _display, _print;
};
void eventToWindowCoords(const osgGA::GUIEventAdapter* ea, double& x, double& y);
#ifdef FG_JPEG_SERVER
jpgRenderFrame = updateRenderer;
#endif
- eventHandler = new FGEventHandler;
_numCascades = 4;
_cascadeFar[0] = 5.f;
void
FGRenderer::init( void )
{
+ eventHandler = new FGEventHandler();
+
sgUserDataInit( globals->get_props() );
_classicalRenderer = !fgGetBool("/sim/rendering/rembrandt/enabled", false);