From cbe4e90105d07d7d3fecabffaa01342403aa2ae3 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Thu, 19 Sep 2019 20:54:00 -0400 Subject: [PATCH] Better navigation. --- Composite.java | 39 +++++++++++++++++++++++++++++++-------- 1 files changed, 31 insertions(+), 8 deletions(-) diff --git a/Composite.java b/Composite.java index 2a525ae..32ee24c 100644 --- a/Composite.java +++ b/Composite.java @@ -279,11 +279,15 @@ Composite compo = new Composite(); - super.deepCopySelf(compo); + super.deepCopyNode(compo); + + compo.count = 2; for (int i = 0; i < Children().size(); i++) { Object3D obj = (Object3D) Children().reserve(i); + if (obj == null) + continue; compo.addChild(obj.copyExpand()); Children().release(i); } @@ -293,9 +297,9 @@ return compo; } - protected void deepCopySelf(Object3D other) + protected void deepCopyNode(Object3D other) { - super.deepCopySelf(other); + super.deepCopyNode(other); if (false) { @@ -401,7 +405,6 @@ { child = (Object3D) e.nextElement(); } - } void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root) @@ -790,6 +793,8 @@ void draw(ClickInfo info, int level, boolean select) { + new Exception().printStackTrace(); + ClickInfo newInfo = new ClickInfo(); newInfo.flags = info.flags; newInfo.bounds = info.bounds; @@ -867,15 +872,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); + // 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 +956,11 @@ } } - display.ReleaseTextures(tex); + if (!failedBump) + display.ReleaseBumpTexture(tex); + + if (!failedPigment) + display.ReleasePigmentTexture(tex); } void Reset0() -- Gitblit v1.6.2