import { ExtensionType } from '../../../extensions/Extensions';
import { Matrix } from '../../../maths/Matrix';
import { RenderTarget } from '../shared/renderTarget/RenderTarget';
import { SystemRunner } from '../shared/system/SystemRunner';
import { Texture } from '../shared/texture/Texture';
import { GlRenderTarget } from './GlRenderTarget';
import type { RgbaArray } from '../../../color/Color';
import type { RenderSurface } from '../gpu/renderTarget/GpuRenderTargetSystem';
import type { System } from '../shared/system/System';
import type { CLEAR_OR_BOOL } from './const';
import type { GlRenderingContext } from './context/GlRenderingContext';
import type { WebGLRenderer } from './WebGLRenderer';
export declare class GlRenderTargetSystem implements System {
    /** @ignore */
    static extension: {
        readonly type: readonly [ExtensionType.WebGLSystem];
        readonly name: "renderTarget";
    };
    rootProjectionMatrix: Matrix;
    renderingToScreen: boolean;
    rootRenderTarget: RenderTarget;
    renderTarget: RenderTarget;
    onRenderTargetChange: SystemRunner;
    private _gl;
    private readonly _renderSurfaceToRenderTargetHash;
    private _gpuRenderTargetHash;
    private readonly _renderer;
    private readonly _renderTargetStack;
    private readonly _defaultClearColor;
    private readonly _clearColorCache;
    private readonly _viewPortCache;
    constructor(renderer: WebGLRenderer);
    protected contextChange(gl: GlRenderingContext): void;
    start(rootRenderSurface: RenderSurface, clear?: CLEAR_OR_BOOL, clearColor?: RgbaArray): void;
    bind(renderSurface: RenderSurface, clear?: CLEAR_OR_BOOL, clearColor?: RgbaArray): RenderTarget;
    clear(clear: CLEAR_OR_BOOL, clearColor?: RgbaArray): void;
    push(renderSurface: RenderSurface, clear?: CLEAR_OR_BOOL, clearColor?: RgbaArray): RenderTarget;
    pop(): void;
    getRenderTarget(renderSurface: RenderSurface): RenderTarget;
    private _initRenderTarget;
    finishRenderPass(renderTarget?: RenderTarget): void;
    copyToTexture(sourceRenderSurfaceTexture: RenderTarget, destinationTexture: Texture, origin: {
        x: number;
        y: number;
    }, size: {
        width: number;
        height: number;
    }): Texture;
    getGpuRenderTarget(renderTarget: RenderTarget): GlRenderTarget;
    private _initGpuRenderTarget;
    private _resizeGpuRenderTarget;
    private _initColor;
    private _resizeColor;
    private _initStencil;
    private _resizeStencil;
    destroy?: () => void;
}
