/**
 * Sigma.js WebGL Renderer Program
 * ================================
 *
 * Class representing a single WebGL program used by sigma's WebGL renderer.
 * @module
 */
import type Sigma from "../../../../sigma";
import type { RenderParams } from "../../../../types";
export interface ProgramInfo<Uniform extends string = string> {
    name: string;
    isPicking: boolean;
    program: WebGLProgram;
    gl: WebGLRenderingContext | WebGL2RenderingContext;
    frameBuffer: WebGLFramebuffer | null;
    buffer: WebGLBuffer;
    constantBuffer: WebGLBuffer;
    uniformLocations: Record<Uniform, WebGLUniformLocation>;
    attributeLocations: Record<string, GLint>;
}
export interface ProgramAttributeSpecification {
    name: string;
    size: number;
    type: number;
    normalized?: boolean;
}
export interface ProgramDefinition<Uniform extends string = string> {
    VERTICES: number;
    VERTEX_SHADER_SOURCE: string;
    FRAGMENT_SHADER_SOURCE: string;
    UNIFORMS: ReadonlyArray<Uniform>;
    ATTRIBUTES: Array<ProgramAttributeSpecification>;
    METHOD: GLenum;
}
export interface InstancedProgramDefinition<Uniform extends string = string> extends ProgramDefinition<Uniform> {
    CONSTANT_ATTRIBUTES: Array<ProgramAttributeSpecification>;
    CONSTANT_DATA: number[][];
}
export declare abstract class AbstractProgram {
    constructor(_gl: WebGLRenderingContext, _pickGl: WebGLRenderingContext, _renderer: Sigma);
    abstract reallocate(capacity: number): void;
    abstract render(params: RenderParams): void;
}
export declare abstract class Program<Uniform extends string = string> implements AbstractProgram, InstancedProgramDefinition {
    VERTICES: number;
    VERTEX_SHADER_SOURCE: string;
    FRAGMENT_SHADER_SOURCE: string;
    UNIFORMS: ReadonlyArray<Uniform>;
    ATTRIBUTES: Array<ProgramAttributeSpecification>;
    METHOD: GLenum;
    CONSTANT_ATTRIBUTES: Array<ProgramAttributeSpecification>;
    CONSTANT_DATA: number[][];
    ATTRIBUTES_ITEMS_COUNT: number;
    STRIDE: number;
    renderer: Sigma;
    array: Float32Array;
    constantArray: Float32Array;
    capacity: number;
    verticesCount: number;
    normalProgram: ProgramInfo;
    pickProgram: ProgramInfo | null;
    isInstanced: boolean;
    abstract getDefinition(): ProgramDefinition<Uniform> | InstancedProgramDefinition<Uniform>;
    constructor(gl: WebGLRenderingContext | WebGL2RenderingContext, pickingBuffer: WebGLFramebuffer | null, renderer: Sigma);
    protected getProgramInfo(name: "normal" | "pick", gl: WebGLRenderingContext | WebGL2RenderingContext, vertexShaderSource: string, fragmentShaderSource: string, frameBuffer: WebGLFramebuffer | null): ProgramInfo;
    protected bindProgram(program: ProgramInfo): void;
    protected unbindProgram(program: ProgramInfo): void;
    protected bindAttribute(attr: ProgramAttributeSpecification, program: ProgramInfo, offset: number, setDivisor?: boolean): number;
    protected unbindAttribute(attr: ProgramAttributeSpecification, program: ProgramInfo, unsetDivisor?: boolean): void;
    reallocate(capacity: number): void;
    hasNothingToRender(): boolean;
    abstract setUniforms(params: RenderParams, programInfo: ProgramInfo): void;
    protected renderProgram(params: RenderParams, programInfo: ProgramInfo): void;
    render(params: RenderParams): void;
    drawWebGL(method: GLenum, { gl, frameBuffer }: ProgramInfo): void;
}
