]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/HUD/HUD.cxx
Merge branch 'maint2' into next
[flightgear.git] / src / Instrumentation / HUD / HUD.cxx
index cab15dee6604ce093ac172bd7118a592bfcf7f9f..4f480b47e72dacccc5d8442bd07b6b1f8bbd057b 100644 (file)
@@ -293,6 +293,8 @@ void HUD::common_draw()
         if ((*it)->isEnabled())
             (*it)->draw();
 
+    _clip_box->unset();
+
     if (isAntialiased()) {
         glDisable(GL_ALPHA_TEST);
         glDisable(GL_LINE_SMOOTH);
@@ -460,10 +462,8 @@ void HUD::setColor() const
 }
 
 
-
-
 void HUD::textAlign(fntRenderer *rend, const char *s, int align,
-        float *x, float *y, float *l, float *r, float *t, float *b)
+        float *x, float *y, float *l, float *r, float *b, float *t)
 {
     fntFont *font = rend->getFont();
     float gap = font->getGap();
@@ -636,3 +636,13 @@ void ClipBox::set()
     glEnable(GL_CLIP_PLANE3);
 }
 
+
+void ClipBox::unset()
+{
+    if (_active) {
+        glDisable(GL_CLIP_PLANE0);
+        glDisable(GL_CLIP_PLANE1);
+        glDisable(GL_CLIP_PLANE2);
+        glDisable(GL_CLIP_PLANE3);
+    }
+}