()
| 856 | |
| 857 | |
| 858 | protected void bindTextures() { |
| 859 | if (textures != null && texUnits != null) { |
| 860 | for (int loc: textures.keySet()) { |
| 861 | Texture tex = textures.get(loc); |
| 862 | Integer unit = texUnits.get(loc); |
| 863 | if (unit != null) { |
| 864 | pgl.activeTexture(PGL.TEXTURE0 + unit); |
| 865 | tex.bind(); |
| 866 | } else { |
| 867 | throw new RuntimeException("Cannot find unit for texture " + tex); |
| 868 | } |
| 869 | } |
| 870 | } |
| 871 | } |
| 872 | |
| 873 | |
| 874 | protected void unbindTextures() { |
no test coverage detected