diff --git a/src/Cockpit/hud.cxx b/src/Cockpit/hud.cxx index 8f413dce1..15e4837ab 100644 --- a/src/Cockpit/hud.cxx +++ b/src/Cockpit/hud.cxx @@ -964,6 +964,12 @@ static void set_hud_color(float r, float g, float b) { // all C++. // void fgUpdateHUD( void ) { + fgUpdateHUD( 0.0f, 0.0f, 640.0f, 480.0f ); +} + +void fgUpdateHUD( GLfloat x_start, GLfloat y_start, + GLfloat x_end, GLfloat y_end ) +{ int brightness; // int day_night_sw = current_aircraft.controls->day_night_switch; int day_night_sw = global_day_night_switch; @@ -987,7 +993,7 @@ void fgUpdateHUD( void ) { glPushMatrix(); glLoadIdentity(); - gluOrtho2D(0, 640, 0, 480); + gluOrtho2D(x_start, x_end, y_start, y_end); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); diff --git a/src/Cockpit/hud.hxx b/src/Cockpit/hud.hxx index 749839439..aa8dc81d4 100644 --- a/src/Cockpit/hud.hxx +++ b/src/Cockpit/hud.hxx @@ -907,6 +907,8 @@ extern void HUD_brightkey( bool incr_bright ); extern int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ ); extern int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ ); extern void fgUpdateHUD( void ); +extern void fgUpdateHUD( GLfloat x_start, GLfloat y_start, + GLfloat x_end, GLfloat y_end ); extern void drawOneLine ( UINT x1, UINT y1, UINT x2, UINT y2); extern void drawOneLine ( RECT &rect); diff --git a/src/Cockpit/panel.cxx b/src/Cockpit/panel.cxx index 9537af7be..8ac2f8e6f 100644 --- a/src/Cockpit/panel.cxx +++ b/src/Cockpit/panel.cxx @@ -208,8 +208,14 @@ FGPanel::unbind () /** * Update the panel. */ +void FGPanel::update () +{ + update(_winx, _winw, _winy, _winh); +} + + void -FGPanel::update () +FGPanel::update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh) { // Do nothing if the panel isn't visible. if (!fgPanelVisible()) @@ -228,7 +234,7 @@ FGPanel::update () glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); - gluOrtho2D(_winx, _winx + _winw, _winy, _winy + _winh); + gluOrtho2D(winx, winx + winw, winy, winy + winh); glMatrixMode(GL_MODELVIEW); glPushMatrix(); diff --git a/src/Cockpit/panel.hxx b/src/Cockpit/panel.hxx index 52bbf2e07..b46693b4a 100644 --- a/src/Cockpit/panel.hxx +++ b/src/Cockpit/panel.hxx @@ -133,6 +133,7 @@ public: virtual void bind (); virtual void unbind (); virtual void update (); + virtual void update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh); // transfer pointer ownership!!! virtual void addInstrument (FGPanelInstrument * instrument); diff --git a/src/Objects/newmat.cxx b/src/Objects/newmat.cxx index 1e917524d..2fa702d61 100644 --- a/src/Objects/newmat.cxx +++ b/src/Objects/newmat.cxx @@ -200,6 +200,7 @@ void FGNewMat::dump_info () { FGNewMat::~FGNewMat ( void ) { } + istream& operator >> ( istream& in, FGNewMat& m ) {