pixi.js
    Preparing search index...

    Class GlContextSystemAdvanced

    System plugin to the renderer to manage the context

    Implements

    Index

    Constructors

    Properties

    canvas: ICanvas

    The canvas that the WebGL Context is rendering to. This will be the view canvas. But if multiView is enabled, this canvas will not be attached to the DOM. It will be rendered to and then copied to the target canvas.

    extensions: WebGLExtensions

    Extensions available.

    multiView: boolean

    Whether to enable multi-view rendering. Set to true when rendering to multiple canvases on the dom.

    false
    
    supports: {
        msaa: boolean;
        nonPowOf2mipmaps: boolean;
        nonPowOf2wrapping: boolean;
        srgbTextures: boolean;
        uint32Indices: boolean;
        uniformBufferObject: boolean;
        vertexArrayObject: boolean;
    } = ...

    Features supported by current renderer.

    Type declaration

    • msaa: boolean

      Support for MSAA (antialiasing of dynamic textures)

    • nonPowOf2mipmaps: boolean

      Support for mipmaps if a texture is non-power of two

    • nonPowOf2wrapping: boolean

      Support for wrapping modes if a texture is non-power of two

    • srgbTextures: boolean

      Support for SRGB texture format

    • uint32Indices: boolean

      Support for 32-bit indices buffer.

    • uniformBufferObject: boolean

      Support for UniformBufferObjects

    • vertexArrayObject: boolean

      Support for VertexArrayObjects

    webGLVersion: 1 | 2
    defaultOptions: ContextSystemOptions = ...

    The default options for the system.

    Accessors

    • get isLost(): boolean

      true if the context is lost

      Returns boolean

    Methods

    • Generic destroy methods to be overridden by the subclass

      Returns void

    • Parameters

      Returns void

    • this function can be called to force a webGL context loss this will release all resources on the GPU. Useful if you need to put Pixi to sleep, and save some GPU memory

      As soon as render is called - all resources will be created again.

      Returns void