only gouraud for preview mode

This commit is contained in:
Rodrigo Faselli
2026-05-18 12:24:47 -03:00
committed by GitHub
parent ecffe70e17
commit 6166a54808

View File

@@ -222,12 +222,7 @@ void GCodeViewer::SequentialView::Marker::render(int canvas_width, int canvas_he
if (!m_visible)
return;
const bool use_phong = wxGetApp().app_config != nullptr &&
wxGetApp().app_config->get_bool(SETTING_OPENGL_REALISTIC_MODE) &&
wxGetApp().app_config->get_bool(SETTING_OPENGL_REALISTIC_PHONG);
GLShaderProgram* shader = wxGetApp().get_shader(use_phong ? "phong" : "gouraud_light");
if (shader == nullptr)
shader = wxGetApp().get_shader("gouraud_light");
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
if (shader == nullptr)
return;
@@ -2419,12 +2414,7 @@ void GCodeViewer::render_shells(int canvas_width, int canvas_height)
//if (!m_shells.visible || m_shells.volumes.empty())
return;
const bool use_phong = wxGetApp().app_config != nullptr &&
wxGetApp().app_config->get_bool(SETTING_OPENGL_REALISTIC_MODE) &&
wxGetApp().app_config->get_bool(SETTING_OPENGL_REALISTIC_PHONG);
GLShaderProgram* shader = wxGetApp().get_shader(use_phong ? "phong" : "gouraud_light");
if (shader == nullptr)
shader = wxGetApp().get_shader("gouraud_light");
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
if (shader == nullptr)
return;