Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text/v2: deprecate CacheGlyphs by reordering draw calls in DrawText #3069

Closed
11 tasks
hajimehoshi opened this issue Aug 21, 2024 · 2 comments
Closed
11 tasks

Comments

@hajimehoshi
Copy link
Owner

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

What feature would you like to be added?

CacheGlyphs was introduced since DrawText 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

@hajimehoshi hajimehoshi added this to the v2.8.0 milestone Aug 21, 2024
@hajimehoshi
Copy link
Owner Author

Hm, CacheGlyphs caches all the variations of glyphs (#2528), so this might be needed for this purpose...

@tinne26
Copy link

tinne26 commented Aug 22, 2024

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.

@hajimehoshi hajimehoshi closed this as not planned Won't fix, can't repro, duplicate, stale Aug 22, 2024
@hajimehoshi hajimehoshi removed this from the v2.8.0 milestone Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants