Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Buffer

Hierarchy

Index

Constructors

constructor

  • new Buffer(gl: WebGLRenderingContext, target?: number, usage?: number): Buffer
  • Parameters

    • gl: WebGLRenderingContext
    • Default value target: number = WebGLRenderingContext.ARRAY_BUFFER
    • Default value usage: number = WebGLRenderingContext.STATIC_DRAW

    Returns Buffer

Properties

destroyed

destroyed: boolean = false

gl

gl: WebGLRenderingContext

index

index: number

keepSource

keepSource: boolean = false

If this flag was true, buffer instance will keep Float32Array on class field.

resourceReference

resourceReference: WebGLBuffer

target

target: number

usage

usage: number

validPromise

validPromise: Promise<GLResource<WebGLBuffer>>

Accessors

bufferSource

  • get bufferSource(): BufferSource

metadata

  • get metadata(): object

valid

  • get valid(): boolean
  • set valid(val: boolean): void

Methods

bind

  • bind(): void

destroy

  • destroy(): void

setMetadata

  • setMetadata(key: string, value: any): void

update

  • update(length: number): void
  • update(buffer: BufferSource): void
  • update(offset: number, buffer: BufferSource): void

Generated using TypeDoc