new PIXI.glCore.Shader(gl, vertexSrc, fragmentSrc, precision, attributeLocations)
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
-
attributesObject
-
The attributes of the shader as an object containing the following properties
{
type,
size,
location,
pointer
} -
glWebGLRenderingContext
-
The current WebGL rendering context
-
programWebGLProgram
-
The shader program
-
uniformsObject
-
The uniforms of the shader as an object containing the following properties
{
gl,
data
}
Methods
-
bind(){PIXI.glCore.GLShader}
-
Uses this shader
Returns:
Type Description PIXI.glCore.GLShader Returns itself. -
destroy()
-
Destroys this shader
TODO