mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
SLA auto supports: Work with support force deficit to sprinkle support points.
Use OpenGL emissive material to render support points.
This commit is contained in:
parent
cb4763bb32
commit
8b4bd7177b
4 changed files with 98 additions and 40 deletions
|
@ -1919,6 +1919,8 @@ void GLGizmoSlaSupports::render_points(const GLCanvas3D::Selection& selection, b
|
|||
}
|
||||
}
|
||||
::glColor3fv(render_color);
|
||||
float render_color_emissive[4] = { 0.5 * render_color[0], 0.5 * render_color[1], 0.5 * render_color[2], 1.f};
|
||||
::glMaterialfv(GL_FRONT, GL_EMISSION, render_color_emissive);
|
||||
|
||||
// Now render the sphere. Inverse matrix of the instance scaling is applied so that the
|
||||
// sphere does not scale with the object.
|
||||
|
@ -1929,6 +1931,12 @@ void GLGizmoSlaSupports::render_points(const GLCanvas3D::Selection& selection, b
|
|||
::glPopMatrix();
|
||||
}
|
||||
|
||||
{
|
||||
// Reset emissive component to zero (the default value)
|
||||
float render_color_emissive[4] = { 0.f, 0.f, 0.f, 1.f };
|
||||
::glMaterialfv(GL_FRONT, GL_EMISSION, render_color_emissive);
|
||||
}
|
||||
|
||||
if (!picking)
|
||||
::glDisable(GL_LIGHTING);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue