import Camera from "parsegraph-camera";
import Window from "parsegraph-window";
export declare const FREEZER_TEXTURE_SCALE = 0.01;
import { Matrix3x3 } from "parsegraph-matrix";
import WindowNode from "./WindowNode";
export declare class FreezerWindow {
    _freezer: Freezer;
    _window: Window;
    _gl: WebGLRenderingContext;
    _shaders: {
        [id: string]: WebGLProgram;
    };
    _highAspectRow: FreezerRow;
    _lowAspectRow: FreezerRow;
    _program: WebGLProgram;
    uWorld: WebGLUniformLocation;
    uTexture: WebGLUniformLocation;
    aPosition: number;
    aTexCoord: number;
    _origFramebuffer: WebGLFramebuffer;
    _origRenderbuffer: WebGLRenderbuffer;
    _framebuffer: WebGLFramebuffer;
    _activated: boolean;
    _renderbuffer: WebGLRenderbuffer;
    constructor(freezer: Freezer, window: Window);
    allocate(width: number, height: number): FrozenNodeFragment;
    contextChanged(isLost: boolean): void;
    renderFragment(frag: FrozenNodeFragment, world: Matrix3x3, needsSetup: boolean, needsLoad: boolean): void;
    textureSize(): number;
    activate(slot: FreezerSlot): void;
    deactivate(): void;
    gl(): WebGLRenderingContext;
}
export default class Freezer {
    _frozenNodes: FrozenNode[];
    _textureScale: number;
    _camera: Camera;
    _windowData: {
        [id: string]: FreezerWindow;
    };
    _framebuffer: WebGLFramebuffer;
    _renderbuffer: WebGLRenderbuffer;
    _activated: boolean;
    _lowAspectRow: FreezerRow;
    _highAspectRow: FreezerRow;
    _program: WebGLProgram;
    constructor();
    windowData(window: Window): FreezerWindow;
    cache(node: WindowNode): FrozenNode;
    contextChanged(isLost: boolean): void;
    allocate(window: Window, width: number, height: number): FrozenNodeFragment;
    camera(): Camera;
    textureScale(): number;
}
export declare class FreezerRow {
    _freezer: Freezer;
    _window: Window;
    _colFirst: boolean;
    _slots: FreezerSlot[];
    _x: number;
    _y: number;
    _currentMax: number;
    constructor(freezer: Freezer, window: Window, colFirst: boolean);
    gl(): WebGLRenderingContext;
    window(): Window;
    textureSize(): number;
    allocate(frag: FrozenNodeFragment): void;
    contextChanged(isLost: boolean): void;
    freezer(): Freezer;
}
export declare class FreezerSlot {
    _id: number;
    _row: FreezerRow;
    _glTexture: WebGLTexture;
    _fragments: FrozenNodeFragment[];
    constructor(row: FreezerRow);
    glTexture(): WebGLTexture;
    gl(): WebGLRenderingContext;
    window(): Window;
    init(): void;
    contextChanged(isLost: boolean): void;
    addFragment(frag: FrozenNodeFragment): void;
    freezer(): Freezer;
}
export declare class FrozenNode {
    _node: WindowNode;
    _freezer: Freezer;
    _windowFragments: {
        [id: string]: any;
    };
    _validated: boolean;
    _x: number;
    _y: number;
    _width: number;
    _height: number;
    constructor(freezer: Freezer, node: WindowNode);
    invalidate(): void;
    validate(): void;
    paint(window: Window): void;
    render(window: Window, world: Matrix3x3, renderData: any, needsSetup: boolean): boolean;
    node(): WindowNode;
}
export declare class FrozenNodeFragment {
    _width: number;
    _height: number;
    _x: number;
    _y: number;
    _frozenNode: FrozenNode;
    _slot: FreezerSlot;
    _textureX: number;
    _textureY: number;
    _textureWidth: number;
    _textureHeight: number;
    _vertexBuffer: WebGLBuffer;
    constructor(width: number, height: number);
    assignNode(frozenNode: FrozenNode, x: number, y: number): void;
    assignSlot(slot: FreezerSlot, textureX: number, textureY: number, textureWidth: number, textureHeight: number): void;
    vertexBuffer(): WebGLBuffer;
    window(): Window;
    windowData(): FreezerWindow;
    gl(): WebGLRenderingContext;
    paint(): void;
    render(world: Matrix3x3, renderData: any, needsSetup: boolean, needsLoad: boolean): boolean;
    dispose(): void;
    width(): number;
    height(): number;
    slot(): FreezerSlot;
    freezer(): Freezer;
}
export declare function calculatePaintGroupBounds(nodeRoot: WindowNode): any;
//# sourceMappingURL=Freezer.d.ts.map