()
| 881 | |
| 882 | |
| 883 | protected void unbindTextures() { |
| 884 | if (textures != null && texUnits != null) { |
| 885 | for (int loc: textures.keySet()) { |
| 886 | Texture tex = textures.get(loc); |
| 887 | Integer unit = texUnits.get(loc); |
| 888 | if (unit != null) { |
| 889 | pgl.activeTexture(PGL.TEXTURE0 + unit); |
| 890 | tex.unbind(); |
| 891 | } else { |
| 892 | throw new RuntimeException("Cannot find unit for texture " + tex); |
| 893 | } |
| 894 | } |
| 895 | pgl.activeTexture(PGL.TEXTURE0); |
| 896 | } |
| 897 | } |
| 898 | |
| 899 | |
| 900 | public void init() { |
no test coverage detected