Normand Briere
2019-06-17 e36047725ce3217618d4e5807ac7c8769b9e3598
Composite.java
....@@ -867,15 +867,29 @@
867867 tex = GetTextures();
868868 }
869869
870
+ boolean failedPigment = false;
871
+ boolean failedBump = false;
872
+
870873 try
871874 {
872
- display.BindTextures(tex, texres);
875
+ display.BindPigmentTexture(tex, texres);
873876 }
874877 catch (Exception e)
875878 {
876879 System.err.println("FAILED: " + this);
880
+ failedPigment = true;
877881 }
878
-
882
+
883
+ try
884
+ {
885
+ display.BindBumpTexture(tex, texres);
886
+ }
887
+ catch (Exception e)
888
+ {
889
+ //System.err.println("FAILED: " + this);
890
+ failedBump = true;
891
+ }
892
+
879893 if (//true) // new NORMAND
880894 touched || softtouched)
881895 {
....@@ -937,7 +951,11 @@
937951 }
938952 }
939953
940
- display.ReleaseTextures(tex);
954
+ if (!failedBump)
955
+ display.ReleaseBumpTexture(tex);
956
+
957
+ if (!failedPigment)
958
+ display.ReleasePigmentTexture(tex);
941959 }
942960
943961 void Reset0()