private int fetchUniformLocation (String name) {
GL20 gl = Gdx.graphics.getGL20();
int location;
if ((location = uniforms.get(name, -1)) == -1) {
location = gl.glGetUniformLocation(program, name);
if (location == -1 && pedantic) throw new IllegalArgumentException("no uniform with name '" + name + "' in shader");
uniforms.put(name, location);
}
return location;
}