This commit is contained in:
John Lewin 2018-02-02 18:33:35 -08:00
parent ea9de0d609
commit 330aa821e0

View file

@ -468,19 +468,17 @@ namespace MatterHackers.MeshVisualizer
Color drawColor = GetItemColor(item);
bool isDebugItem = false;
bool renderAsSolid = drawColor.alpha == 255;
#if DEBUG
isDebugItem = scene.DebugItem == item;
renderAsSolid = (renderAsSolid && scene.DebugItem == null)
|| isDebugItem;
#endif
if (renderAsSolid)
bool isDebugItem = (item == scene.DebugItem);
if (drawColor.alpha == 255
|| isDebugItem)
{
GLHelper.Render(item.Mesh, drawColor, item.WorldMatrix(scene.RootItem), RenderType, item.WorldMatrix(scene.RootItem) * World.ModelviewMatrix);
// Render as solid
GLHelper.Render(item.Mesh, drawColor, item.WorldMatrix(scene.RootItem), this.RenderType, item.WorldMatrix(scene.RootItem) * World.ModelviewMatrix);
}
else
{
// Queue for transparency
transparentMeshes.Add(item);
}