]> git.mxchange.org Git - flightgear.git/commitdiff
Fixed a couple items for Norman's large resolution print routines.
authorcurt <curt>
Wed, 13 Jun 2001 20:31:49 +0000 (20:31 +0000)
committercurt <curt>
Wed, 13 Jun 2001 20:31:49 +0000 (20:31 +0000)
src/Cockpit/hud.cxx
src/Cockpit/hud.hxx
src/Cockpit/panel.cxx
src/Cockpit/panel.hxx
src/Objects/newmat.cxx

index 8f413dce1ca4987319a059b4338b4456436f2450..15e4837ab06a49e64ab697b539cf58a6ed0d0c59 100644 (file)
@@ -964,6 +964,12 @@ static void set_hud_color(float r, float g, float b) {
 // all C++.
 //
 void fgUpdateHUD( void ) {
 // 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;
   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();
   glPushMatrix();
 
   glLoadIdentity();
-  gluOrtho2D(0, 640, 0, 480);
+  gluOrtho2D(x_start, x_end, y_start, y_end);
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
   glLoadIdentity();
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
   glLoadIdentity();
index 7498394394bd3c465311e02c56620dc3ebbdf64c..aa8dc81d49136ded1aba6a4f37d61181ef6b2ba9 100644 (file)
@@ -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 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);
 
 extern void drawOneLine ( UINT x1, UINT y1, UINT x2, UINT y2);
 extern void drawOneLine ( RECT &rect);
index 9537af7bec2d3074205a5ed407a203ee52ca2df5..8ac2f8e6f572dce4da419c6ab5c78d64e4c7affd 100644 (file)
@@ -208,8 +208,14 @@ FGPanel::unbind ()
 /**
  * Update the panel.
  */
 /**
  * Update the panel.
  */
+void FGPanel::update ()
+{
+       update(_winx, _winw, _winy, _winh);
+}
+
+
 void
 void
-FGPanel::update ()
+FGPanel::update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh)
 {
                                // Do nothing if the panel isn't visible.
   if (!fgPanelVisible())
 {
                                // Do nothing if the panel isn't visible.
   if (!fgPanelVisible())
@@ -228,7 +234,7 @@ FGPanel::update ()
   glMatrixMode(GL_PROJECTION);
   glPushMatrix();
   glLoadIdentity();
   glMatrixMode(GL_PROJECTION);
   glPushMatrix();
   glLoadIdentity();
-  gluOrtho2D(_winx, _winx + _winw, _winy, _winy + _winh);
+  gluOrtho2D(winx, winx + winw, winy, winy + winh);
 
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
 
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
index 52bbf2e07164a10b91cafff9f3c891d706e48876..b46693b4a0e8810bbe636067fc674cd21daff2b9 100644 (file)
@@ -133,6 +133,7 @@ public:
   virtual void bind ();
   virtual void unbind ();
   virtual void update ();
   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);
 
                                // transfer pointer ownership!!!
   virtual void addInstrument (FGPanelInstrument * instrument);
index 1e917524d5cca22bb943b27d66d9297515a269ba..2fa702d61907d1ef04880f359ab9ff09a9a5c128 100644 (file)
@@ -200,6 +200,7 @@ void FGNewMat::dump_info () {
 FGNewMat::~FGNewMat ( void ) {
 }
 
 FGNewMat::~FGNewMat ( void ) {
 }
 
+
 istream&
 operator >> ( istream& in, FGNewMat& m )
 {
 istream&
 operator >> ( istream& in, FGNewMat& m )
 {