]> git.mxchange.org Git - flightgear.git/commitdiff
disable clip planes after use (Doesn't seem to make a difference,
authormfranz <mfranz>
Wed, 30 Jul 2008 14:52:01 +0000 (14:52 +0000)
committermfranz <mfranz>
Wed, 30 Jul 2008 14:52:01 +0000 (14:52 +0000)
and is only a temporary measure, as it was planned to OSGify the
HUD and put it in the scenegraph etc.)

src/Instrumentation/HUD/HUD.cxx
src/Instrumentation/HUD/HUD.hxx
src/Instrumentation/HUD/HUD_ladder.cxx

index cab15dee6604ce093ac172bd7118a592bfcf7f9f..4a42d47effad774b917b76c0ad9bb14d47b2c351 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);
@@ -636,3 +638,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);
+    }
+}
index ca40d1602a0662d1e5d4d5aba6fc33dfb968e7fc..ba0b4d4b1f04f72c665167b7c03912fda96a1842 100644 (file)
@@ -58,6 +58,7 @@ class ClipBox {
 public:
     ClipBox(const SGPropertyNode *, float xoffset = 0, float yoffset = 0);
     void set();
+    void unset();
 
 private:
     bool _active;
index 6e274d26c45b1f8869b51d188f2825e42a08df54..186ca79cf9a75c4c105e672d37d7ab18699dfab8 100644 (file)
@@ -559,9 +559,7 @@ void HUD::Ladder::draw(void)
         _locStippleLineList.draw();
         glDisable(GL_LINE_STIPPLE);
     }
-    glDisable(GL_CLIP_PLANE0);
-    glDisable(GL_CLIP_PLANE1);
-    glDisable(GL_CLIP_PLANE2);
+    _clip_box->set();
     glPopMatrix();
     //*************************************************************