Grokmoo / thyme

Themable Immediate Mode User Interface Toolkit in Rust
Apache License 2.0
97 stars 5 forks source link

cache rendered strings #26

Open Grokmoo opened 3 years ago

Grokmoo commented 3 years ago

Cache rendered text to a texture by the text content, font and size of the area the text is being layed out in. On subsequent frames, we can render the entire line of text in a single draw call - as well as skip layout entirely. This should be a major boost to performance.

Will need to determine (probably configurable as a BuildOption) the texture cache size and handle invalidating unused parts over time.