]> git.mxchange.org Git - flightgear.git/commitdiff
initialize HUD class and call its drawing routine from renderer
authormfranz <mfranz>
Tue, 4 Jul 2006 15:54:41 +0000 (15:54 +0000)
committermfranz <mfranz>
Tue, 4 Jul 2006 15:54:41 +0000 (15:54 +0000)
(basically a NOOP if /sim/hud/visibility[1] is false)

src/Instrumentation/instrument_mgr.cxx
src/Main/renderer.cxx

index 1da1abb7195057dacc00c1ced3d7381e0af8b099..425d1ee1e90ef0db00e7331b1b3788c28c0432b5 100644 (file)
@@ -18,6 +18,7 @@
 #include <Main/fg_props.hxx>
 #include <Main/globals.hxx>
 #include <Main/util.hxx>
 #include <Main/fg_props.hxx>
 #include <Main/globals.hxx>
 #include <Main/util.hxx>
+#include <Instrumentation/HUD/HUD.hxx>
 
 #include "instrument_mgr.hxx"
 #include "adf.hxx"
 
 #include "instrument_mgr.hxx"
 #include "adf.hxx"
@@ -44,7 +45,7 @@
 #include "inst_vertical_speed_indicator.hxx" // (TJ)
 #include "od_gauge.hxx"
 #include "wxradar.hxx"
 #include "inst_vertical_speed_indicator.hxx" // (TJ)
 #include "od_gauge.hxx"
 #include "wxradar.hxx"
-#include "tacan.hxx" 
+#include "tacan.hxx"
 #include "mk_viii.hxx"
 
 
 #include "mk_viii.hxx"
 
 
@@ -52,6 +53,7 @@ FGInstrumentMgr::FGInstrumentMgr ()
 {
     set_subsystem("annunciator", new Annunciator);
     set_subsystem("od_gauge", new FGODGauge, 1.0);
 {
     set_subsystem("annunciator", new Annunciator);
     set_subsystem("od_gauge", new FGODGauge, 1.0);
+    set_subsystem("hud", new HUD);
 
     config_props = new SGPropertyNode;
 
 
     config_props = new SGPropertyNode;
 
index 421e8a8666a7b6f98e5166ac670fb4a8898759c5..ac18f8a81ddf6940959acf5cc2b2aa1af80196ba 100644 (file)
@@ -68,6 +68,8 @@
 #include <Scenery/tilemgr.hxx>
 #include <ATC/ATCdisplay.hxx>
 #include <GUI/new_gui.hxx>
 #include <Scenery/tilemgr.hxx>
 #include <ATC/ATCdisplay.hxx>
 #include <GUI/new_gui.hxx>
+#include <Instrumentation/instrument_mgr.hxx>
+#include <Instrumentation/HUD/HUD.hxx>
 
 #include "splash.hxx"
 #include "renderer.hxx"
 
 #include "splash.hxx"
 #include "renderer.hxx"
@@ -729,6 +731,10 @@ FGRenderer::update( bool refresh_camera_settings ) {
     hud_and_panel->apply();
     fgCockpitUpdate();
 
     hud_and_panel->apply();
     fgCockpitUpdate();
 
+    FGInstrumentMgr *instr = static_cast<FGInstrumentMgr *>(globals->get_subsystem("instrumentation"));
+    HUD *hud = static_cast<HUD *>(instr->get_subsystem("hud"));
+    hud->draw();
+
     // Use the hud_and_panel ssgSimpleState for rendering the ATC output
     // This only works properly if called before the panel call
     if((fgGetBool("/sim/atc/enabled")) || (fgGetBool("/sim/ai-traffic/enabled")))
     // Use the hud_and_panel ssgSimpleState for rendering the ATC output
     // This only works properly if called before the panel call
     if((fgGetBool("/sim/atc/enabled")) || (fgGetBool("/sim/ai-traffic/enabled")))