.. | .. |
---|
867 | 867 | tex = GetTextures(); |
---|
868 | 868 | } |
---|
869 | 869 | |
---|
| 870 | + boolean failedPigment = false; |
---|
| 871 | + boolean failedBump = false; |
---|
| 872 | + |
---|
870 | 873 | try |
---|
871 | 874 | { |
---|
872 | | - display.BindTextures(tex, texres); |
---|
| 875 | + display.BindPigmentTexture(tex, texres); |
---|
873 | 876 | } |
---|
874 | 877 | catch (Exception e) |
---|
875 | 878 | { |
---|
876 | 879 | System.err.println("FAILED: " + this); |
---|
| 880 | + failedPigment = true; |
---|
877 | 881 | } |
---|
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 | + |
---|
879 | 893 | if (//true) // new NORMAND |
---|
880 | 894 | touched || softtouched) |
---|
881 | 895 | { |
---|
.. | .. |
---|
937 | 951 | } |
---|
938 | 952 | } |
---|
939 | 953 | |
---|
940 | | - display.ReleaseTextures(tex); |
---|
| 954 | + if (!failedBump) |
---|
| 955 | + display.ReleaseBumpTexture(tex); |
---|
| 956 | + |
---|
| 957 | + if (!failedPigment) |
---|
| 958 | + display.ReleasePigmentTexture(tex); |
---|
941 | 959 | } |
---|
942 | 960 | |
---|
943 | 961 | void Reset0() |
---|