Multiple instances of a single object are aggregated and submitted
collectively to a graphics API for rendering. Vertices of the object are
replicated into a large buffer and are modified so as to be bound to
different transformation matrices in a matrix palette. An index buffer of
the object is similarly replicated. Each replicated index buffer is
modified to refer to vertices of a different, respective set of
replicated vertices. Thus, the large vertex and index buffers are
initialized to contain multiple, distinct, and independent copies of the
object. Instancing logic aggregates matrix palettes of individual
instances of the same object into an aggregated matrix palette and sends
the aggregated vertex and index buffers of the object along with the
accumulated aggregated matrix palette to the graphics API for rendering.
The graphics API resolves the aggregated vertex and index buffers and
matrix palette to a collection of triangles in display coordinates to be
rasterized, not knowing or caring that the collection of triangles
represent not one object but many objects.