Restored correct transparency of the cutting plane
This commit is contained in:
parent
b085710a4b
commit
06aaf83cfe
1 changed files with 71 additions and 73 deletions
|
@ -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…
Add table
Reference in a new issue