Create a shader program.
The rendering context.
The vertex shader.
The fragment shader.
Optional
attributeLocations: Map<string, number>A map of attribute names to their desired locations.
Optional
feedbackVaryings: Iterable<string, any, any>The names of the varyings that should be tracked for transform feedback.
The mode to use when capturing transform feedback varyings.
ProgramLinkError if the shaders have different contexts, if either shader is not the correct type, or if there is an issue when linking the shader program.
Readonly
attributesThe attributes in this shader program.
Readonly
contextThe rendering context.
Readonly
fragmentThe fragment shader of this shader program.
Readonly
uniformsThe uniforms in this shader program.
Readonly
varyingsThe transform feedback varyings in this shader program.
Readonly
vertexThe vertex shader of this shader program.
The deletion status of this shader program.
The information log of this shader program.
The linking status of this shader program.
The validation status of this shader program.
Static
fromCreate a shader program from the given shader source code.
The rendering context.
The vertex shader's source code.
The fragment shader's source code.
The shader program.
ProgramLinkError if the shaders have different contexts, if either shader is not the correct type, or if there is an issue when linking the shader program.
UnsupportedOperationError if a shader program cannot be created.
UnsupportedOperationError if a shader cannot be created.
ShaderCompileError if a shader fails to compile.
A WebGL2 shader program.
See
WebGLProgram