import { Resolver } from "@smoovy/utils"; export interface TextureConfig { wrapS?: number; wrapT?: number; minFilter?: number; magFilter?: number; unpackFlip?: boolean; transparent?: boolean; } export interface ImageTextureConfig extends TextureConfig { src: string; load?: boolean; } export interface VideoTextureConfig extends TextureConfig { src: string | HTMLVideoElement; } export type FramebufferTextureConfig = TextureConfig & { depth?: boolean; }; export type DepthTextureConfig = TextureConfig; export declare class TextureMediaLoader { static readonly images: Map>; static load(source: string): Promise; } export declare class Texture { protected gl: WebGLRenderingContext; protected config: C; protected texture: WebGLTexture; protected resolver: Resolver; constructor(gl: WebGLRenderingContext, config: C); get handle(): WebGLTexture; get uploaded(): Promise; get transparent(): boolean | undefined; bind(slot?: number, location?: WebGLUniformLocation): void; unbind(slot?: number): void; upload(data: any): void; protected write(data: any): void; destroy(): void; } export declare class ImageTexture extends Texture { constructor(gl: WebGLRenderingContext, config: ImageTextureConfig); load(): void; } export declare class VideoTexture extends Texture { readonly video: HTMLVideoElement; private rvfcSupported; private updateVideoCbRVFC; constructor(gl: WebGLRenderingContext, config: VideoTextureConfig); private updateVideoRVFC; private updateVideo; } export declare class DepthTexture extends Texture { private width; private height; allocate(width: number, height: number): void; write(data?: null): void; } export declare class FramebufferTexture extends Texture { protected gl: WebGLRenderingContext; protected config: FramebufferTextureConfig; depth?: DepthTexture; errors: Record; constructor(gl: WebGLRenderingContext, config: FramebufferTextureConfig); allocate(width: number, height: number): void; }