mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-13 19:01:21 +00:00
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.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user