From 0a52bd4800459cd9935f360d7ca9555b6bea2146 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Fri, 19 Jul 2019 20:56:44 -0400 Subject: [PATCH] CSG + paint mode. --- 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