function canGenerateMipmap(gl, width, height, internalFormat) {
  if (!utils.isWebGL2(gl)) {
    return isPowerOf2(width) && isPowerOf2(height);
  }

  var info = getTextureInternalFormatInfo(internalFormat);

  if (!info) {
    throw "unknown internal format";
  }

  return info.colorRenderable && info.textureFilterable;
}
Gets whether or not we can generate mips for the given
internal format.

@param {WebGLRenderingContext} gl the WebGLRenderingContext
@param {number} width The width parameter from texImage2D etc..
@param {number} height The height parameter from texImage2D etc..
@param {number} internalFormat The internalFormat parameter from texImage2D etc..
@return {boolean} true if we can generate mips
@memberOf module:twgl/textures