Tech ENABLE_COLOR_CLASSES set as default
This commit is contained in:
parent
fab35e8aa4
commit
6201dad245
50 changed files with 18 additions and 1500 deletions
|
@ -116,11 +116,7 @@ void GLGizmoHollow::render_points(const Selection& selection, bool picking) cons
|
|||
glsafe(::glTranslated(0.0, 0.0, m_c->selection_info()->get_sla_shift()));
|
||||
glsafe(::glMultMatrixd(instance_matrix.data()));
|
||||
|
||||
#if ENABLE_COLOR_CLASSES
|
||||
ColorRGBA render_color;
|
||||
#else
|
||||
std::array<float, 4> render_color;
|
||||
#endif // ENABLE_COLOR_CLASSES
|
||||
const sla::DrainHoles& drain_holes = m_c->selection_info()->model_object()->sla_drain_holes;
|
||||
size_t cache_size = drain_holes.size();
|
||||
|
||||
|
@ -132,14 +128,8 @@ void GLGizmoHollow::render_points(const Selection& selection, bool picking) cons
|
|||
continue;
|
||||
|
||||
// First decide about the color of the point.
|
||||
if (picking) {
|
||||
#if ENABLE_COLOR_CLASSES
|
||||
if (picking)
|
||||
render_color = picking_color_component(i);
|
||||
#else
|
||||
std::array<float, 4> color = picking_color_component(i);
|
||||
render_color = color;
|
||||
#endif // ENABLE_COLOR_CLASSES
|
||||
}
|
||||
else {
|
||||
if (size_t(m_hover_id) == i)
|
||||
render_color = {0.0f, 1.0f, 1.0f, 1.0f};
|
||||
|
@ -148,16 +138,8 @@ void GLGizmoHollow::render_points(const Selection& selection, bool picking) cons
|
|||
m_c->hollowed_mesh()->get_drainholes()[i].failed) {
|
||||
render_color = {1.0f, 0.0f, 0.0f, 0.5f};
|
||||
}
|
||||
else { // neither hover nor picking
|
||||
#if ENABLE_COLOR_CLASSES
|
||||
else // neither hover nor picking
|
||||
render_color = point_selected ? ColorRGBA(1.0f, 0.3f, 0.3f, 0.5f) : ColorRGBA(1.0f, 1.0f, 1.0f, 0.5f);
|
||||
#else
|
||||
render_color[0] = point_selected ? 1.0f : 1.f;
|
||||
render_color[1] = point_selected ? 0.3f : 1.f;
|
||||
render_color[2] = point_selected ? 0.3f : 1.f;
|
||||
render_color[3] = 0.5f;
|
||||
#endif // ENABLE_COLOR_CLASSES
|
||||
}
|
||||
}
|
||||
|
||||
const_cast<GLModel*>(&m_cylinder)->set_color(-1, render_color);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue