setIndices method

void setIndices(
  1. BufferView indices,
  2. IndexType indexType
)

Implementation

void setIndices(gpu.BufferView indices, gpu.IndexType indexType) {
  _indices = indices;
  _indexType = indexType;
  switch (indexType) {
    case gpu.IndexType.int16:
      _indexCount = indices.lengthInBytes ~/ 2;
    case gpu.IndexType.int32:
      _indexCount = indices.lengthInBytes ~/ 4;
  }
}