Indexed drawing

drawIndexed allows you to draw a mesh with a list of indices without needing the extra vertex buffers that come along with a full-blown mesh.

drawIndexed example

Indexed drawing is a way to draw a mesh with a list of indices without needing the extra vertex buffers that come along with a full-blown mesh. You can use in.vertexIndex to get the index of the vertex being processed. This is useful for drawing primitives like lines and triangles.

drawIndexed with external buffers

You can also use external buffers inside of the shader: