diff --git a/src/Cockpit/hud.cxx b/src/Cockpit/hud.cxx index 4f7ddfded..687cc3658 100644 --- a/src/Cockpit/hud.cxx +++ b/src/Cockpit/hud.cxx @@ -242,11 +242,13 @@ readLadder(const SGPropertyNode * node) // The factor assumes a base of 55 degrees per 640 pixels. // Invert to convert the "compression" factor to a // pixels-per-degree number. - if( HUD_style == 1) + if(fgGetBool("/sim/hud/enable3d", true)) { -// if(factor == 0) + if (HUD_style == 1) + { factor = 1; - factor = (640./55.) / factor; + factor = (640./55.) / factor; + } } SG_LOG(SG_INPUT, SG_INFO, "Done reading instrument " << name); @@ -993,7 +995,8 @@ static void set_hud_color(float r, float g, float b) { // void fgUpdateHUD( void ) { - if( HUD_style == 1) + static const SGPropertyNode *enable3d_node = fgGetNode("/sim/hud/enable3d"); + if( HUD_style == 1 && enable3d_node->getBoolValue() ) { fgUpdateHUDVirtual(); return; diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 9a28333d0..d0389d12c 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -184,10 +184,11 @@ fgSetDefaults () fgSetInt("/sim/log-level", SG_WARN); // Features + fgSetBool("/sim/hud/antialiased", false); + fgSetBool("/sim/hud/enable3d", true); fgSetBool("/sim/hud/visibility", false); fgSetBool("/sim/panel/visibility", true); fgSetBool("/sim/sound/audible", true); - fgSetBool("/sim/hud/antialiased", false); // Flight Model options fgSetString("/sim/flight-model", "jsb"); @@ -1085,6 +1086,8 @@ struct OptionDesc { {"enable-fuel-freeze", false, OPTION_BOOL, "/sim/freeze/fuel", true, "", 0 }, {"disable-clock-freeze", false, OPTION_BOOL, "/sim/freeze/clock", false, "", 0 }, {"enable-clock-freeze", false, OPTION_BOOL, "/sim/freeze/clock", true, "", 0 }, + {"disable-hud-3d", false, OPTION_BOOL, "/sim/hud/enable3d", false, "", 0 }, + {"enable-hud-3d", false, OPTION_BOOL, "/sim/hud/enable3d", true, "", 0 }, {"disable-anti-alias-hud", false, OPTION_BOOL, "/sim/hud/antialiased", false, "", 0 }, {"enable-anti-alias-hud", false, OPTION_BOOL, "/sim/hud/antialiased", true, "", 0 }, {"control", true, OPTION_STRING, "/sim/control-mode", false, "", 0 },