Function resizeContext

  • Resizes a canvas' drawing buffer to match its physical size, a viewport to match the drawing buffer, and disables the scissor test.

    Returns

    Whether the drawing buffer was resized.

    Parameters

    • gl: WebGL2RenderingContext

      The rendering context of the canvas, viewport, and scissor box.

    Returns boolean

  • Resizes a context's canvas' drawing buffer to match its physical size, the context's viewport and scissor box to match the given size, and enables the scissor test.

    Returns

    Whether the drawing buffer was resized.

    Parameters

    • gl: WebGL2RenderingContext

      The rendering context of the canvas, viewport, and scissor box.

    • x: number

      The horizontal offset of the viewport and scissor box.

    • y: number

      The vertical offset of the viewport and scissor box.

    • width: number

      The horizontal size of the viewport and scissor box.

    • height: number

      The vertical size of the viewport and scissor box.

    Returns boolean

Generated using TypeDoc