melonJS
    Preparing search index...

    Function isWebGLSupported

    • Returns true if the device supports WebGL 2 — the version the WebGL renderer requires since 20.0. This probes the same context type that renderer construction requests, so the two can never disagree.

      When it returns false, renderer: video.AUTO falls back to the Canvas renderer and renderer: video.WEBGL throws at construction time.

      Parameters

      • Optionaloptions: { failIfMajorPerformanceCaveat?: boolean }

        context creation options

        • OptionalfailIfMajorPerformanceCaveat?: boolean

          if true, report WebGL as unsupported when the browser warns that a context would perform dramatically worse than a native application (e.g. a software rasterizer). Set false to accept WebGL on blocklisted drivers or software renderers.

      Returns boolean

      true if WebGL 2 is supported