import { type TypedArray } from "@thi.ng/api/typedarray"; import type { AttribPool } from "@thi.ng/vector-pools"; import type { IWebGLBuffer, IndexBufferSpec } from "./api/buffers.js"; import { type ModelAttributeSpecs, type ModelSpec, type UncompiledModelSpec } from "./api/model.js"; export declare class WebGLArrayBuffer implements IWebGLBuffer { gl: WebGLRenderingContext; buffer: WebGLBuffer; target: number; mode: number; data?: T; constructor(gl: WebGLRenderingContext, data?: T, target?: GLenum, mode?: GLenum, retain?: boolean); bind(): boolean; unbind(): boolean; release(): boolean; /** * Re-applies retained data (from ctor arg) using * {@link WebGLArrayBuffer.set}. Presumably the underlying data has been * updated elsewhere, but needs to be reflected to WebGL. * * @remarks * If no data is retained, this method is a no-op. */ update(): void; set(data: T, mode?: number): void; setChunk(data: T, byteOffset?: number): void; } export declare const defBuffer: (gl: WebGLRenderingContext, data?: TypedArray, target?: GLenum, mode?: GLenum, retain?: boolean) => WebGLArrayBuffer | Float64Array | Int8Array | Int16Array | Int32Array | Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array>; /** * Takes a model spec and compiles all buffers (attributes, indices) and shader * (if not already compiled), then returns compiled spec, ready for use with * {@link draw}. * * @param gl * @param spec * @param mode */ export declare const compileModel: (gl: WebGLRenderingContext, spec: ModelSpec | UncompiledModelSpec, mode?: 35044) => ModelSpec; export declare const compileIndices: (gl: WebGLRenderingContext, index?: IndexBufferSpec, mode?: GLenum) => IndexBufferSpec | undefined; export declare const compileVAO: (gl: WebGLRenderingContext, spec: ModelSpec) => WebGLVertexArrayObject | undefined; export declare const compileAttribPool: (gl: WebGLRenderingContext, pool: AttribPool, ids?: string[], target?: GLenum, mode?: GLenum) => ModelAttributeSpecs; //# sourceMappingURL=buffer.d.ts.map