System plugin to the renderer to manage shaders.

Memberof

PIXI

Implements

Constructors

  • Parameters

    • renderer: Renderer

      The renderer this System works for.

    Returns ShaderSystem

Properties

destroyed: boolean
id: number
program: Program
shader: Shader

Methods

  • Changes the current shader to the one given in parameter.

    Parameters

    • shader: Shader

      the new shader

    • Optional dontSync: boolean

      false if the shader should automatically sync its uniforms.

    Returns GLProgram

    the glProgram that belongs to the shader.

  • Parameters

    Returns UniformsSyncCallback

  • Destroys this System and removes all its textures.

    Returns void

  • Disposes shader. If disposing one equals with current shader, set current as null.

    Parameters

    Returns void

  • Generates a glProgram version of the Shader provided.

    Parameters

    • shader: Shader

      The shader that the glProgram will be based on.

    Returns GLProgram

    A shiny new glProgram!

  • 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 GLProgram

    The glProgram for the currently bound Shader for this context

  • Resets ShaderSystem state, does not affect WebGL state.

    Returns void

  • Uploads the uniforms values to the currently bound shader.

    Parameters

    • uniforms: Dict<any>

      the uniforms values that be applied to the current shader

    Returns void

  • Syncs uniform buffers

    Parameters

    • group: UniformGroup<Dict<any>>

      the uniform buffer group to sync

    • Optional name: string

      the name of the uniform buffer

    Returns void

  • Syncs uniforms on the group

    Parameters

    • group: UniformGroup<Dict<any>>

      the uniform group to sync

    • Optional syncData: any

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

    Returns void

  • Overrideable by the @pixi/unsafe-eval package to use static syncUniforms instead.

    Parameters

    Returns void

Generated using TypeDoc