Skip to content

Latest commit

 

History

History
72 lines (40 loc) · 1.29 KB

File metadata and controls

72 lines (40 loc) · 1.29 KB

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

Name Type Description
composer GPUComposer The current GPUComposer instance.
params Object GPUIndexBuffer parameters.
params.indices number[] | Uint8Array | Uint16Array | Uint32Array A 1D array containing indexed geometry. For a mesh, this would be an array of triangle indices.
params.name? string Name of GPUIndexBuffer, used for error logging.

Methods

dispose

dispose(): void

Deallocate GPUIndexBuffer instance and associated WebGL properties.

Returns

void