import { type GradientStop } from "../theme/gradient"; import type { WebGLContextManager } from "./context-manager"; export interface GradientTextureCache { texture: WebGLTexture; lastStops: GradientStop[] | null; } /** * Allocate a 256×1 RGBA8 texture (once) and re-upload the LUT only when * `stops` has changed since the last call. Typical render path: zero * GPU work beyond binding an already-uploaded texture. */ export declare function ensureGradientTexture(glManager: WebGLContextManager, cache: GradientTextureCache | null, stops: GradientStop[]): GradientTextureCache; /** * Bind `texture` to a texture unit and set the sampler uniform. Call after * `useProgram`. */ export declare function bindGradientTexture(glManager: WebGLContextManager, texture: WebGLTexture, samplerLoc: WebGLUniformLocation | null, unit?: number): void;