From c67da2e5d8655704601d6d06e8bc60aabe212253 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sun, 23 Jun 2019 21:49:12 -0400
Subject: [PATCH] Compute shadow when live option.

---
 Object3D.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Object3D.java b/Object3D.java
index a5ae9d9..45bb2a6 100644
--- a/Object3D.java
+++ b/Object3D.java
@@ -881,7 +881,7 @@
         
         if (marked && Globals.isLIVE() && live &&
                 //TEMP21aug2018
-                (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
+                (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) &&
                 currentframe != Globals.framecount)
         {
             currentframe = Globals.framecount;
@@ -966,6 +966,7 @@
         if (material == null || material.multiply)
             return true;
         
+        // Transparent objects are dynamic because we have to sort the triangles.
         return material.opacity > 0.99;
     }
     
@@ -5750,7 +5751,7 @@
             support = support;
         
         //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
-        boolean usecalllists = IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
+        boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
         
         if (!usecalllists && bRep != null && bRep.displaylist > 0)
         {
@@ -5771,7 +5772,7 @@
         
         if (!selectmode && //display.DrawMode() != display.SELECTION &&
                 //(touched || (bRep != null && bRep.displaylist <= 0)))
-                (Globals.isLIVE() || touched && (bRep != null && bRep.displaylist <= 0)))
+                (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && (bRep != null && bRep.displaylist <= 0)))
         {
             Globals.lighttouched = true;
         } // all panes...

--
Gitblit v1.6.2