Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Flush()

void Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush ( )
inlineprivate

Definition at line 628 of file SpriteBatch.cs.

629 {
630 SpriteInfo[] array;
631 if (spriteSortMode == SpriteSortMode.Deferred)
632 {
634 }
635 else
636 {
637 SortSprites();
639 }
640 int num = 0;
641 Texture2D texture2D = null;
642 for (int i = 0; i < spriteQueueCount; i++)
643 {
645 if (spriteSortMode == SpriteSortMode.Deferred)
646 {
648 }
649 else
650 {
651 int num2 = sortIndices[i];
652 ref SpriteInfo reference = ref array[i];
655 }
656 if (texture2D2 != texture2D)
657 {
658 if (i > num)
659 {
660 RenderBatch(texture2D, array, num, i - num);
661 }
662 num = i;
664 }
665 }
669 }
void RenderBatch(Texture2D texture, SpriteInfo[] sprites, int offset, int count)
static unsafe void Clear(Array array)
Definition Array.cs:755

References System.array, System.Array.Clear(), Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(), Microsoft.Xna.Framework.Graphics.SpriteBatch.sortedSprites, Microsoft.Xna.Framework.Graphics.SpriteBatch.sortIndices, Microsoft.Xna.Framework.Graphics.SpriteBatch.SortSprites(), Microsoft.Xna.Framework.Graphics.SpriteBatch.spriteQueue, Microsoft.Xna.Framework.Graphics.SpriteBatch.spriteQueueCount, Microsoft.Xna.Framework.Graphics.SpriteBatch.spriteSortMode, and Microsoft.Xna.Framework.Graphics.SpriteBatch.spriteTextures.

Referenced by Microsoft.Xna.Framework.Graphics.SpriteBatch.End().