function errorToString(gl, error) {
  let message = "WebGL Error:  ";
  switch (error) {
    case gl.INVALID_ENUM:
      message += "INVALID_ENUM";
      break;
    case gl.INVALID_VALUE:
      message += "INVALID_VALUE";
      break;
    case gl.INVALID_OPERATION:
      message += "INVALID_OPERATION";
      break;
    case gl.OUT_OF_MEMORY:
      message += "OUT_OF_MEMORY";
      break;
    case gl.CONTEXT_LOST_WEBGL:
      message += "CONTEXT_LOST_WEBGL lost";
      break;
    default:
      message += `Unknown (${error})`;
  }

  return message;
}
@typedef {object} WebGLOptions

WebGL options to be passed on to HTMLCanvasElement.getContext().
See {@link https://registry.khronos.org/webgl/specs/latest/1.0/#5.2|WebGLContextAttributes}
but note the modified defaults for 'alpha', 'stencil', and 'powerPreference'

<p>
<code>alpha</code> defaults to false, which can improve performance
compared to the standard WebGL default of true.  If an application needs
to composite Cesium above other HTML elements using alpha-blending, set
<code>alpha</code> to true.
</p>

@property {boolean} [alpha=false]
@property {boolean} [depth=true]
@property {boolean} [stencil=false]
@property {boolean} [antialias=true]
@property {boolean} [premultipliedAlpha=true]
@property {boolean} [preserveDrawingBuffer=false]
@property {("default"|"low-power"|"high-performance")} [powerPreference="high-performance"]
@property {boolean} [failIfMajorPerformanceCaveat=false]