Class: GPUIndexBuffer

December 2, 2022 · View on GitHub

gpu-io / GPUIndexBuffer

Class: GPUIndexBuffer

Table of contents

Properties

Constructors

Methods

Properties

buffer

Readonly buffer: WebGLBuffer

GL buffer.


glType

Readonly glType: number

GL type.


count

Readonly count: number

Index buffer count.

Constructors

constructor

new GPUIndexBuffer(composer, params)

Init a GPUIndexBuffer to use with GPUComposer.drawLayerAsMesh().

Parameters

NameTypeDescription
composerGPUComposerThe current GPUComposer instance.
paramsObjectGPUIndexBuffer parameters.
params.indicesnumber[] | Uint8Array | Uint16Array | Uint32ArrayA 1D array containing indexed geometry. For a mesh, this would be an array of triangle indices.
params.name?stringName of GPUIndexBuffer, used for error logging.

Methods

dispose

dispose(): void

Deallocate GPUIndexBuffer instance and associated WebGL properties.

Returns

void