setValueT1 method

dynamic setValueT1(
  1. dynamic gl,
  2. dynamic v,
  3. WebGLTextures textures
)

Implementation

setValueT1(gl, v, WebGLTextures textures) {
  var cache = this.cache;
  var unit = textures.allocateTextureUnit();

  if (cache[0] != unit) {
    gl.uniform1i(addr, unit);
    cache[0] = unit;
  }

  textures.setTexture2D(v ?? emptyTexture, unit);
}