skejeton / education-tool

Interactive story software
4 stars 0 forks source link

Optimization: UI transform calculation #50

Open skejeton opened 4 months ago

skejeton commented 4 months ago

The main problem is that during font rendering each glyph is rendered as a separate bitmap, and each time a glyph is rendered, push_transform is called, which takes a lot of time to compute with so many calls.

matejovic commented 2 months ago

What I understand to be possible solutions:

  1. glyph batching - combined bitmap / texture atlas
  2. transform caching - use hash table to store transform results
  3. gpu acceleration?

What do you think are tradeoffs of various approaches and which ones you prefer and why?

skejeton commented 3 weeks ago

I'll get back to it when optimizing, I think caching will be the easiest.