Refactoring in GLModel::render() to simplify client code
This commit is contained in:
parent
c61785f775
commit
fd5cf8d0cc
6 changed files with 20 additions and 34 deletions
src/slic3r/GUI
|
@ -161,6 +161,8 @@ void GLModel::render() const
|
|||
GLShaderProgram* shader = wxGetApp().get_current_shader();
|
||||
if (shader != nullptr)
|
||||
shader->set_uniform("uniform_color", data.color);
|
||||
else
|
||||
glsafe(::glColor4fv(data.color.data()));
|
||||
|
||||
glsafe(::glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, data.ibo_id));
|
||||
glsafe(::glDrawElements(mode, static_cast<GLsizei>(data.indices_count), GL_UNSIGNED_INT, (const void*)0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue