Options
All
  • Public
  • Public/Protected
  • All
Menu

Helper class to extract WebGL1/2 detection and context creation

Hierarchy

  • WebGlHelper

Index

Methods

Static getContext

  • getContext(canvas: HTMLCanvasElement, options?: WebGLContextAttributes): WebGLRenderingContext | null
  • Calls canvas.getContext() passing in "webgl" or "webgl2" depending on current browser WebGL Support.

    Parameters

    • canvas: HTMLCanvasElement
    • Optional options: WebGLContextAttributes

    Returns WebGLRenderingContext | null

Static getWebGlSupport

Static initialize

  • initialize(): void
  • Static initializer function. Is called once by the framework on startup

    Returns void

Generated using TypeDoc