IndexBuffer

An index buffer that is used in a VertexAttributeObject to direct indexed drawing operations.

Constructors

new IndexBuffer(options: IndexBufferOptions): IndexBuffer

Properties

baseIndex

baseIndex: number

canvas

canvas: HTMLCanvasElement

canvasFormat

canvasFormat: GPUTextureFormat

context

cpuBuffer

cpuBuffer: IndexArray

firstIndex

firstIndex: number

gpuBuffer

gpuBuffer: GPUBuffer

indexCount

indexCount: number

label

label: string

usage

usage: number

Methods

getDevice

getDevice(): Promise<GPUDevice>

setBaseIndex

setBaseIndex(baseIndex: number): void

setCanvas

setCanvas(canvas: HTMLCanvasElement): void

setCpuBuffer

setCpuBuffer(indexBuffer: IndexArray): Promise<void>

setDevice

setDevice(d: GPUDevice): void

setFirstIndex

setFirstIndex(firstIndex: number): void

setIndexCount

setIndexCount(indexCount: number): void

setLabel

setLabel(label: string): void

updateGpuBuffer

updateGpuBuffer(): Promise<void>

You are viewing the beta docs. You may find the legacy docs more helpful.