1
0
Fork 0

Disable depth buffer writes for 2D insturments. This should prevent z-buffer fighting

This commit is contained in:
ehofman 2003-08-16 11:35:04 +00:00
parent be863ee240
commit 830ce9108c
2 changed files with 6 additions and 0 deletions

View 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();

View 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();
}