.. | .. |
---|
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 | { |
---|
.. | .. |
---|
400 | 401 | { |
---|
401 | 402 | child = (Object3D) e.nextElement(); |
---|
402 | 403 | } |
---|
403 | | - |
---|
404 | 404 | } |
---|
405 | 405 | |
---|
406 | 406 | void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root) |
---|
.. | .. |
---|
789 | 789 | |
---|
790 | 790 | void draw(ClickInfo info, int level, boolean select) |
---|
791 | 791 | { |
---|
| 792 | + new Exception().printStackTrace(); |
---|
| 793 | + |
---|
792 | 794 | ClickInfo newInfo = new ClickInfo(); |
---|
793 | 795 | newInfo.flags = info.flags; |
---|
794 | 796 | newInfo.bounds = info.bounds; |
---|
.. | .. |
---|
866 | 868 | tex = GetTextures(); |
---|
867 | 869 | } |
---|
868 | 870 | |
---|
| 871 | + boolean failedPigment = false; |
---|
| 872 | + boolean failedBump = false; |
---|
| 873 | + |
---|
869 | 874 | try |
---|
870 | 875 | { |
---|
871 | | - display.BindTextures(tex, texres); |
---|
| 876 | + display.BindPigmentTexture(tex, texres); |
---|
872 | 877 | } |
---|
873 | 878 | catch (Exception e) |
---|
874 | 879 | { |
---|
875 | | - System.err.println("FAILED: " + this); |
---|
| 880 | + // System.err.println("FAILED: " + this); |
---|
| 881 | + failedPigment = true; |
---|
876 | 882 | } |
---|
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 | + |
---|
878 | 894 | if (//true) // new NORMAND |
---|
879 | 895 | touched || softtouched) |
---|
880 | 896 | { |
---|
.. | .. |
---|
936 | 952 | } |
---|
937 | 953 | } |
---|
938 | 954 | |
---|
939 | | - display.ReleaseTextures(tex); |
---|
| 955 | + if (!failedBump) |
---|
| 956 | + display.ReleaseBumpTexture(tex); |
---|
| 957 | + |
---|
| 958 | + if (!failedPigment) |
---|
| 959 | + display.ReleasePigmentTexture(tex); |
---|
940 | 960 | } |
---|
941 | 961 | |
---|
942 | 962 | void Reset0() |
---|