import type { IObjectOf } from "@thi.ng/api"; import { GLSLVersion } from "@thi.ng/shader-ast-glsl/api"; import type { ModelAttributeSpecs, ModelSpec } from "./api/model.js"; import { type DefShaderOpts, type IShader, type ShaderAttrib, type ShaderSpec, type ShaderState, type ShaderType, type ShaderUniforms, type UniformValues } from "./api/shader.js"; export declare class Shader implements IShader { gl: WebGLRenderingContext; program: WebGLProgram; attribs: IObjectOf; uniforms: ShaderUniforms; state: Partial; protected warnAttrib: (x: string) => void; protected warnUni: (x: string) => void; constructor(gl: WebGLRenderingContext, program: WebGLProgram, attribs: IObjectOf, uniforms: ShaderUniforms, state?: Partial); /** * Returns a shallow copy of this shader with its state config merged with * given options (priority). Useful for re-using a shader, but applying * different settings. * * @param state */ withState(state: Partial): Shader; bind(spec: ModelSpec): boolean; unbind(): boolean; release(): boolean; bindAttribs(specAttribs: ModelAttributeSpecs): void; bindUniforms(specUnis?: UniformValues): void; prepareState(state?: Partial): void; protected setState(id: number, val: GLenum | boolean): void; } export declare const defShader: (gl: WebGLRenderingContext, spec: ShaderSpec, opts?: Partial) => Shader; export declare const shaderSourceFromAST: (spec: ShaderSpec, type: ShaderType, version: GLSLVersion, opts?: Partial) => string; export declare const prepareShaderSource: (spec: ShaderSpec, type: ShaderType, version: GLSLVersion) => string; export declare const compileShader: (gl: WebGLRenderingContext, type: GLenum, src: string) => WebGLShader; //# sourceMappingURL=shader.d.ts.map