From 8768a855af9ccc482a9520ce708ef32e0e6e0e7d Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Fri, 04 Oct 2019 20:06:36 -0400 Subject: [PATCH] Block multiple download. --- Composite.java | 103 +++++++++++++++++++++++++++++++++------------------ 1 files changed, 67 insertions(+), 36 deletions(-) diff --git a/Composite.java b/Composite.java index bffa912..32ee24c 100644 --- a/Composite.java +++ b/Composite.java @@ -160,36 +160,37 @@ // //Touch(); // } - public void clear() - { - if (blockloop) - { - //blockloop = false; - return; - } - - blockloop = true; - //Applet3D.tracein("Clear", this); - for (int i = 0; i < Children().size(); i++) - { - Object3D obj = (Object3D) Children().get(i); // reserve(i); - - //if (!obj.ReadOnly()) // Object3D Serial... - if (!(obj instanceof Composite) || !((Composite) obj).ReadOnly()) - { - obj.clear(); - //Children().release(i); - Children().remove(i); - --i; - } else - { - //Children().release(i); - } - } - //Applet3D.traceout("Clear", this); - - blockloop = false; - } + // JUNE 2019??? That cannot work... +// public void clear() +// { +// if (blockloop) +// { +// //blockloop = false; +// return; +// } +// +// blockloop = true; +// //Applet3D.tracein("Clear", this); +// for (int i = 0; i < Children().size(); i++) +// { +// Object3D obj = (Object3D) Children().get(i); // reserve(i); +// +// //if (!obj.ReadOnly()) // Object3D Serial... +// if (!(obj instanceof Composite) || !((Composite) obj).ReadOnly()) +// { +// obj.clear(); +// //Children().release(i); +// Children().remove(i); +// --i; +// } else +// { +// //Children().release(i); +// } +// } +// //Applet3D.traceout("Clear", this); +// +// blockloop = false; +// } boolean ReadOnly() { @@ -278,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); } @@ -292,9 +297,9 @@ return compo; } - protected void deepCopySelf(Object3D other) + protected void deepCopyNode(Object3D other) { - super.deepCopySelf(other); + super.deepCopyNode(other); if (false) { @@ -400,7 +405,6 @@ { child = (Object3D) e.nextElement(); } - } void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root) @@ -789,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; @@ -866,8 +872,29 @@ tex = GetTextures(); } - display.BindTextures(tex, texres); + boolean failedPigment = false; + boolean failedBump = false; + try + { + 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) { @@ -929,7 +956,11 @@ } } - display.ReleaseTextures(tex); + if (!failedBump) + display.ReleaseBumpTexture(tex); + + if (!failedPigment) + display.ReleasePigmentTexture(tex); } void Reset0() -- Gitblit v1.6.2