2
\$\begingroup\$

I recently read that any transformation changes will cause a new batch to be triggered.

So, if I have 10 Sprites and each has a different rotation or scale will there be 10 batches sent up?

Or is this somehow limited to SpriteBatch.Begin, where a Matrix is used?

I'm not clear on how the Begin/End relate to scale/rotation in draw calls or if they do at all in terms of how many batches are created.

I appreciate any info on this topic...

\$\endgroup\$
1
  • \$\begingroup\$ I think the confusion here originates because you can transform the entire spritebatch. If you want to multiple transformation at the sprite batch level then you need to create a new batch. Transforming the individual instances does not result in a new batch. \$\endgroup\$ Mar 5, 2013 at 18:14

1 Answer 1

3
\$\begingroup\$

No, individual batches will only be triggered in case you are using SpriteSortMode.Immediate or change texture. Individual sprite info is stored in an internal array and some operations are performed in CPU (rotation, scaling) before sending the vertex buffer to the GPU. For more information about the internals of SpriteBatch, check this answer.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .