export interface WebGL2StateCacheDescriptor {
    readonly label: string;
    readonly backend?: "webgl2";
    readonly detail?: string;
}
export interface WebGL2StateCacheStats {
    readonly issued: number;
    readonly skipped: number;
    readonly byOperation: Readonly<Record<string, {
        readonly issued: number;
        readonly skipped: number;
    }>>;
}
export interface WebGL2StateCacheSnapshot {
    readonly program: unknown;
    readonly vertexArray: unknown;
    readonly arrayBuffer: unknown;
    readonly elementArrayBuffer: unknown;
    readonly framebuffer: unknown;
    readonly viewport: readonly [number, number, number, number] | null;
    readonly scissor: readonly [number, number, number, number] | null;
    readonly colorMask: readonly [boolean, boolean, boolean, boolean] | null;
    readonly polygonOffset: readonly [number, number] | null;
    readonly stencilFunc: readonly [number, number, number] | null;
    readonly stencilMask: number | null;
    readonly stencilOp: readonly [number, number, number] | null;
    readonly activeTextureUnit: number | null;
    readonly depthMask: boolean | null;
    readonly depthFunc: number | null;
    readonly cullFace: number | null;
    readonly blendFunc: readonly [number, number] | null;
    readonly enabled: Readonly<Record<number, boolean>>;
    readonly textures: Readonly<Record<string, unknown>>;
    readonly samplers: Readonly<Record<number, unknown>>;
    readonly stats: WebGL2StateCacheStats;
}
export declare class WebGL2StateCache {
    readonly descriptor: WebGL2StateCacheDescriptor;
    readonly backend: "webgl2";
    private currentProgram;
    private currentVertexArray;
    private currentArrayBuffer;
    private currentElementArrayBuffer;
    private currentFramebuffer;
    private currentViewport;
    private currentScissor;
    private currentColorMask;
    private currentPolygonOffset;
    private currentStencilFunc;
    private currentStencilMask;
    private currentStencilOp;
    private currentActiveTextureUnit;
    private currentDepthMask;
    private currentDepthFunc;
    private currentCullFace;
    private currentBlendFunc;
    private readonly enabledCaps;
    private readonly textureBindings;
    private readonly samplerBindings;
    private readonly operationStats;
    constructor(descriptor: WebGL2StateCacheDescriptor);
    invalidate(): void;
    resetStats(): void;
    useProgram(program: unknown, apply: () => void): boolean;
    bindBuffer(target: number, buffer: unknown, apply: () => void): boolean;
    bindFramebuffer(target: number, framebuffer: unknown, apply: () => void): boolean;
    bindVertexArray(vertexArray: unknown, apply: () => void): boolean;
    viewport(x: number, y: number, width: number, height: number, apply: () => void): boolean;
    scissor(x: number, y: number, width: number, height: number, apply: () => void): boolean;
    colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean, apply: () => void): boolean;
    polygonOffset(factor: number, units: number, apply: () => void): boolean;
    stencilFunc(func: number, reference: number, mask: number, apply: () => void): boolean;
    stencilMask(mask: number, apply: () => void): boolean;
    stencilOp(fail: number, depthFail: number, depthPass: number, apply: () => void): boolean;
    setEnabled(capability: number, enabled: boolean, apply: () => void): boolean;
    depthMask(flag: boolean, apply: () => void): boolean;
    depthFunc(func: number, apply: () => void): boolean;
    cullFace(mode: number, apply: () => void): boolean;
    blendFunc(src: number, dst: number, apply: () => void): boolean;
    activeTexture(unit: number, apply: () => void): boolean;
    bindTexture(target: number, texture: unknown, apply: () => void): boolean;
    bindSampler(textureUnit: number, sampler: unknown, apply: () => void): boolean;
    snapshot(): WebGL2StateCacheSnapshot;
    stats(): WebGL2StateCacheStats;
    private issue;
    private skip;
    private statsFor;
}
//# sourceMappingURL=WebGL2StateCache.d.ts.map