Options
All
  • Public
  • Public/Protected
  • All
Menu

Helper class to create a shader program.

memberof

PIXI

Hierarchy

  • Program

Index

Constructors

constructor

  • new Program(vertexSrc?: string, fragmentSrc?: string, name?: string): Program
  • Parameters

    • Optional vertexSrc: string
    • Optional fragmentSrc: string
    • Optional name: string

    Returns Program

Properties

attributeData

attributeData: {}

Type declaration

fragmentSrc

fragmentSrc: string

Private getUniformData

getUniformData: any

returns the uniform data from the program

param

the webgl program

param

the WebGL context

returns

the uniform data for this program

glPrograms

glPrograms: {}

Type declaration

id

id: number

nameCache

nameCache: any

syncUniforms

syncUniforms: any

uniformData

uniformData: {}

Type declaration

vertexSrc

vertexSrc: string

Accessors

Static defaultFragmentSrc

  • get defaultFragmentSrc(): string
  • The default fragment shader source

    static
    constant
    member

    {string}

    Returns string

Static defaultVertexSrc

  • get defaultVertexSrc(): string
  • The default vertex shader source

    static
    constant
    member

    {string}

    Returns string

Methods

Protected extractData

  • extractData(vertexSrc: string, fragmentSrc: string): void
  • Extracts the data for a buy creating a small test program or reading the src directly.

    Parameters

    • vertexSrc: string
    • fragmentSrc: string

    Returns void

Private getAttributeData

  • getAttributeData(program: WebGLProgram, gl: WebGLRenderingContextBase): {}
  • returns the attribute data from the program

    Parameters

    • program: WebGLProgram
    • gl: WebGLRenderingContextBase

    Returns {}

    the attribute data for this program

Static from

  • from(vertexSrc?: string, fragmentSrc?: string, name?: string): Program
  • A short hand function to create a program based of a vertex and fragment shader this method will also check to see if there is a cached program.

    Parameters

    • Optional vertexSrc: string
    • Optional fragmentSrc: string
    • Optional name: string

    Returns Program

    an shiny new Pixi shader!

Generated using TypeDoc