• Parameters

    • gl: WebGLRenderingContext | WebGL2RenderingContext

      a WebGL instance

    • canvas: HTMLCanvasElement

      an HTML canvas

    Returns undefined

    Description

    Initialize a viewport for a WebGL context based on the dimensions of the canvas.