/** Create a page texture with clamp + linear filtering (no mipmaps — §8.3). */ export declare function createTexture(gl: WebGL2RenderingContext): WebGLTexture; /** * Upload a decoded page raster (ImageBitmap or canvas) into `tex`, returning the dimensions actually * uploaded (which differ from the source when it was too big for the GPU). * * A raster larger than `gl.MAX_TEXTURE_SIZE` on either axis cannot be uploaded: `texImage2D` fails * and leaves the texture incomplete, which samples as solid black. A zoomed page on a high-DPR phone * (small MAX_TEXTURE_SIZE, e.g. 4096) hits this readily. Downscale over-large rasters to fit, * preserving aspect, so a slightly-softer page beats a black one. */ export declare function uploadTexture(gl: WebGL2RenderingContext, tex: WebGLTexture, source: TexImageSource): { width: number; height: number; };