WebGLUniforms constructor

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

Implementation

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

  final n = gl.getProgramParameter(program.program!, WebGL.ACTIVE_UNIFORMS);

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