setIndexBuffer method

void setIndexBuffer(
  1. GPUBuffer buffer,
  2. GPUIndexFormat indexFormat, [
  3. GPUSize64 offset,
  4. GPUSize64 size,
])

The setIndexBuffer() method of the GPURenderBundleEncoder interface sets the current GPUBuffer that will provide index data for subsequent drawing commands.

Note

This method is functionally identical to its equivalent on GPURenderPassEncoderGPURenderPassEncoder.setIndexBuffer.

Implementation

external void setIndexBuffer(
  GPUBuffer buffer,
  GPUIndexFormat indexFormat, [
  GPUSize64 offset,
  GPUSize64 size,
]);