From 0f4fa9dc4191aaee9661c1e6d73725436ae64ac2 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Tue, 23 Jul 2019 03:30:10 -0400
Subject: [PATCH] Complete min shader.

---
 Object3D.java |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/Object3D.java b/Object3D.java
index 0fe5ff5..1b9b4c0 100644
--- a/Object3D.java
+++ b/Object3D.java
@@ -5775,6 +5775,38 @@
         }
     }
     
+    void EmbedTextures(boolean embed)
+    {
+        if (blockloop)
+            return;
+        
+        //if (GetTextures() != null)
+        if (embed)
+            CameraPane.EmbedTextures(GetTextures());
+        else
+        {
+            GetTextures().pigmentdata = null;
+            GetTextures().bumpdata = null;
+            GetTextures().pw = 0;
+            GetTextures().ph = 0;
+            GetTextures().bw = 0;
+            GetTextures().bh = 0;
+        }
+        
+        int nb = Size();
+        for (int i = 0; i < nb; i++)
+        {
+            Object3D child = (Object3D) get(i);
+
+            if (child == null)
+                continue;
+
+            blockloop = true;
+            child.EmbedTextures(embed);
+            blockloop = false;
+        }
+    }
+    
     void draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
     {
         Draw(display, root, selected, blocked);

--
Gitblit v1.6.2