import type { Nullable } from "@thi.ng/api"; import { TextureFilter, TextureFormat, TextureRepeat, TextureTarget, TextureType, type ITexture, type TextureOpts } from "./api/texture.js"; export declare const bindTextures: (textures?: ITexture[]) => void; export declare const unbindTextures: (textures?: ITexture[]) => void; export declare class Texture implements ITexture { gl: WebGLRenderingContext; tex: WebGLTexture; target: TextureTarget; format: TextureFormat; filter: TextureFilter[]; wrap: TextureRepeat[]; type: TextureType; size: number[]; constructor(gl: WebGLRenderingContext, opts?: Partial); configure(opts?: Partial, unbind?: boolean): boolean; protected configureImage(target: TextureTarget, opts: Partial): void; protected configureImage2d(target: TextureTarget, opts: Partial): void; protected configureImage3d(target: TextureTarget, opts: Partial): void; protected configureFilter(target: TextureTarget, opts: Partial): void; protected configureWrap(target: TextureTarget, opts: Partial): void; protected configureLOD(target: TextureTarget, opts: Partial): void; protected configureLevels(target: TextureTarget, opts: Partial): void; bind(id?: number): boolean; unbind(id?: number): boolean; release(): boolean; } export declare const defTexture: (gl: WebGLRenderingContext, opts?: Partial) => Texture; /** * Creates cube map texture from given 6 `face` texture sources. The * given options are shared by each each side/face of the cube map. The * following options are applied to the cube map directly: * * - `filter` * - `mipmap` * * The following options are ignored entirely: * * - `target` * - `image` * * @param gl - * @param faces - in order: +x,-x,+y,-y,+z,-z * @param opts - */ export declare const defTextureCubeMap: (gl: WebGLRenderingContext, faces: (ArrayBufferView | TexImageSource)[], opts?: Partial) => Texture; /** * Creates & configure a new float texture. * * **Important:** Since each texel will hold 4x 32-bit float values, the * `data` buffer needs to have a length of at least `4 * width * * height`. * * Under WebGL 1.0, we assume the caller has previously enabled the * `OES_texture_float` extension. * * @param gl - GL context * @param data - texture data * @param width - width * @param height - height * @param format - * @param type - */ export declare const defTextureFloat: (gl: WebGLRenderingContext, data: Nullable, width: number, height: number, format?: TextureFormat, type?: TextureType) => Texture; //# sourceMappingURL=texture.d.ts.map