import { GraphicsResource } from "../asset/GraphicsResource";
import { Engine } from "../Engine";
import { BufferBindFlag } from "./enums/BufferBindFlag";
import { BufferUsage } from "./enums/BufferUsage";
import { SetDataOptions } from "./enums/SetDataOptions";
/**
 * Buffer.
 */
export declare class Buffer extends GraphicsResource {
    private _type;
    private _byteLength;
    private _bufferUsage;
    private _readable;
    private _data;
    /**
     * Buffer binding flag.
     */
    get type(): BufferBindFlag;
    /**
     * Byte length.
     */
    get byteLength(): number;
    /**
     * Buffer usage.
     */
    get bufferUsage(): BufferUsage;
    /**
     * If buffer is readable.
     */
    get readable(): boolean;
    /**
     * Buffer data cache.
     *
     * @remarks
     * Buffer must be readable.
     * If the data you get is modified, must call `setData()` to update buffer to GPU.
     */
    get data(): Uint8Array;
    /**
     * Create Buffer.
     * @param engine - Engine
     * @param type - Buffer binding flag
     * @param byteLength - Byte length
     * @param bufferUsage - Buffer usage
     * @param readable - If buffer is readable
     */
    constructor(engine: Engine, type: BufferBindFlag, byteLength: number, bufferUsage?: BufferUsage, readable?: boolean);
    /**
     * Create Buffer.
     * @param engine - Engine
     * @param type - Buffer binding flag
     * @param data - Buffer data, if `readable` is true, the`data` property will store a copy of this
     * @param bufferUsage - Buffer usage
     * @param readable - If buffer is readable
     */
    constructor(engine: Engine, type: BufferBindFlag, data: ArrayBuffer | ArrayBufferView, bufferUsage?: BufferUsage, readable?: boolean);
    /**
     * Bind buffer.
     */
    bind(): void;
    /**
     * Set buffer data.
     * @param data - Input buffer data
     */
    setData(data: ArrayBuffer | ArrayBufferView): void;
    /**
     * Set buffer data.
     * @param data - Input buffer data
     * @param bufferByteOffset - buffer byte offset
     */
    setData(data: ArrayBuffer | ArrayBufferView, bufferByteOffset: number): void;
    /**
     * Set buffer data.
     * @param data - Input buffer data
     * @param bufferByteOffset - Buffer byte offset
     * @param dataOffset - Buffer byte offset
     * @param dataLength - Data length
     */
    setData(data: ArrayBuffer | ArrayBufferView, bufferByteOffset: number, dataOffset: number, dataLength?: number): void;
    /**
     * Set buffer data.
     * @param data - Input buffer data
     * @param bufferByteOffset - Buffer byte offset
     * @param dataOffset - Buffer byte offset
     * @param dataLength - Data length
     * @param options - Update strategy: None/Discard/NoOverwrite
     */
    setData(data: ArrayBuffer | ArrayBufferView, bufferByteOffset: number, dataOffset: number, dataLength: number, options: SetDataOptions): void;
    /**
     * Get buffer data.
     * @param data - Output buffer data
     */
    getData(data: ArrayBufferView): void;
    /**
     * Get buffer data.
     * @param data - Output buffer data
     * @param bufferByteOffset - Buffer byte offset
     */
    getData(data: ArrayBufferView, bufferByteOffset: number): void;
    /**
     * Get buffer data.
     * @param data - Output buffer data
     * @param bufferByteOffset - Buffer byte offset
     * @param dataOffset - Output data offset
     * @param dataLength - Output data length
     */
    getData(data: ArrayBufferView, bufferByteOffset: number, dataOffset: number, dataLength: number): void;
    /**
     * Copy data from another buffer on the GPU.
     * @param srcBuffer - Source buffer
     * @param srcByteOffset - Byte offset in the source buffer
     * @param dstByteOffset - Byte offset in this buffer
     * @param byteLength - Number of bytes to copy
     */
    copyFromBuffer(srcBuffer: Buffer, srcByteOffset: number, dstByteOffset: number, byteLength: number): void;
    /**
     * Mark buffer as readable, the `data` property will be not accessible anymore.
     */
    markAsUnreadable(): void;
    _rebuild(): void;
}
