From 237586675f31378fc0b3e7144715b1c79280231a Mon Sep 17 00:00:00 2001 From: Downtime Date: Mon, 12 Oct 2026 20:01:57 -0500 Subject: [PATCH] fix(gui): remove legacy fixed-function OpenGL texture calls (#16270) Debug builds asserted on startup because these calls raise GL errors on a core-profile context. Both draws already use shaders, so removing the calls changes nothing on compatibility contexts. --- src/slic3r/GUI/GLTexture.cpp | 4 ---- src/slic3r/GUI/PartPlate.cpp | 7 ------- 2 files changed, 11 deletions(-) diff --git a/src/slic3r/GUI/GLTexture.cpp b/src/slic3r/GUI/GLTexture.cpp index f83dd1f854..90cae850c9 100644 --- a/src/slic3r/GUI/GLTexture.cpp +++ b/src/slic3r/GUI/GLTexture.cpp @@ -719,9 +719,6 @@ void GLTexture::render_sub_texture(unsigned int tex_id, float left, float right, // does not treat anti-aliased icon edges as window transparency. glsafe(::glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA)); - glsafe(::glEnable(GL_TEXTURE_2D)); - glsafe(::glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE)); - glsafe(::glBindTexture(GL_TEXTURE_2D, (GLuint)tex_id)); GLModel::Geometry init_data; @@ -753,7 +750,6 @@ void GLTexture::render_sub_texture(unsigned int tex_id, float left, float right, glsafe(::glBindTexture(GL_TEXTURE_2D, 0)); - glsafe(::glDisable(GL_TEXTURE_2D)); glsafe(::glDisable(GL_BLEND)); } diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index 3bf53ecb73..d5d9fb5b8a 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -1880,13 +1880,6 @@ void PartPlate::render_exclude_area(bool force_default_color) { // draw exclude area glsafe(::glDepthMask(GL_FALSE)); - if (m_selected) { - glsafe(::glColor4fv(select_color.data())); - } - else { - glsafe(::glColor4fv(unselect_color.data())); - } - m_exclude_triangles.set_color(m_selected ? select_color : unselect_color); m_exclude_triangles.render(); glsafe(::glDepthMask(GL_TRUE));