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>2021-08-19 13:12:25 +0300
committerenricoturri1966 <enricoturri@seznam.cz>2021-08-19 13:12:25 +0300
commitadfb5b6b4960224c23fec9531765f8d9fdf7ff45 (patch)
treee650193c4429632760ff6e5ceaad7ad4140ab8ff /src/slic3r/GUI
parent316d38807d64e377c4b1d3a71f8c9587dcc82066 (diff)
Small refactoring into GLModel::render()
Diffstat (limited to 'src/slic3r/GUI')
-rw-r--r--src/slic3r/GUI/GLModel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/slic3r/GUI/GLModel.cpp b/src/slic3r/GUI/GLModel.cpp
index 6d54ec20e..a9550bc04 100644
--- a/src/slic3r/GUI/GLModel.cpp
+++ b/src/slic3r/GUI/GLModel.cpp
@@ -169,6 +169,8 @@ void GLModel::reset()
void GLModel::render() const
{
+ GLShaderProgram* shader = wxGetApp().get_current_shader();
+
for (const RenderData& data : m_render_data) {
if (data.vbo_id == 0 || data.ibo_id == 0)
continue;
@@ -190,7 +192,6 @@ void GLModel::render() const
glsafe(::glEnableClientState(GL_VERTEX_ARRAY));
glsafe(::glEnableClientState(GL_NORMAL_ARRAY));
- GLShaderProgram* shader = wxGetApp().get_current_shader();
if (shader != nullptr)
shader->set_uniform("uniform_color", data.color);
else