Class: Shader

Shader

new Shader(gl, vertexString, fragmentString)

Creates vertex and fragment shader from given strings
Parameters:
Name Type Description
gl Object
vertexString String
fragmentString String
Source:

Methods

getAttribLocation(varName) → {Number}

Returns the location of a shader attribute
Parameters:
Name Type Description
varName String
Source:
Returns:
attributeLocation
Type
Number

getUniformLocation(varName) → {Number}

Returns the location of a shader uniform
Parameters:
Name Type Description
varName String
Source:
Returns:
uniformLocation
Type
Number

initShaders()

Uses shader program
Source: