Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SwapRenderer

Index

Constructors

constructor

Properties

Private #activeProgram

#activeProgram: Mesh

Private #camera

Private #framebuffers

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

Private #gl

#gl: WebGLRenderingContext

Private #programs

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

Private #textureType

#textureType: number

Private #textures

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

Methods

addFramebuffer

addTexture

createFramebuffer

  • createFramebuffer(name: string, width: number, height: number): SwapRenderer

createProgram

  • createProgram(programName: string, vertexShaderSource: string, fragmentShaderSource: string, defines?: {}): SwapRenderer

createTexture

  • createTexture(name: string, width: number, height: number, data?: null | Float32Array | Uint16Array, filtering?: number, inputType?: number): SwapRenderer
  • Parameters

    • name: string

      Name for referencing later

    • width: number
    • height: number
    • data: null | Float32Array | Uint16Array = null
    • filtering: number = ...
    • inputType: number = ...

    Returns SwapRenderer

delete

getTexture

  • getTexture(name: string): Texture

reset

run

  • run(inputNameArr: string[], outputName: string): SwapRenderer
  • Renders a program with specific inputs to output framebuffer

    Parameters

    • inputNameArr: string[]

      Name of input framebuffers

    • outputName: string

      Name of output framebuffer. "null" to render to device screen

    Returns SwapRenderer

setSize

setUniform

swap

useProgram

Generated using TypeDoc