setValueM3 method

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

Implementation

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

  if (elements == null) {
    if (arraysEqual(cache, v)) return;

    gl.uniformMatrix3fv(addr, false, v);

    copyArray(cache, v);
  } else {
    if (arraysEqual(cache, elements)) {
      return;
    }

    // TODO ???
    // mat3array.set( elements );

    gl.uniformMatrix3fv(addr, false, elements);

    copyArray(cache, elements);
  }
}