From 70d86af2537cac82587d0dc9a810fe21830df7f6 Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Sun, 19 Nov 2023 22:20:42 +0800 Subject: [PATCH] Fix color blending of preview shells (#2799) --- src/slic3r/GUI/GCodeViewer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 4e9428ba75..5382ce746b 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -1242,8 +1242,8 @@ void GCodeViewer::render(int canvas_width, int canvas_height, int right_margin) return; glsafe(::glEnable(GL_DEPTH_TEST)); - render_toolpaths(); render_shells(); + render_toolpaths(); float legend_height = 0.0f; render_legend(legend_height, canvas_width, canvas_height, right_margin); @@ -4033,7 +4033,7 @@ void GCodeViewer::render_shells() if (shader == nullptr) return; -// glsafe(::glDepthMask(GL_FALSE)); + glsafe(::glDepthMask(GL_FALSE)); shader->start_using(); shader->set_uniform("emission_factor", 0.1f); @@ -4042,7 +4042,7 @@ void GCodeViewer::render_shells() shader->set_uniform("emission_factor", 0.0f); shader->stop_using(); -// glsafe(::glDepthMask(GL_TRUE)); + glsafe(::glDepthMask(GL_TRUE)); } //BBS