Options
All
  • Public
  • Public/Protected
  • All
Menu

System plugin to the renderer to manage shaders.

memberof

PIXI

Hierarchy

Index

Constructors

constructor

Properties

Private cache

cache: any

destroyed

destroyed: boolean

Private getSignature

getSignature: any

Takes a uniform group and data and generates a unique signature for them.

param

the uniform group to get signature of

param

uniform information generated by the shader

returns

Unique signature of the uniform group

Protected gl

id

id: number

program

program: Program

renderer

renderer: Renderer

shader

shader: Shader

Methods

bind

  • Changes the current shader to the one given in parameter

    Parameters

    • shader: Shader

      the new shader

    • Optional dontSync: boolean

    Returns GLProgram

    the glProgram that belongs to the shader.

Protected contextChange

  • Parameters

    Returns void

createSyncGroups

  • createSyncGroups(group: UniformGroup): UniformsSyncCallback
  • Parameters

    Returns UniformsSyncCallback

destroy

  • destroy(): void
  • Destroys this System and removes all its textures

    Returns void

Private generateShader

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

getglProgram

  • 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

reset

  • reset(): void
  • Resets ShaderSystem state, does not affect WebGL state

    Returns void

setUniforms

  • setUniforms(uniforms: Dict<any>): 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

syncUniformGroup

  • syncUniformGroup(group: UniformGroup, syncData?: any): void
  • syncs uniforms on the group

    Parameters

    • group: UniformGroup

      the uniform group to sync

    • Optional syncData: any

    Returns void

Private syncUniforms

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

    Parameters

    Returns void

Private systemCheck

  • systemCheck(): void
  • Overrideable function by @pixi/unsafe-eval to silence throwing an error if platform doesn't support unsafe-evals.

    Returns void

Generated using TypeDoc