1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-06-20 12:09:10 +02:00

finished static sprite batch optimizations

This commit is contained in:
Ell 2022-09-12 23:51:12 +02:00
parent eadabf3919
commit b4e1b00c88
2 changed files with 2 additions and 1 deletions

View file

@ -19,7 +19,7 @@ Improvements
- Improved EnumHelper.GetValues signature to return an array
- Allow using external gesture handling alongside InputHandler through ExternalGestureHandling
- Discard old data when updating a StaticSpriteBatch
- Drastically improved StaticSpriteBatch batching performance
- **Drastically improved StaticSpriteBatch batching performance**
Fixes
- Fixed TokenizedString handling trailing spaces incorrectly in the last line of non-left aligned text

View file

@ -43,6 +43,7 @@ namespace MLEM.Graphics {
private readonly SpriteEffect spriteEffect;
private readonly List<DynamicVertexBuffer> vertexBuffers = new List<DynamicVertexBuffer>();
private readonly List<Texture2D> textures = new List<Texture2D>();
// TODO this can still be optimized by not giving items with a unique depth a single-entry set immediately
private readonly SortedDictionary<float, ISet<Item>> items = new SortedDictionary<float, ISet<Item>>();
private IndexBuffer indices;