Helper class to create a webGL Shader
Name | Type | Description |
---|---|---|
gl |
WebGLRenderingContext | |
vertexSrc |
string | Array.<string> |
The vertex shader source as an array of strings. |
fragmentSrc |
string | Array.<string> |
The fragment shader source as an array of strings. |
precision |
string |
The float precision of the shader. Options are 'lowp', 'mediump' or 'highp'. |
attributeLocations |
object |
A key value pair showing which location eact attribute should sit eg {position:0, uvs:1} |
Members
-
The attributes of the shader as an object containing the following properties { type, size, location, pointer }
-
The current WebGL rendering context
-
The shader program
-
The uniforms of the shader as an object containing the following properties { gl, data }