The current WebGLRenderer instance.
The attribute buffer layouts to use in the program.
OptionalindexBuffer: WebGLBufferWrapperThe index buffer to use in the program, if any.
The attribute buffer layouts to use in the program. These are used to create a VAO.
The configuration object currently being assembled.
The key of the currently active shader program.
The index buffer to use in the program, if any. This is used to create a VAO.
A map of shader programs and associated data suite, identified by a unique key.
Each key corresponds to an object of the following shape:
program (WebGLProgramWrapper) - The compiled shader program.vao (WebGLVAOWrapper) - The VAO associated with the program.config (object) - The configuration object used to create the program.The current WebGLRenderer instance.
A map of uniform values, identified by the shader uniform names. This allows uniforms to be kept between shader programs.
Add a shader addition to the current configuration.
The shader addition to add.
Optionalindex: numberThe index at which to insert the addition. If not specified, it will be added at the end.
Add a feature to the current configuration.
The feature to add.
Set the stored uniforms on a shader program.
Clear all features from the current configuration.
Remove all uniforms.
Returns the addition with the given name.
The name to find.
Returns the index of a shader addition with the given name.
The name to find.
Returns a list of shader additions in the current config that have a specific tag.
The tag to filter by.
Returns a program suite based on the current configuration. If the program does not exist, it is created.
The suite contains the following properties:
program (WebGLProgramWrapper) - The compiled shader program.vao (WebGLVAOWrapper) - The VAO associated with the program.config (object) - The configuration object used to create the program.If parallel shader compilation is enabled,
the program may not be available immediately.
In this case, null is returned.
Remove a shader addition from the current configuration.
The name of the shader addition to remove.
Remove a feature from the current configuration.
The feature to remove.
Delete a uniform value. While unused uniforms are not harmful, they do take time to process and can be a source of confusion.
The name of the uniform.
Replace a shader addition in the current configuration.
The name of the shader addition to replace.
The new shader addition.
Resets the current configuration object.
Set the base shader for the current configuration.
The name of the shader program.
The vertex shader source code.
The fragment shader source code.
Set the value of a uniform, available for all shader programs in this manager.
The name of the uniform.
The value of the uniform.
The ProgramManager is a utility class used to manage instantiated shader programs and a suite of associated data, such as a VAO. It maintains a shared pool of uniforms, so if a different shader program is used, the uniforms can be applied to the new program.