drawIndexed method

void drawIndexed(
  1. int indexCount, [
  2. int instanceCount,
  3. int firstIndex,
  4. int baseVertex,
  5. int firstInstance,
])

An indexed draw.

firstIndex skips into the index buffer and baseVertex is added to every index read — which is how one buffer holds several meshes and each one keeps indices numbered from zero. Both default to zero, and both are a wrong picture rather than an error when they are left out by mistake.

Implementation

external void drawIndexed(
  int indexCount, [
  int instanceCount,
  int firstIndex,
  int baseVertex,
  int firstInstance,
]);