From 40f408aaee14abd85d391008b4d22977dc586b50 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 21 Jul 2019 16:45:10 -0400 Subject: [PATCH] Prepare bimtexture. --- 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