.. | .. |
---|
160 | 160 | // //Touch(); |
---|
161 | 161 | // } |
---|
162 | 162 | |
---|
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 | +// } |
---|
193 | 194 | |
---|
194 | 195 | boolean ReadOnly() |
---|
195 | 196 | { |
---|
.. | .. |
---|
205 | 206 | |
---|
206 | 207 | boolean HasLoops() |
---|
207 | 208 | { |
---|
| 209 | + new Exception().printStackTrace(); |
---|
208 | 210 | System.exit(0); |
---|
209 | 211 | if (blockloop) |
---|
210 | 212 | { |
---|
.. | .. |
---|
348 | 350 | |
---|
349 | 351 | void getBounds0(cVector minima, cVector maxima, boolean xform) |
---|
350 | 352 | { |
---|
| 353 | + new Exception().printStackTrace(); |
---|
351 | 354 | System.exit(0); |
---|
352 | 355 | minima.x = minima.y = minima.z = 1E10; |
---|
353 | 356 | maxima.x = maxima.y = maxima.z = -1E10; |
---|
.. | .. |
---|
787 | 790 | |
---|
788 | 791 | void draw(ClickInfo info, int level, boolean select) |
---|
789 | 792 | { |
---|
| 793 | + new Exception().printStackTrace(); |
---|
| 794 | + |
---|
790 | 795 | ClickInfo newInfo = new ClickInfo(); |
---|
791 | 796 | newInfo.flags = info.flags; |
---|
792 | 797 | newInfo.bounds = info.bounds; |
---|
.. | .. |
---|
864 | 869 | tex = GetTextures(); |
---|
865 | 870 | } |
---|
866 | 871 | |
---|
867 | | - display.BindTextures(tex, texres); |
---|
| 872 | + boolean failedPigment = false; |
---|
| 873 | + boolean failedBump = false; |
---|
868 | 874 | |
---|
| 875 | + try |
---|
| 876 | + { |
---|
| 877 | + display.BindPigmentTexture(tex, texres); |
---|
| 878 | + } |
---|
| 879 | + catch (Exception e) |
---|
| 880 | + { |
---|
| 881 | + System.err.println("FAILED: " + this); |
---|
| 882 | + failedPigment = true; |
---|
| 883 | + } |
---|
| 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 | + |
---|
869 | 895 | if (//true) // new NORMAND |
---|
870 | 896 | touched || softtouched) |
---|
871 | 897 | { |
---|
.. | .. |
---|
927 | 953 | } |
---|
928 | 954 | } |
---|
929 | 955 | |
---|
930 | | - display.ReleaseTextures(tex); |
---|
| 956 | + if (!failedBump) |
---|
| 957 | + display.ReleaseBumpTexture(tex); |
---|
| 958 | + |
---|
| 959 | + if (!failedPigment) |
---|
| 960 | + display.ReleasePigmentTexture(tex); |
---|
931 | 961 | } |
---|
932 | 962 | |
---|
933 | 963 | void Reset0() |
---|