Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • QueueCommander

Index

Constructors

constructor

Properties

Private _dataToBufferTransfers

_dataToBufferTransfers: IDataToBufferTransfer[] = []

Private _dataToTextureTransfers

_dataToTextureTransfers: IDataToTextureTransfer[] = []

Private _device

_device: GPUDevice = null

Private _srcCopyBuffer

_srcCopyBuffer: GPUBuffer = null

Methods

Private _createBuffer

  • _createBuffer(size: number, usage: GPUBufferUsageFlags): GPUBuffer
  • Create a new GPU buffer

    Parameters

    • size: number

      The buffer size

    • usage: GPUBufferUsageFlags

      The buffer usage

    Returns GPUBuffer

Private _flushDataToBufferTransfers

  • _flushDataToBufferTransfers(): Promise<void>

Private _flushDataToTextureTransfers

  • _flushDataToTextureTransfers(): Promise<void>

destroy

  • destroy(): void

flush

  • flush(): Promise<void>

transferDataToBuffer

  • transferDataToBuffer(buffer: GPUBuffer, data: ArrayBufferView, byteOffset?: number, callback?: CallbackFunction): void
  • Transfer CPU data into a GPUBuffer

    Parameters

    • buffer: GPUBuffer

      The destination buffer to copy the data into

    • data: ArrayBufferView

      The data to copy

    • Default value byteOffset: number = 0

      The starting byte offset into the destination buffer

    • Default value callback: CallbackFunction = null

    Returns void

transferDataToTexture

  • transferDataToTexture(texture: GPUTexture, data: ArrayBufferView, width?: number, height?: number, depth?: number, bytesPerRow?: number, callback?: CallbackFunction): void
  • Transfer CPU data into a GPUTexture

    Parameters

    • texture: GPUTexture
    • data: ArrayBufferView

      The data to copy

    • Default value width: number = 0
    • Default value height: number = 0
    • Default value depth: number = 0
    • Default value bytesPerRow: number = 0
    • Default value callback: CallbackFunction = null

    Returns void

Generated using TypeDoc