Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GLResource<T>

Abstraction of gl resource related class. Provides unique index for each resources, promise for wating resource available and destroyed flag.

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

  • new GLResource(gl: WebGLRenderingContext, resourceReference: T): GLResource

Properties

destroyed

destroyed: boolean = false

gl

gl: WebGLRenderingContext

index

index: number

resourceReference

resourceReference: T

validPromise

validPromise: Promise<GLResource<T>>

Accessors

metadata

  • get metadata(): object
  • Metadata containing some useful data for glresource in Debugging.

    Returns object

    • [key: string]: any

valid

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

Methods

destroy

  • destroy(): void

setMetadata

  • setMetadata(key: string, value: any): void
  • Provide metadata for key

    Parameters

    • key: string

      key of the metadata

    • value: any

      value of the metadata

    Returns void

Generated using TypeDoc