WebGLUniforms constructor

WebGLUniforms(
  1. dynamic gl,
  2. WebGLProgram program
)

Implementation

WebGLUniforms(this.gl, this.program) {
  seq = [];
  map = {};

  var n = gl.getProgramParameter(program.program, gl.ACTIVE_UNIFORMS);

  for (var i = 0; i < n; ++i) {
    var info = gl.getActiveUniform(program.program, i);
    var addr = gl.getUniformLocation(program.program, info.name);
    parseUniform(info, addr, this);
  }
}