Is this safe? Can you replace the texture/buffer at a given "index", and then draw different primitive shapes, or does this set up a race condition? Ie, could this end up drawing all 10 shapes with the texture and vertices of the last one?
let enc = [ make render encoder ]
for shape in tenDifferentShapes {
enc.setFragmentTexture([texture for shape], index: 0)
enc.setVertexBytes([verts for shape], index: 0)
enc.drawPrimitives(...)
}
enc.endEncoding()