new PixiShader(gl)
Parameters:
Name | Type | Description |
---|---|---|
gl |
WebGLContext | the current WebGL drawing context |
Members
-
<static> defaultVertexSrc : String
-
The Default Vertex shader source.
Type:
- String
-
dirty : Boolean
-
A dirty flag
Type:
- Boolean
-
fragmentSrc : Array
-
The fragment shader.
Type:
- Array
-
gl : WebGLContext
-
Type:
- WebGLContext
-
program : Any
-
The WebGL program.
Type:
- Any
-
textureCount : Number
-
A local texture counter for multi-texture shaders.
Type:
- Number
Methods
-
destroy()
-
Destroys the shader.
-
init()
-
Initialises the shader.
-
initSampler2D()
-
Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)
-
initUniforms()
-
Initialises the shader uniform values.
Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf
-
syncUniforms()
-
Updates the shader uniform values.