Normand Briere
2019-07-27 1af7d3700724834e40ad8636bc9a56cdc3b19b15
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 {
....@@ -789,6 +790,8 @@
789790
790791 void draw(ClickInfo info, int level, boolean select)
791792 {
793
+ new Exception().printStackTrace();
794
+
792795 ClickInfo newInfo = new ClickInfo();
793796 newInfo.flags = info.flags;
794797 newInfo.bounds = info.bounds;
....@@ -866,15 +869,29 @@
866869 tex = GetTextures();
867870 }
868871
872
+ boolean failedPigment = false;
873
+ boolean failedBump = false;
874
+
869875 try
870876 {
871
- display.BindTextures(tex, texres);
877
+ display.BindPigmentTexture(tex, texres);
872878 }
873879 catch (Exception e)
874880 {
875881 System.err.println("FAILED: " + this);
882
+ failedPigment = true;
876883 }
877
-
884
+
885
+ try
886
+ {
887
+ display.BindBumpTexture(tex, texres);
888
+ }
889
+ catch (Exception e)
890
+ {
891
+ //System.err.println("FAILED: " + this);
892
+ failedBump = true;
893
+ }
894
+
878895 if (//true) // new NORMAND
879896 touched || softtouched)
880897 {
....@@ -936,7 +953,11 @@
936953 }
937954 }
938955
939
- display.ReleaseTextures(tex);
956
+ if (!failedBump)
957
+ display.ReleaseBumpTexture(tex);
958
+
959
+ if (!failedPigment)
960
+ display.ReleasePigmentTexture(tex);
940961 }
941962
942963 void Reset0()