Removed unneeded calls to GL_LIGHTING

This commit is contained in:
enricoturri1966 2021-05-25 12:09:40 +02:00 committed by Lukas Matena
parent b63de990d4
commit e648368934
5 changed files with 0 additions and 26 deletions

View file

@ -56,9 +56,6 @@ 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));
if (! picking)
glsafe(::glEnable(GL_LIGHTING));
GLShaderProgram* shader = picking ? nullptr : wxGetApp().get_current_shader();
if (shader)
shader->set_uniform("uniform_color", render_color);
@ -73,9 +70,6 @@ void GLGizmoBase::Grabber::render(float size, const std::array<float, 4>& render
glsafe(::glScaled(fullsize, fullsize, fullsize));
cube.render();
glsafe(::glPopMatrix());
if (! picking)
glsafe(::glDisable(GL_LIGHTING));
}

View file

@ -178,9 +178,6 @@ void GLGizmoHollow::render_points(const Selection& selection, bool picking) cons
glsafe(::glPopMatrix());
}
//if (!picking)
// glsafe(::glDisable(GL_LIGHTING));
glsafe(::glPopMatrix());
}

View file

@ -203,9 +203,6 @@ void GLGizmoMove3D::render_grabber_extension(Axis axis, const BoundingBoxf3& box
color[3] = color[3];
}
if (!picking)
glsafe(::glEnable(GL_LIGHTING));
glsafe(::glColor4fv(color.data()));
glsafe(::glPushMatrix());
glsafe(::glTranslated(m_grabbers[axis].center(0), m_grabbers[axis].center(1), m_grabbers[axis].center(2)));
@ -218,9 +215,6 @@ void GLGizmoMove3D::render_grabber_extension(Axis axis, const BoundingBoxf3& box
glsafe(::glScaled(0.75 * size, 0.75 * size, 3.0 * size));
m_vbo_cone.render();
glsafe(::glPopMatrix());
if (!picking)
glsafe(::glDisable(GL_LIGHTING));
}

View file

@ -335,9 +335,6 @@ void GLGizmoRotate::render_grabber_extension(const BoundingBoxf3& box, bool pick
color[2] = 1.0f - color[2];
}
if (!picking)
glsafe(::glEnable(GL_LIGHTING));
glsafe(::glColor4fv(color.data()));
glsafe(::glPushMatrix());
glsafe(::glTranslated(m_grabbers[0].center(0), m_grabbers[0].center(1), m_grabbers[0].center(2)));
@ -355,9 +352,6 @@ void GLGizmoRotate::render_grabber_extension(const BoundingBoxf3& box, bool pick
glsafe(::glScaled(0.75 * size, 0.75 * size, 3.0 * size));
m_cone.render();
glsafe(::glPopMatrix());
if (!picking)
glsafe(::glDisable(GL_LIGHTING));
}
void GLGizmoRotate::transform_to_local(const Selection& selection) const