Class: ShaderSystem

PIXI.systems.ShaderSystem

System plugin to the renderer to manage shaders.

new PIXI.systems.ShaderSystem (renderer)

Name Type Description
renderer PIXI.Renderer

The renderer this System works for.

Extends

Members

gl WebGLRenderingContext

The current WebGL rendering context

The renderer this manager works for.

Methods

bind (shader, dontSync)PIXI.GLProgram

Changes the current shader to the one given in parameter

Name Type Description
shader PIXI.Shader

the new shader

dontSync boolean

false if the shader should automatically sync its uniforms.

Returns:
Type Description
PIXI.GLProgram the glProgram that belongs to the shader.

Destroys this System and removes all its textures

Returns the underlying GLShade rof the currently bound shader. This can be handy for when you to have a little more control over the setting of your uniforms.

Returns:
Type Description
PIXI.GLProgram the glProgram for the currently bound Shader for this context

Resets ShaderSystem state, does not affect WebGL state

setUniforms (uniforms)

Uploads the uniforms values to the currently bound shader.

Name Type Description
uniforms object

the uniforms values that be applied to the current shader

syncUniformGroup (group, syncData)

syncs uniforms on the group

Name Type Description
group *

the uniform group to sync

syncData *

this is data that is passed to the sync function and any nested sync functions