Class: Program

Program()

new Program()

WebGL program consisting of compiled and linked vertex and fragment shaders.
Properties:
Name Type Description
gl WebGLRenderingContext The WebGL context.
program WebGLProgram The WebGL program.
transformFeedbackVaryings array Names of transform feedback varyings, if any.
transformFeedbackMode GlEnum Capture mode of the transform feedback.
attributeLocations Object.<string, number> Map of user-provided attribute names to indices, if any.
uniforms Object Map of uniform names to handles.
appState Object Tracked GL state.
Source:

Methods

delete() → {Program}

Delete this program.
Source:
Returns:
The Program object.
Type
Program

restore() → {Program}

Restore program after context loss. Note that this will stall for completion. App.restorePrograms is the preferred method for program restoration as it will parallelize compilation where available.
Source:
Returns:
The Program object.
Type
Program

translatedFragmentSource() → {String}

Get the fragment shader source translated for the platform's API.
Source:
Returns:
The translated fragment shader source.
Type
String

translatedVertexSource() → {String}

Get the vertex shader source translated for the platform's API.
Source:
Returns:
The translated vertex shader source.
Type
String