Normand Briere
2019-07-27 1af7d3700724834e40ad8636bc9a56cdc3b19b15
Composite.java
....@@ -790,6 +790,8 @@
790790
791791 void draw(ClickInfo info, int level, boolean select)
792792 {
793
+ new Exception().printStackTrace();
794
+
793795 ClickInfo newInfo = new ClickInfo();
794796 newInfo.flags = info.flags;
795797 newInfo.bounds = info.bounds;
....@@ -867,15 +869,29 @@
867869 tex = GetTextures();
868870 }
869871
872
+ boolean failedPigment = false;
873
+ boolean failedBump = false;
874
+
870875 try
871876 {
872
- display.BindTextures(tex, texres);
877
+ display.BindPigmentTexture(tex, texres);
873878 }
874879 catch (Exception e)
875880 {
876881 System.err.println("FAILED: " + this);
882
+ failedPigment = true;
877883 }
878
-
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
+
879895 if (//true) // new NORMAND
880896 touched || softtouched)
881897 {
....@@ -937,7 +953,11 @@
937953 }
938954 }
939955
940
- display.ReleaseTextures(tex);
956
+ if (!failedBump)
957
+ display.ReleaseBumpTexture(tex);
958
+
959
+ if (!failedPigment)
960
+ display.ReleasePigmentTexture(tex);
941961 }
942962
943963 void Reset0()