allocTexUnits method

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

Implementation

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

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

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

  return r;
}