It was a bit implicit in previous posts.
Your last point is an interesting one though. I have read a lot today about drawing sprites in one draw call, but I haven't seen how this is actually achieved. So, I have absolutely no Idea how this can be done.
I would be extremely appreciative if you could shed light on this for me
#1: Create vertex buffer. Not static/read-only. Dynamic.
- #2: Lock it.
- #3: Fill it with the sprite vertices. Drawing 32 sprites means you put 32×4 vertices into the buffer. Obviously you will have to transform them on the CPU by the sprite’s position, rotation (only if applicable), and scale (only if applicable).
- #4: Unlock it.
- #5: Draw it using the pre-generated 16-bit index buffer.
As I mentioned, these vertex buffers should be double- or even triple- buffered and swapped each frame.