/** WebGL context tagged with the per-context id the renderer assigns, used to key shader caches. */ export type IdentifiedWebGLRenderingContext = WebGLRenderingContext & { id: number; }; export declare const NO_ERROR = 0; export declare const INVALID_ENUM = 1280; export declare const INVALID_VALUE = 1281; export declare const INVALID_OPERATION = 1282; export declare const INVALID_FRAMEBUFFER_OPERATION = 1286; export declare const OUT_OF_MEMORY = 1285; export declare const CONTEXT_LOST_WEBGL = 37442; /** * Gets the WebGL context error code. * @param {WebGLRenderingContext} gl - The WebGL rendering context. * @returns {number} The error code from the WebGL context. */ export declare const getWebGLContextErrorCode: (gl: WebGLRenderingContext) => number; /** * Gets the WebGL context error name from an error code. * @param {number} errorCode - The error code to look up. * @returns {string} The name of the WebGL error. */ export declare const getWebGLContextErrorName: (errorCode: number) => string; /** * Initializes default shaders. */ export declare const initDefaultShaders: () => void; /** * Compiles a WebGL shader. * @param {WebGLRenderingContext} gl - The WebGL rendering context. * @param {string[]|string} shaderSrc - The shader source code. * @param {object} shaderType - The type of shader to compile. * @returns {WebGLShader} The compiled WebGL shader or null if compilation failed. */ export declare const compileShader: (gl: WebGLRenderingContext, shaderSrc: string[] | string, shaderType: GLenum) => WebGLShader | null; /** * Compiles a WebGL vertex shader. * @param {WebGLRenderingContext} gl - The WebGL rendering context. * @param {string[]|string} shaderSrc - The vertex shader source code. * @returns {WebGLShader} The compiled WebGL vertex shader or null if compilation failed. */ export declare const compileVertexShader: (gl: WebGLRenderingContext, shaderSrc: string[] | string) => WebGLShader | null; /** * Compiles a WebGL fragment shader. * @param {WebGLRenderingContext} gl - The WebGL rendering context. * @param {string[]|string} shaderSrc - The fragment shader source code. * @returns {WebGLShader} The compiled WebGL fragment shader or null if compilation failed. */ export declare const compileFragmentShader: (gl: WebGLRenderingContext, shaderSrc: string[] | string) => WebGLShader | null; /** * Compiles a WebGL shader program. * @param {WebGLRenderingContext} gl - The WebGL rendering context. * @param {string[]|string} vertexSrc - The vertex shader source code. * @param {string[]|string} fragmentSrc - The fragment shader source code. * @returns {WebGLProgram} The compiled WebGL shader program or null if compilation failed. */ export declare const compileProgram: (gl: WebGLRenderingContext, vertexSrc: string[] | string, fragmentSrc: string[] | string) => WebGLProgram | null; //# sourceMappingURL=util.d.ts.map