]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/panelnode.cxx
Fix line endings
[flightgear.git] / src / Model / panelnode.cxx
index eedfed76889175ac644773ea8dfe282836bfe314..bf553e2033b2231571cf1f0f1bc04175c38f28cb 100644 (file)
@@ -47,6 +47,8 @@ FGPanelNode::FGPanelNode(SGPropertyNode* props)
     // panels).  This is a memory leak and should be fixed!`
     _panel->init();
 
+    _panel->setDepthTest( props->getBoolValue("depth-test") );
+
     // Initialize the matrices to the identity.  PLib prints warnings
     // when trying to invert singular matrices (e.g. when not using a
     // 3D panel).
@@ -142,12 +144,8 @@ void FGPanelNode::draw_geometry()
     glGetFloatv(GL_PROJECTION_MATRIX, _lastProjection);
     glGetIntegerv(GL_VIEWPORT, _lastViewport);
 
-    glDepthMask( GL_FALSE );
-
     _panel->draw();
 
-    glDepthMask( GL_TRUE );
-
 
     glPopMatrix();
 }