Options
All
  • Public
  • Public/Protected
  • All
Menu

Program class for compiling GLSL shaders and linking them in a WebGLProgram and managing its state

Hierarchy

  • Program

Index

Constructors

constructor

Properties

Private #attribLocations

#attribLocations: Map<any, any> = ...

Private #gl

#gl: WebGLRenderingContext

Private #program

#program: null | WebGLProgram

Private #uniformLocations

#uniformLocations: Map<any, any> = ...

Methods

bind

delete

  • delete(): void

getAttribLocation

  • getAttribLocation(attribName: string): null | number
  • Get the location for an attribute

    Parameters

    • attribName: string

    Returns null | number

    attribLocation

setUniform

  • setUniform(uniformName: string, uniformType: UniformType, uniformValue: any): null | Program
  • Set uniform value. Query the uniform location if necessary and cache it in-memory for future use

    Parameters

    • uniformName: string
    • uniformType: UniformType
    • uniformValue: any

    Returns null | Program

unbind

Generated using TypeDoc