Class: ShaderSystem

PIXI.systems.ShaderSystem

Helper class to create a webGL Texture

new PIXI.systems.ShaderSystem (renderer)

Name Type Description
renderer PIXI.Renderer

A reference to the current renderer

Extends

Members

gl WebGLRenderingContext

The current WebGL rendering context

The renderer this manager works for.

Methods

bind (shader, dontSync)PIXI.glCore.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.glCore.glProgram the glProgram that belongs to the shader.

contextChange () inherited overrides

Generic method called when there is a WebGL context change.

Destroys this System and removes all its textures

getglProgram ()PIXI.glCore.Shader

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.glCore.Shader the glProgram for the currently bound Shader for this context

setUniforms (uniforms)

Uploads the uniforms values to the currently bound shader.

Name Type Description
uniforms object

the uniforms valiues that be applied to the current shader