Options
All
  • Public
  • Public/Protected
  • All
Menu

A Shader that copies given texture onto current buffer

Hierarchy

Index

Constructors

constructor

Methods

destroy

  • destroy(): void

disableAttrib

  • disableAttrib(name: string): void

getLocation

  • getLocation(name: string, attrib?: boolean): number | WebGLUniformLocation
  • Returns the location of a uniform or attribute.

    Locations are cached

    Parameters

    • name: string

      name of the variable

    • Default value attrib: boolean = false

      if true then name is assumed to be an attribute

    Returns number | WebGLUniformLocation

getTextureId

  • getTextureId(name: string): number

run

  • Runs the shader program

    Parameters

    • tsm: TextureSetManager

      the texture set in which the rendering will be made

    • values: ICopyProgramValues

      an object containing values for variables specified in the bindings

    • Default value blendMode: BlendMode = null

      the blendMode for this render

    • Default value blendValue: number = null

      blendValue when blendMode is ADJUSTABLE

    Returns void

setAttrib

  • setAttrib(name: string, buffer: Buffer, size?: number, type?: number, normalized?: boolean, stride?: number, offset?: number): void
  • Binds an attribute buffer and sets up vertex pointer

    Parameters

    • name: string

      name of the attribute

    • buffer: Buffer

      buffer to be bound

    • Default value size: number = 2

      size of values

    • Default value type: number = this.rctx.getGl().FLOAT

      type of values

    • Default value normalized: boolean = false

      enables normalization for integers

    • Default value stride: number = 0

      array value stride

    • Default value offset: number = 0

      offset of first value

    Returns void

setIndex

  • setIndex(buffer: Buffer): void

setUniform

  • setUniform(name: string, type: WebGLVarType, ...values: any[]): void