gpu-io / GPUIndexBuffer
• Readonly buffer: WebGLBuffer
GL buffer.
• Readonly glType: number
GL type.
• Readonly count: number
Index buffer count.
• new GPUIndexBuffer(composer, params)
Init a GPUIndexBuffer to use with GPUComposer.drawLayerAsMesh().
| 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. |
▸ dispose(): void
Deallocate GPUIndexBuffer instance and associated WebGL properties.
void