setValueM3 method

void setValueM3(
  1. RenderingContext gl,
  2. Matrix3? v, [
  3. WebGLTextures? textures
])

Implementation

void setValueM3(RenderingContext gl, Matrix3? v, [WebGLTextures? textures]) {
  final cache = this.cache;
  final elements = v?.storage;

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

    gl.uniformMatrix3fv(addr, false, elements!);

    copyArray(cache, v);
  }
  else if(kIsWeb){
    final element = elements.sublist(0);
    if (arraysEqual(cache, element)) {
      return;
    }

    gl.uniformMatrix3fv(addr, false, element);
    copyArray(cache, elements);
  }
  else {
    if (arraysEqual(cache, elements)) {
      return;
    }

    gl.uniformMatrix3fv(addr, false, elements);
    copyArray(cache, elements);
  }
}