/** * A WebGL2 context shared by every chart on the page: browsers allow only a * few live contexts (8-16), and dashboards can have more charts than that. * Users draw into it and copy the result out before anyone else draws, and * set every piece of state they depend on: nothing is reset between users. * * @ignore */ export interface ISharedGL { canvas: HTMLCanvasElement; gl: WebGL2RenderingContext; /** * Changes when a lost context is restored: textures and programs made * before are gone. */ generation: number; } /** * The shared context, or `undefined` without WebGL2, with software-only * WebGL, or while the context is lost. * * @ignore */ export declare function sharedGL(): ISharedGL | undefined; /** * Counts a user of the shared context in; `releaseGL()` counts it out. * * @ignore */ export declare function retainGL(): void; /** * With no users left, the canvas gives back the memory of the largest * drawing made in it. The context stays, for whoever comes next. * * @ignore */ export declare function releaseGL(): void; /** * Compiles and links a program, or `undefined` with a console warning. * * @ignore */ export declare function makeProgram(gl: WebGL2RenderingContext, vertexSource: string, fragmentSource: string): WebGLProgram | undefined; //# sourceMappingURL=WebGL.d.ts.map