Enable transparency on design workspace bed

- Issue MatterHackers/MCCentral#5450
Looking up in design view has no bed transparency
This commit is contained in:
John Lewin 2019-05-03 11:12:40 -07:00
parent 3e10d89540
commit b60c2ef960

View file

@ -122,8 +122,19 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
GL.Disable(EnableCap.Lighting);
GL.Disable(EnableCap.CullFace);
var bedColor = LookingDownOnBed ? theme.BedColor : theme.UnderBedColor;
if (bedColor.Alpha0To1 < 1)
{
GL.Enable(EnableCap.Blend);
}
else
{
GL.Disable(EnableCap.Blend);
}
// Draw grid background with active BedColor
GL.Color4(theme.BedColor);
GL.Color4(bedColor);
GL.Begin(BeginMode.TriangleStrip);
GL.Vertex3(-width, -width, 0);
GL.Vertex3(-width, width, 0);