allocTexUnits method

dynamic allocTexUnits(
  1. dynamic textures,
  2. dynamic n
)

Implementation

allocTexUnits(textures, n) {
  var r = arrayCacheI32[n];

  if (r == null) {
    r = Int32List(n);
    arrayCacheI32[n] = r;
  }

  for (var i = 0; i != n; ++i) {
    r[i] = textures.allocateTextureUnit();
  }

  return r;
}