mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 15:13:58 -06:00
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
|
@ -205,12 +205,11 @@ void GLGizmoMove3D::render_grabber_extension(Axis axis, const BoundingBoxf3& box
|
|||
if (shader == nullptr)
|
||||
return;
|
||||
|
||||
if (! picking) {
|
||||
const_cast<GLModel*>(&m_vbo_cone)->set_color(-1, color);
|
||||
if (!picking) {
|
||||
shader->start_using();
|
||||
shader->set_uniform("emission_factor", 0.1);
|
||||
const_cast<GLModel*>(&m_vbo_cone)->set_color(-1, color);
|
||||
} else
|
||||
glsafe(::glColor4fv(color.data()));
|
||||
}
|
||||
|
||||
glsafe(::glPushMatrix());
|
||||
glsafe(::glTranslated(m_grabbers[axis].center.x(), m_grabbers[axis].center.y(), m_grabbers[axis].center.z()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue