Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UniformBuffer

UniformBuffer.

Hierarchy

Implements

Index

Constructors

constructor

  • Parameters

    • Default value args: object = {dataOrLength: null, dataType: UNSIGNED_SHORT, usage: STATIC_DRAW}
      • Optional dataOrLength?: TypedArrayLike | number | null
      • Optional dataType?: undefined | number
      • Optional usage?: undefined | number

    Returns UniformBuffer

Properties

Protected _attributeToLocation

_attributeToLocation: Map<Attribute, number>

Protected _attributes

_attributes: Attribute[]

Protected _bufferType

_bufferType: number

Protected _data

_data: TypedArrayLike | null

Protected _dataOrLength

_dataOrLength: TypedArrayLike | number | null

Protected _dataType

_dataType: number

Protected _enabledAttributes

_enabledAttributes: Attribute[]

Protected _flushData

_flushData: function

Type declaration

    • (context: WebGL2RenderingContext, buffer: WebGLBuffer): void
    • Parameters

      • context: WebGL2RenderingContext
      • buffer: WebGLBuffer

      Returns void

Protected _glBuffer

_glBuffer: WebGLBuffer | null

Protected _glContext

_glContext: WebGL2RenderingContext | null

Protected _glProgram

_glProgram: WebGLProgram | null

Protected _isInitialized

_isInitialized: boolean

Protected _totalAttributesSize

_totalAttributesSize: number

Protected _usage

_usage: number

Accessors

bufferType

  • get bufferType(): number
  • Returns type of the buffer. It can be XenoGL..ARRAY_BUFFER or XenoGL..ELEMENT_ARRAY_BUFFER.

    Returns number

data

dataCount

  • get dataCount(): number

dataType

  • get dataType(): number

glBuffer

  • get glBuffer(): WebGLBuffer
  • Returns WebGLBuffer if the buffer is initialized. Otherwise, throws an error.

    Returns WebGLBuffer

isInitialized

  • get isInitialized(): boolean

totalAttributesSize

  • get totalAttributesSize(): number

usage

  • get usage(): number

Methods

Private _createWebGLVertexArrayObject

  • _createWebGLVertexArrayObject(context: WebGL2RenderingContext, program?: WebGLProgram | null, attributes?: Attribute[] | null): WebGLVertexArrayObject

_disableAttributes

  • _disableAttributes(): void

_enableAttributes

  • _enableAttributes(): void

_flush

  • _flush(): void

Private _init

  • _init(context: WebGL2RenderingContext, program?: WebGLProgram | null, attributes?: Attribute[] | null): void
  • Initializes the buffer. Do not call this method manually.

    Parameters

    • context: WebGL2RenderingContext
    • Default value program: WebGLProgram | null = null
    • Default value attributes: Attribute[] | null = null

    Returns void

Private _initAttributes

  • _initAttributes(context: WebGL2RenderingContext, program: WebGLProgram, attributes?: Attribute[] | null): void
  • Initializes attributes. Do not call this method manually.

    Parameters

    • context: WebGL2RenderingContext
    • program: WebGLProgram
    • Default value attributes: Attribute[] | null = null

    Returns void

Private _initOnce

  • _initOnce(context: WebGL2RenderingContext, program?: WebGLProgram | null, attributes?: Attribute[] | null): void
  • Initializes the buffer. Do not call this method manually.

    Parameters

    • context: WebGL2RenderingContext
    • Default value program: WebGLProgram | null = null
    • Default value attributes: Attribute[] | null = null

    Returns void

activate

  • activate(): void

bufferData

deactivate

  • deactivate(): void

Generated using TypeDoc