/**
 * @param {WebGL2RenderingContext} gl
 * @param {WebGLShader} vertexShader
 * @param {WebGLShader} fragmentShader
 */
export function createProgram(gl: WebGL2RenderingContext, vertexShader: WebGLShader, fragmentShader: WebGLShader): {
    program: WebGLProgram;
    getProgramErrors: () => {
        message: string;
        detail: string;
    };
};
/**
 * @param {WebGLRenderingContext} gl
 * @param {Omit<import("twgl.js").TextureOptions, "src">} options
 * @param {number[] | ArrayBufferView} src
 * @param {WebGLTexture} [texture]
 */
export function createOrUpdateTexture(gl: WebGLRenderingContext, options: Omit<import("twgl.js").TextureOptions, "src">, src: number[] | ArrayBufferView, texture?: WebGLTexture): WebGLTexture;
/**
 *
 * @param {WebGL2RenderingContext} gl
 * @param {import("twgl.js").FramebufferInfo} framebufferInfo
 * @param {number} x
 * @param {number} y
 */
export function readPickingPixel(gl: WebGL2RenderingContext, framebufferInfo: import("twgl.js").FramebufferInfo, x: number, y: number): Uint8Array<ArrayBuffer>;
/**
 *
 * @param {WebGL2RenderingContext} gl
 * @param {import("twgl.js").FramebufferInfo} framebufferInfo
 * @param {string} [type]
 */
export function framebufferToDataUrl(gl: WebGL2RenderingContext, framebufferInfo: import("twgl.js").FramebufferInfo, type?: string): string;
export default class WebGLHelper {
    /**
     *
     * @param {HTMLElement} container
     * @param {() => {width: number, height: number}} [sizeSource]
     *      A function that returns the content size. If a dimension is undefined,
     *      the canvas fills the container, otherwise the canvas is adjusted to the content size.
     * @param {WebGLContextAttributes} [webglContextAttributes]
     * @param {() => void} [onCanvasResize]
     */
    constructor(container: HTMLElement, sizeSource?: () => {
        width: number;
        height: number;
    }, webglContextAttributes?: WebGLContextAttributes, onCanvasResize?: () => void);
    /**
     * @type {CanvasSizeHelper}
     */
    _canvasSizeHelper: CanvasSizeHelper;
    /**
     * @type {{ logicalWidth: number, logicalHeight: number, physicalWidth: number, physicalHeight: number } | undefined}
     */
    _appliedCanvasSize: {
        logicalWidth: number;
        logicalHeight: number;
        physicalWidth: number;
        physicalHeight: number;
    } | undefined;
    /** @type {() => void} */
    _onCanvasResize: () => void;
    /** @type {Map<string, WebGLShader>} */
    _shaderCache: Map<string, WebGLShader>;
    /** @type {WeakMap<import("../types/encoder.js").VegaScale, WebGLTexture>} */
    rangeTextures: WeakMap<import("../types/encoder.js").VegaScale, WebGLTexture>;
    /**
     * @type {WeakMap<import("../types/selectionTypes.js").MultiPointSelection, WebGLTexture>}
     */
    selectionTextures: WeakMap<import("../types/selectionTypes.js").MultiPointSelection, WebGLTexture>;
    canvas: HTMLCanvasElement;
    gl: WebGL2RenderingContext;
    /** @type {import("twgl.js").AttachmentOptions[]} */
    _pickingAttachmentOptions: import("twgl.js").AttachmentOptions[];
    _pickingBufferInfo: import("twgl.js").FramebufferInfo;
    invalidateSize(): void;
    /**
     * Compiles and caches a shader. The shader source is used as a cache key.
     *
     * @param {number} type gl.VERTEX_SHADER or gl.FRAGMENT_SHADER
     * @param {string | string[]} glsl
     */
    compileShader(type: number, glsl: string | string[]): WebGLShader;
    adjustGl(): boolean;
    finalize(): void;
    /**
     * Returns the canvas size in true display pixels
     *
     * @param {{ width: number, height: number }} [logicalSize]
     */
    getPhysicalCanvasSize(logicalSize?: {
        width: number;
        height: number;
    }): {
        width: number;
        height: number;
    };
    /**
     * Returns the ratio between true display pixels and logical pixels.
     *
     * @param {{ width: number, height: number }} [logicalSize]
     */
    getDevicePixelRatio(logicalSize?: {
        width: number;
        height: number;
    }): number;
    /**
     * Returns the size of the canvas canvas container size in logical pixels,
     * without devicePixelRatio correction.
     */
    getLogicalCanvasSize(): {
        width: number;
        height: number;
    };
    /**
     * Creates textures for color schemes and discrete/discretizing ranges.
     * N.B. Discrete range textures need domain. Thus, this cannot be called
     * before the final domains are resolved.
     *
     * TODO: This may be too specific to be included in WebGLHelper. Find a better place.
     *
     * @param {import("../scales/scaleResolution.js").default} resolution
     * @param {boolean} update Update the texture if it exists already.
     */
    createRangeTexture(resolution: import("../scales/scaleResolution.js").default, update?: boolean): void;
    /**
     * @param {import("../types/selectionTypes.js").MultiPointSelection} selection
     */
    createSelectionTexture(selection: import("../types/selectionTypes.js").MultiPointSelection, update?: boolean): void;
}
import CanvasSizeHelper from "./canvasSizeHelper.js";
//# sourceMappingURL=webGLHelper.d.ts.map