gameforge - v0.1.12
    Preparing search index...

    Class ShaderSystem

    System plugin to the renderer to manage shaders.

    PIXI

    Implements

    Index

    Constructors

    • Parameters

      • renderer: Renderer

        The renderer this System works for.

      Returns ShaderSystem

    Properties

    destroyed: boolean

    The current WebGL rendering context.

    id: number
    program: Program
    shader: Shader

    Methods

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

      Parameters

      • shader: Shader

        the new shader

      • OptionaldontSync: boolean

        false if the shader should automatically sync its uniforms.

      Returns GLProgram

      the glProgram that belongs to the shader.

    • Will create a function that uploads a uniform buffer using the STD140 standard. The upload function will then be cached for future calls If a group is manually managed, then a simple upload function is generated

      Parameters

      • group: UniformGroup

        the uniform buffer group to sync

      • glProgram: GLProgram

        the gl program to attach the uniform bindings to

      • name: string

        the name of the uniform buffer (must exist on the shader)

      Returns UniformsSyncCallback

    • 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

        the uniform buffer group to sync

      • Optionalname: string

        the name of the uniform buffer

      Returns void

    • Syncs uniforms on the group

      Parameters

      • group: UniformGroup

        the uniform group to sync

      • OptionalsyncData: 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