Closed hajimehoshi closed 3 months ago
Hm, CacheGlyphs
caches all the variations of glyphs (#2528), so this might be needed for this purpose...
Being able to cache the glyph masks is always a relevant feature. For example, that could be desirable after changing the UI font or before entering a menu with a lot of text. You could do some "fake draw", but that's not very clean.
Additionally, there's a risk with reordering the draws: glyphs can overlap, so draw order is not necessarily superfluous. This shouldn't have much impact on the current contexts, but it could be a problem with certain blend modes or more complex text rendering operations.
Operating System
What feature would you like to be added?
CacheGlyphs
was introduced sinceDrawText
might send draw calls for writing pixels and multiple drawing triangles in turn, which prevented automatic batching.However, wouldn't it be possible to reorder draw calls in
DrawText
so that the same type of draw calls become adjacent and automatically batched?Why is this needed?
No response