From 21104baa536c6b3d3d0f9ecb7231222ed706f0e8 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Tue, 25 Jun 2019 18:27:08 -0400
Subject: [PATCH] Fix camera values

---
 Composite.java |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/Composite.java b/Composite.java
index 2a525ae..9244c31 100644
--- a/Composite.java
+++ b/Composite.java
@@ -867,15 +867,29 @@
         tex = GetTextures();
     }
 
+    boolean failedPigment = false;
+    boolean failedBump = false;
+    
     try
     {
-        display.BindTextures(tex, texres);
+        display.BindPigmentTexture(tex, texres);
     }
     catch (Exception e)
     {
         System.err.println("FAILED: " + this);
+        failedPigment = true;
     }
-    
+           
+    try
+    {
+        display.BindBumpTexture(tex, texres);
+    }
+    catch (Exception e)
+    {
+        //System.err.println("FAILED: " + this);
+        failedBump = true;
+    }
+               
         if (//true) // new NORMAND
             touched || softtouched)
         {
@@ -937,7 +951,11 @@
             }
         }
     
-    display.ReleaseTextures(tex);
+    if (!failedBump)
+        display.ReleaseBumpTexture(tex);
+    
+    if (!failedPigment)
+        display.ReleasePigmentTexture(tex);
     }
 
     void Reset0()

--
Gitblit v1.6.2