code: function canGenerateMipmap(gl, width, height, internalFormat /*, type */) {
    if (!utils.isWebGL2(gl)) {
      return isPowerOf2(width) && isPowerOf2(height);
    }
    const info = textureInternalFormatInfo[internalFormat];
    if (!info) {
      throw "unknown internal format";
    }
    return info.colorRenderable && info.textureFilterable;
  }
docs: Gets whether or not we can generate mips for the given
  internal format.
  
  @param {number} internalFormat The internalFormat parameter from texImage2D etc..
  @param {number} type The type parameter for texImage2D etc..
  @return {boolean} true if we can generate mips
  @memberOf module:twgl/textures