Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenricoturri1966 <enricoturri@seznam.cz>2022-05-12 12:26:44 +0300
committerenricoturri1966 <enricoturri@seznam.cz>2022-06-06 11:00:53 +0300
commitfd45d0eeed99df3f9c5f0aa50e55db2d667cbaad (patch)
tree6df0f53f9a2f50e5889818930e0264886b3f6ef9
parent19712749c3eedaed1fc25d10e1ec6f66571c3607 (diff)
Tech ENABLE_WORLD_COORDINATE_SHOW_AXES - Fixed bed axes visualization
-rw-r--r--src/slic3r/GUI/CoordAxes.cpp27
1 files changed, 7 insertions, 20 deletions
diff --git a/src/slic3r/GUI/CoordAxes.cpp b/src/slic3r/GUI/CoordAxes.cpp
index 75038e23c..88f4b6c86 100644
--- a/src/slic3r/GUI/CoordAxes.cpp
+++ b/src/slic3r/GUI/CoordAxes.cpp
@@ -47,25 +47,14 @@ void CoordAxes::render(float emission_factor)
m_arrow.init_from(stilized_arrow(16, m_tip_radius, m_tip_length, m_stem_radius, m_stem_length));
GLShaderProgram* curr_shader = wxGetApp().get_current_shader();
-#if ENABLE_GL_SHADERS_ATTRIBUTES
- bool shader_differs = (curr_shader == nullptr || curr_shader->get_name() != "gouraud_light_attr");
-#else
- bool shader_differs = (curr_shader == nullptr || curr_shader->get_name() != "gouraud_light");
-#endif // ENABLE_GL_SHADERS_ATTRIBUTES
-
-#if ENABLE_GL_SHADERS_ATTRIBUTES
- GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light_attr");
-#else
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
-#endif // ENABLE_GL_SHADERS_ATTRIBUTES
if (shader == nullptr)
return;
- if (shader_differs) {
- if (curr_shader != nullptr)
- curr_shader->stop_using();
- shader->start_using();
- }
+ if (curr_shader != nullptr)
+ curr_shader->stop_using();
+
+ shader->start_using();
shader->set_uniform("emission_factor", emission_factor);
// x axis
@@ -104,11 +93,9 @@ void CoordAxes::render(float emission_factor)
render_axis(Geometry::assemble_transform(m_origin).cast<float>());
#endif // ENABLE_GL_SHADERS_ATTRIBUTES
- if (shader_differs) {
- shader->stop_using();
- if (curr_shader != nullptr)
- curr_shader->start_using();
- }
+ shader->stop_using();
+ if (curr_shader != nullptr)
+ curr_shader->start_using();
}
} // GUI