mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +00:00
Restored correct transparency of the cutting plane
This commit is contained in:
@@ -729,9 +729,7 @@ sub Render {
|
||||
|
||||
# draw ground and axes
|
||||
glDisable(GL_LIGHTING);
|
||||
my $z0 = 0;
|
||||
|
||||
{
|
||||
# draw ground
|
||||
my $ground_z = GROUND_Z;
|
||||
if ($self->bed_triangles) {
|
||||
@@ -787,11 +785,17 @@ sub Render {
|
||||
glEnd();
|
||||
}
|
||||
|
||||
glEnable(GL_LIGHTING);
|
||||
|
||||
# draw objects
|
||||
$self->draw_volumes;
|
||||
|
||||
# draw cutting plane
|
||||
if (defined $self->cutting_plane_z) {
|
||||
my $plane_z = $z0 + $self->cutting_plane_z;
|
||||
my $plane_z = $self->cutting_plane_z;
|
||||
my $bb = $volumes_bb;
|
||||
glDisable(GL_CULL_FACE);
|
||||
glDisable(GL_LIGHTING);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glBegin(GL_QUADS);
|
||||
@@ -804,12 +808,6 @@ sub Render {
|
||||
glEnable(GL_CULL_FACE);
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
glEnable(GL_LIGHTING);
|
||||
|
||||
# draw objects
|
||||
$self->draw_volumes;
|
||||
|
||||
glFlush();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user