mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-07 20:29:09 +08:00
Restored correct transparency of the cutting plane
This commit is contained in:
parent
b085710a4b
commit
06aaf83cfe
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user