]> git.mxchange.org Git - flightgear.git/commitdiff
Disable depth buffer writes for 2D insturments. This should prevent z-buffer fighting
authorehofman <ehofman>
Sat, 16 Aug 2003 11:35:04 +0000 (11:35 +0000)
committerehofman <ehofman>
Sat, 16 Aug 2003 11:35:04 +0000 (11:35 +0000)
src/Cockpit/panel.cxx
src/Model/panelnode.cxx

index d593223181b9eac8e1227b511b1ae999b58f3bc6..4483dfa2a4a189998a273d37074be47321ed3af7 100644 (file)
@@ -346,7 +346,9 @@ FGPanel::update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh)
   
   glTranslated(x_offset, y_offset, 0);
   
+  glDepthMask(GL_FALSE);
   draw();
+  glDepthMask(GL_TRUE);
 
   glMatrixMode(GL_PROJECTION);
   glPopMatrix();
index 55973b0035ec670cc3220f4a8c5649522abb9173..eedfed76889175ac644773ea8dfe282836bfe314 100644 (file)
@@ -142,8 +142,12 @@ void FGPanelNode::draw_geometry()
     glGetFloatv(GL_PROJECTION_MATRIX, _lastProjection);
     glGetIntegerv(GL_VIEWPORT, _lastViewport);
 
+    glDepthMask( GL_FALSE );
+
     _panel->draw();
 
+    glDepthMask( GL_TRUE );
+
 
     glPopMatrix();
 }