From 5c76509ded8e4b52e4507f86a70095828a5ef41e Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 13 May 2019 17:16:04 +0200 Subject: [PATCH] always clear depth, not depending on the current need --- basegraph.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/basegraph.cpp b/basegraph.cpp index e619fa14..9fe44bfd 100644 --- a/basegraph.cpp +++ b/basegraph.cpp @@ -401,17 +401,12 @@ void setGLProjection(color_t col) { //glLineWidth(1.0f); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - if(model_needs_depth()) { #ifdef GL_ES - glClearDepthf(1.0f); + glClearDepthf(1.0f); #else - glClearDepth(1.0f); + glClearDepth(1.0f); #endif - glDepthFunc(GL_LEQUAL); - glhr::set_depthtest(true); - } - else - glhr::set_depthtest(false); + glDepthFunc(GL_LEQUAL); GLERR("setGLProjection"); reset_projection();