Normand Briere
2019-09-02 0216409e390b2005d6bc4eaf564ef9ca2e508dab
Composite.java
....@@ -160,36 +160,37 @@
160160 // //Touch();
161161 // }
162162
163
- public void clear()
164
- {
165
- if (blockloop)
166
- {
167
- //blockloop = false;
168
- return;
169
- }
170
-
171
- blockloop = true;
172
- //Applet3D.tracein("Clear", this);
173
- for (int i = 0; i < Children().size(); i++)
174
- {
175
- Object3D obj = (Object3D) Children().get(i); // reserve(i);
176
-
177
- //if (!obj.ReadOnly()) // Object3D Serial...
178
- if (!(obj instanceof Composite) || !((Composite) obj).ReadOnly())
179
- {
180
- obj.clear();
181
- //Children().release(i);
182
- Children().remove(i);
183
- --i;
184
- } else
185
- {
186
- //Children().release(i);
187
- }
188
- }
189
- //Applet3D.traceout("Clear", this);
190
-
191
- blockloop = false;
192
- }
163
+ // JUNE 2019??? That cannot work...
164
+// public void clear()
165
+// {
166
+// if (blockloop)
167
+// {
168
+// //blockloop = false;
169
+// return;
170
+// }
171
+//
172
+// blockloop = true;
173
+// //Applet3D.tracein("Clear", this);
174
+// for (int i = 0; i < Children().size(); i++)
175
+// {
176
+// Object3D obj = (Object3D) Children().get(i); // reserve(i);
177
+//
178
+// //if (!obj.ReadOnly()) // Object3D Serial...
179
+// if (!(obj instanceof Composite) || !((Composite) obj).ReadOnly())
180
+// {
181
+// obj.clear();
182
+// //Children().release(i);
183
+// Children().remove(i);
184
+// --i;
185
+// } else
186
+// {
187
+// //Children().release(i);
188
+// }
189
+// }
190
+// //Applet3D.traceout("Clear", this);
191
+//
192
+// blockloop = false;
193
+// }
193194
194195 boolean ReadOnly()
195196 {
....@@ -400,7 +401,6 @@
400401 {
401402 child = (Object3D) e.nextElement();
402403 }
403
-
404404 }
405405
406406 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -789,6 +789,8 @@
789789
790790 void draw(ClickInfo info, int level, boolean select)
791791 {
792
+ new Exception().printStackTrace();
793
+
792794 ClickInfo newInfo = new ClickInfo();
793795 newInfo.flags = info.flags;
794796 newInfo.bounds = info.bounds;
....@@ -866,15 +868,29 @@
866868 tex = GetTextures();
867869 }
868870
871
+ boolean failedPigment = false;
872
+ boolean failedBump = false;
873
+
869874 try
870875 {
871
- display.BindTextures(tex, texres);
876
+ display.BindPigmentTexture(tex, texres);
872877 }
873878 catch (Exception e)
874879 {
875
- System.err.println("FAILED: " + this);
880
+ // System.err.println("FAILED: " + this);
881
+ failedPigment = true;
876882 }
877
-
883
+
884
+ try
885
+ {
886
+ display.BindBumpTexture(tex, texres);
887
+ }
888
+ catch (Exception e)
889
+ {
890
+ //System.err.println("FAILED: " + this);
891
+ failedBump = true;
892
+ }
893
+
878894 if (//true) // new NORMAND
879895 touched || softtouched)
880896 {
....@@ -936,7 +952,11 @@
936952 }
937953 }
938954
939
- display.ReleaseTextures(tex);
955
+ if (!failedBump)
956
+ display.ReleaseBumpTexture(tex);
957
+
958
+ if (!failedPigment)
959
+ display.ReleasePigmentTexture(tex);
940960 }
941961
942962 void Reset0()