allocateTextureUnit method

int allocateTextureUnit()

Implementation

int allocateTextureUnit() {
  int textureUnit = textureUnits;

  if (textureUnit >= maxTextures) {
    print(
        'THREE.WebGLTextures: Trying to use $textureUnit texture units while this GPU supports only $maxTextures');
  }

  textureUnits += 1;

  return textureUnit;
}