]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/panel.cxx
Removed some left over debugging output.
[flightgear.git] / src / Cockpit / panel.cxx
index 52810a2850448c60fdf9df85951064bb1a31a123..0199dd1789e1911c3409aa369f748985cb12efba 100644 (file)
@@ -272,6 +272,7 @@ FGPanel::update (double dt)
     _x_offset = fgGetInt("/sim/panel/x-offset");
     _y_offset = fgGetInt("/sim/panel/y-offset");
     _jitter = fgGetFloat("/sim/panel/jitter");
+    _flipx = fgGetBool("/sim/panel/flip-x");
 
                                // Do nothing if the panel isn't visible.
     if ( !fgPanelVisible() ) {
@@ -330,8 +331,11 @@ FGPanel::update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh)
   glMatrixMode(GL_PROJECTION);
   glPushMatrix();
   glLoadIdentity();
-  gluOrtho2D(winx, winx + winw, winy, winy + winh); /* right side up */
-  // gluOrtho2D(winx + winw, winx, winy + winh, winy); /* up side down */
+  if ( _flipx ) {
+    gluOrtho2D(winx + winw, winx, winy + winh, winy); /* up side down */
+  } else {
+    gluOrtho2D(winx, winx + winw, winy, winy + winh); /* right side up */
+  }
   
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
@@ -423,6 +427,7 @@ FGPanel::draw()
 
   // restore some original state
   glPopAttrib();
+  glPolygonOffset(0, 0);
   glDisable(GL_POLYGON_OFFSET_FILL);
 }