Interface ContextManager

interface ContextManager {
    contextId: "webgl2" | "webgl";
    gl: WebGL2RenderingContext | WebGLRenderingContext;
    addContextListener(consumer: ContextConsumer): void;
    addRef?(): number;
    release?(): number;
    removeContextListener(consumer: ContextConsumer): void;
    synchronize(consumer: ContextConsumer): void;
}

Hierarchy (view full)

Implemented by

Properties

contextId: "webgl2" | "webgl"

The context identifier that was used to get the WebGL rendering context.

gl: WebGL2RenderingContext | WebGLRenderingContext

Methods

  • Increments the reference count of an Shareable instance.

    Returns number

    The new reference count. This value is intended to be used only for testing purposes.

  • Decrements the reference count of an Shareable instance.

    Returns number

    The new reference count. This value is intended to be used only for testing purposes.