Tech ENABLE_SEQUENTIAL_LIMITS -> Improved rendering of clearance regions

This commit is contained in:
enricoturri1966 2021-05-12 13:09:33 +02:00
parent 75677ba810
commit 0d37f66f61
2 changed files with 19 additions and 8 deletions

View file

@ -424,7 +424,10 @@ void Bed3D::render_texture(bool bottom, GLCanvas3D& canvas) const
}
glsafe(::glEnable(GL_DEPTH_TEST));
glsafe(::glDepthMask(GL_FALSE));
#if ENABLE_SEQUENTIAL_LIMITS
if (bottom)
#endif // ENABLE_SEQUENTIAL_LIMITS
glsafe(::glDepthMask(GL_FALSE));
glsafe(::glEnable(GL_BLEND));
glsafe(::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
@ -469,7 +472,10 @@ void Bed3D::render_texture(bool bottom, GLCanvas3D& canvas) const
glsafe(::glFrontFace(GL_CCW));
glsafe(::glDisable(GL_BLEND));
glsafe(::glDepthMask(GL_TRUE));
#if ENABLE_SEQUENTIAL_LIMITS
if (bottom)
#endif // ENABLE_SEQUENTIAL_LIMITS
glsafe(::glDepthMask(GL_TRUE));
shader->stop_using();
}