bindIndexBuffer method

void bindIndexBuffer(
  1. BufferView bufferView,
  2. IndexType indexType
)

Binds bufferView as the index buffer.

indexType is the width of each index. The number of indices to draw is passed separately, to drawIndexed.

Implementation

void bindIndexBuffer(BufferView bufferView, IndexType indexType) {
  bufferView.buffer._bindAsIndexBuffer(
    this,
    bufferView.offsetInBytes,
    bufferView.lengthInBytes,
    indexType,
  );
}