message: Fix setting webGLVersion with external context
diff: @@ -285,6 +285,13 @@ export class ContextSystem extends System
  {
  const attributes = gl.getContextAttributes();
  + const isWebGl2 = 'WebGL2RenderingContext' in window && gl instanceof window.WebGL2RenderingContext;
  +
  + if (isWebGl2)
  + {
  + this.webGLVersion = 2;
  + }
  +
  // this is going to be fairly simple for now.. but at least we have room to grow!
  if (!attributes.stencil)
  {
  @@ -293,9 +300,7 @@ export class ContextSystem extends System
  /* eslint-enable max-len, no-console */
  }
  - const hasuint32
  - = ('WebGL2RenderingContext' in window && gl instanceof window.WebGL2RenderingContext)
  - || !!(gl as WebGLRenderingContext).getExtension('OES_element_index_uint');
  + const hasuint32 = isWebGl2 || !!(gl as WebGLRenderingContext).getExtension('OES_element_index_uint');
  this.supports.uint32Indices = hasuint32;
  