()
| 872 | |
| 873 | |
| 874 | protected void unbindTextures() { |
| 875 | if (textures != null && texUnits != null) { |
| 876 | for (int loc: textures.keySet()) { |
| 877 | Texture tex = textures.get(loc); |
| 878 | Integer unit = texUnits.get(loc); |
| 879 | if (unit != null) { |
| 880 | pgl.activeTexture(PGL.TEXTURE0 + unit); |
| 881 | tex.unbind(); |
| 882 | } else { |
| 883 | throw new RuntimeException("Cannot find unit for texture " + tex); |
| 884 | } |
| 885 | } |
| 886 | pgl.activeTexture(PGL.TEXTURE0); |
| 887 | } |
| 888 | } |
| 889 | |
| 890 | |
| 891 | public void init() { |
no test coverage detected