mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 13:47:59 -06:00
Tech ENABLE_GLINDEXEDVERTEXARRAY_REMOVAL - Replace GLIndexedVertexArray with GLModel: MeshClipper::m_vertex_array
(cherry picked from commit prusa3d/PrusaSlicer@be6922795d)
This commit is contained in:
parent
fc1c8c2565
commit
8107057e17
5 changed files with 47 additions and 27 deletions
|
@ -218,15 +218,9 @@ void InstancesHider::render_cut() const
|
|||
clipper->set_limiting_plane(ClippingPlane::ClipsNothing());
|
||||
|
||||
glsafe(::glPushMatrix());
|
||||
if (mv->is_model_part())
|
||||
glsafe(::glColor3f(0.8f, 0.3f, 0.0f));
|
||||
else {
|
||||
const ColorRGBA color = color_from_model_volume(*mv);
|
||||
glsafe(::glColor4fv(color.data()));
|
||||
}
|
||||
glsafe(::glPushAttrib(GL_DEPTH_TEST));
|
||||
glsafe(::glDisable(GL_DEPTH_TEST));
|
||||
clipper->render_cut();
|
||||
clipper->render_cut(mv->is_model_part() ? ColorRGBA(0.8f, 0.3f, 0.0f, 1.0f) : color_from_model_volume(*mv));
|
||||
glsafe(::glPopAttrib());
|
||||
glsafe(::glPopMatrix());
|
||||
|
||||
|
@ -435,8 +429,7 @@ void ObjectClipper::render_cut() const
|
|||
clipper->set_limiting_plane(ClippingPlane(Vec3d::UnitZ(), -SINKING_Z_THRESHOLD));
|
||||
glsafe(::glPushMatrix());
|
||||
// BBS
|
||||
glsafe(::glColor3f(0.25f, 0.25f, 0.25f));
|
||||
clipper->render_cut();
|
||||
clipper->render_cut({ 0.25f, 0.25f, 0.25f, 1.0f });
|
||||
glsafe(::glPopMatrix());
|
||||
|
||||
++clipper_id;
|
||||
|
@ -584,8 +577,7 @@ void SupportsClipper::render_cut() const
|
|||
m_clipper->set_transformation(supports_trafo);
|
||||
|
||||
glsafe(::glPushMatrix());
|
||||
glsafe(::glColor3f(1.0f, 0.f, 0.37f));
|
||||
m_clipper->render_cut();
|
||||
m_clipper->render_cut({ 1.0f, 0.f, 0.37f, 1.0f });
|
||||
glsafe(::glPopMatrix());
|
||||
}
|
||||
|
||||
|
@ -734,8 +726,7 @@ void ModelObjectsClipper::render_cut() const
|
|||
clipper->set_transformation(trafo);
|
||||
glsafe(::glPushMatrix());
|
||||
// BBS
|
||||
glsafe(::glColor3f(0.25f, 0.25f, 0.25f));
|
||||
clipper->render_cut();
|
||||
clipper->render_cut({0.25f, 0.25f, 0.25f, 1.0f});
|
||||
glsafe(::glPopMatrix());
|
||||
|
||||
++clipper_id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue