Options
All
  • Public
  • Public/Protected
  • All
Menu

Buffer is a wrapper around WebGLBuffer with type and size information.

Hierarchy

  • Buffer

Index

Constructors

constructor

  • Creates new Buffer

    Parameters

    • rctx: RenderingContext

      the rendering context in which the buffer should be created

    • Default value isElemArray: boolean = false

      if true then a gl.ELEMENT_ARRAY_BUFFER is created else a gl.ARRAY_BUFFER

    • Optional data: number[] | TypedArray

      the data to be stored in the buffer

    Returns Buffer

Properties

Private glBuffer

glBuffer: WebGLBuffer

Private length

length: number

Private rctx

Private type

type: number

Methods

destroy

  • destroy(): void

getGlBuffer

  • getGlBuffer(): WebGLBuffer
  • Returns the WebGLBuffer for this Buffer

    Returns WebGLBuffer

getLength

  • getLength(): number

setData

  • Sets the data stored in the buffer

    Parameters

    • array: number[] | TypedArray

      the data to be stored in the buffer

    Returns void