import * as Attributes from './GLAttribute'; import * as Uniforms from './uniform'; import UniformAccessObject = Uniforms.UniformAccessObject; export declare class GLShader { /** * @protected * @member {WebGL2RenderingContext} */ protected gl: WebGL2RenderingContext; /** * Shader Program * @protected * @member {WebGLProgram} */ protected _program: WebGLProgram; protected _attributes: Attributes.AttributeMap; protected _uniforms: UniformAccessObject; protected _defines: { [x: string]: string | number; }; private _vertexSrc; private _fragmentSrc; constructor(gl: WebGL2RenderingContext, vertexSrc?: string, fragmentSrc?: string); private getDefinesString; private getShaderSrcWithDefines; upload(): GLShader; addDefine(def: string, value: string | number): void; removeDefine(def: string): void; program: WebGLProgram; attributes: Attributes.AttributeMap; uniforms: UniformAccessObject | any; defines: { [p: string]: string | number; }; /** * Bind this shader and tells the WebGLContext to use it */ bind(): GLShader; /** * Unbinds this Shader and tells the WebGLContext to use no shader */ unbind(): GLShader; /** * Destroy the program unloads it from the gpu */ unload(): void; /** * Destroys the program in the WebGLContext nulls all objects in the Shader */ destroy(): void; vertexSrc: string; fragmentSrc: string; }