Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PassProgram

Container of shader program used for Pass. Pass needs to care which geometry will be drawn by a material. (For determining what macro should be appended to shader by attribute variable exisiting)

Hierarchy

  • PassProgram

Index

Constructors

constructor

  • new PassProgram(_gl: WebGLRenderingContext, _vsSource: string, _fsSource: string, _macros?: object): PassProgram
  • Parameters

    • _gl: WebGLRenderingContext
    • _vsSource: string
    • _fsSource: string
    • Default value _macros: object = {}
      • [key: string]: any

    Returns PassProgram

Accessors

fragmentShader

  • get fragmentShader(): string
  • set fragmentShader(source: string): void

macros

  • get macros(): object
  • set macros(val: object): void
  • macros registered dynamically of this programs

    Returns object

    [description]

    • [key: string]: any
  • macros registered dynamically of this programs

    Parameters

    • val: object
      • [key: string]: any

    Returns void

    [description]

vertexShader

  • get vertexShader(): string
  • set vertexShader(source: string): void

Methods

dispose

  • dispose(): void

getProgram

setMacro

  • setMacro(macroName: string, value?: string | boolean): void
  • Update programs with specified macro value.

    Parameters

    • macroName: string
    • Optional value: string | boolean

    Returns void

Generated using TypeDoc