Class: Program

Program

Program constructor

new Program(renderContext)

Parameters:
Name Type Description
renderContext

Methods


createShader(type, source)

Creates a shader of the given type from the given source string
Parameters:
Name Type Description
type
source
Returns:
Shader

createFromSource(vertexSource, fragmentSource)

Create the program from source shaders
Parameters:
Name Type Description
vertexSource
fragmentSource
Returns:
Type
Boolean

loadFromFile(vertexFile, fragmentFile)

Load from file (must be located on the server)
Parameters:
Name Type Description
vertexFile
fragmentFile
Returns:
Type
Boolean

apply()

Apply the programs

dispose()

Dispose the program