export declare abstract class BaseShader { protected gl: WebGLRenderingContext | WebGL2RenderingContext; protected vertexShaderCode: string; protected fragmentShaderCode: string; protected program: WebGLProgram | undefined; /** * Constructor. Compiles shader. * * @param gl WebGL context. */ constructor(gl: WebGLRenderingContext | WebGL2RenderingContext); /** * Used to fill shader code. Put actual shader code to this.vertexShaderCode and this.fragmentShaderCode */ abstract fillCode(): void; /** * Creates WebGL shader from code. * * @param type Shader type. * @param code GLSL code. * @returns Shader or `undefined` if there were errors during shader compilation. */ protected getShader(type: GLenum, code: string): WebGLShader | undefined; /** Retrieve and save uniforms and attributes for actual shader here */ abstract fillUniformsAttributes(): void; /** * Get shader unform location. * * @param uniform Uniform name. * @return Uniform location. */ getUniform(uniform: string): WebGLUniformLocation; /** * Get shader attribute location. * * @param attrib Attribute name. * @return Attribute location. */ getAttrib(attrib: string): number; /** Initializes shader. */ protected initShader(): void; /** Activates shader. */ use(): void; /** Deletes shader. */ deleteProgram(): void; }