mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00: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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user