commit method

void commit(
  1. int count
)

Sets the number of live instances to draw and recomputes the batch's local bounds from their centers and sizes (so the owning item culls and, with an LodComponent, measures its screen size correctly).

Implementation

void commit(int count) {
  assert(count >= 0 && count <= capacity);
  _instanceCount = count;
  _recomputeBounds(count);
}