Retrieve the index buffer data as a span and set it directly rather than
using the API functions to add vertices which add overhead. Also pass
all the necessary data as arguments instead of retrieving them from
the "args" struct on every use.
In a test with a 16 million vertex grid, this reduces the runtime of
generating all the wireframe index buffers by about 25%, from 95 to 76 ms
for that step of the drawing process.