setValueV1i method

dynamic setValueV1i(
  1. dynamic gl,
  2. dynamic v, [
  3. WebGLTextures? textures
])

Implementation

setValueV1i(gl, v, [WebGLTextures? textures]) {
  var cache = this.cache;

  if (cache[0] == v) return;

  if (v is bool) {
    if (v) {
      gl.uniform1i(addr, 1);
    } else {
      gl.uniform1i(addr, 0);
    }
  } else {
    gl.uniform1i(addr, v.toInt());
  }

  cache[0] = v;
}