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
|
@ -61,11 +61,7 @@ void GLGizmoBase::Grabber::render(float size, const std::array<float, 4>& render
|
|||
|
||||
float fullsize = 2 * (dragging ? get_dragging_half_size(size) : get_half_size(size));
|
||||
|
||||
GLShaderProgram* shader = picking ? nullptr : wxGetApp().get_current_shader();
|
||||
if (shader != nullptr)
|
||||
const_cast<GLModel*>(&cube)->set_color(-1, render_color);
|
||||
else
|
||||
glsafe(::glColor4fv(render_color.data())); // picking
|
||||
const_cast<GLModel*>(&cube)->set_color(-1, render_color);
|
||||
|
||||
glsafe(::glPushMatrix());
|
||||
glsafe(::glTranslated(center.x(), center.y(), center.z()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue