Disable depth buffer writes for 2D insturments. This should prevent z-buffer fighting
This commit is contained in:
parent
be863ee240
commit
830ce9108c
2 changed files with 6 additions and 0 deletions
|
@ -346,7 +346,9 @@ FGPanel::update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh)
|
||||||
|
|
||||||
glTranslated(x_offset, y_offset, 0);
|
glTranslated(x_offset, y_offset, 0);
|
||||||
|
|
||||||
|
glDepthMask(GL_FALSE);
|
||||||
draw();
|
draw();
|
||||||
|
glDepthMask(GL_TRUE);
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
|
@ -142,8 +142,12 @@ void FGPanelNode::draw_geometry()
|
||||||
glGetFloatv(GL_PROJECTION_MATRIX, _lastProjection);
|
glGetFloatv(GL_PROJECTION_MATRIX, _lastProjection);
|
||||||
glGetIntegerv(GL_VIEWPORT, _lastViewport);
|
glGetIntegerv(GL_VIEWPORT, _lastViewport);
|
||||||
|
|
||||||
|
glDepthMask( GL_FALSE );
|
||||||
|
|
||||||
_panel->draw();
|
_panel->draw();
|
||||||
|
|
||||||
|
glDepthMask( GL_TRUE );
|
||||||
|
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue