private void fetchUniforms() {
        int len = GL20.glGetProgrami(program, GL20.GL_ACTIVE_UNIFORMS);
        // max length of all uniforms stored in program
        int strLen = GL20.glGetProgrami(program, GL20.GL_ACTIVE_UNIFORM_MAX_LENGTH);

        for (int i = 0; i < len; i++) {
            String name = GL20.glGetActiveUniform(program, i, strLen);
            int id = GL20.glGetUniformLocation(program, name);
            uniforms.put(name, id);
        }
    }