import type { EntityConstruction } from '@flighthq/entity/contract'; import type { RenderProxy, RenderProxy2D } from '@flighthq/render/contract'; import type { GlBitmapShader, GlShaderLocations } from './contract.render-gl-types.ts'; import type { GlRenderState } from './contract.render-gl-types.ts'; import type { GlContext } from './types.ts'; export declare function compileDefaultGlProgram(gl: GlContext): GlShaderLocations; /** * Compiles a bitmap program, reusing the standard quad vertex shader. Pass a * custom fragment source to build a custom shader; it must declare the interface * the draw path drives — `in vec2 v_texCoord`, `uniform sampler2D u_texture`, * `uniform float u_alpha` — and may add its own uniforms, resolved against the * returned `program`. */ export declare function compileGlBitmapProgram(gl: GlContext, fragmentSrc?: string): GlShaderLocations; export declare function createDefaultGlBitmapShader(shaderLoc: GlShaderLocations, matrixArray: Float32Array): GlBitmapShader; export declare function createGlBitmapShader(gl: GlContext, fragmentSrc: string, onBind?: (gl: GlContext, locations: GlShaderLocations, renderProxy: RenderProxy2D) => void): GlBitmapShader; export declare function ensureDefaultGlBitmapShader(state: GlRenderState): GlBitmapShader; export declare function initializeDefaultGlBitmapShader(out: EntityConstruction, shaderLoc: GlShaderLocations, matrixArray: Float32Array): void; /** * Builds a custom bitmap shader from a fragment shader source, ready to pass to * `setGlShader(state, node, shader)`. The standard quad vertex shader is * reused, so the fragment shader must sample `u_texture` and respect `u_alpha`; * any extra uniforms can be set per draw via `onBind` (resolve them against * `locations.program`). */ export declare function initializeGlBitmapShader(out: EntityConstruction, gl: GlContext, fragmentSrc: string, onBind?: (gl: GlContext, locations: GlShaderLocations, renderProxy: RenderProxy2D) => void): void; export declare function setGlAttributes(gl: GlContext, loc: GlShaderLocations): void; export declare function setGlBaseUniforms(gl: GlContext, loc: GlShaderLocations, renderProxy: RenderProxy): void; export declare function setGlMatrixFromTransform(gl: GlContext, loc: GlShaderLocations, m: Float32Array, t: { a: number; b: number; c: number; d: number; tx: number; ty: number; }, viewportWidth: number, viewportHeight: number): void; export declare function setGlMatrixFromValues(gl: GlContext, loc: GlShaderLocations, m: Float32Array, a: number, b: number, c: number, d: number, tx: number, ty: number, viewportWidth: number, viewportHeight: number): void; //# sourceMappingURL=glShader.d.ts.map