export declare class BackendContext {
    static from(gl: WebGLRenderingContext | WebGL2RenderingContext | BackendContext): BackendContext;
    handle: number;
    private adopted;
    private isDestroyed;
    private oldHandle;
    constructor(handle: number, adopted?: boolean);
    getContext(): WebGLRenderingContext | null;
    makeCurrent(): boolean;
    clearCurrent(): void;
    /**
     * Register WebGLTexture in EmscriptenGL, And return handle.
     */
    registerTexture(texture: WebGLTexture): number;
    /**
     * Get WebGLTexture by handle.
     */
    getTexture(handled: number): WebGLTexture | null;
    /**
     * Unregister WebGLTexture reference in EmscriptenGL.
     */
    unregisterTexture(handle: number): void;
    /**
     * Register WebGLFramebuffer in EmscriptenGL, And return handle.
     */
    registerRenderTarget(framebuffer: WebGLFramebuffer): number;
    /**
     * Get WebGLFramebuffer by handle.
     */
    getRenderTarget(handle: number): WebGLFramebuffer | null;
    /**
     * Unregister WebGLTexture reference in EmscriptenGL.
     */
    unregisterRenderTarget(handle: number): void;
    destroy(): void;
    private register;
}
