]> git.nega.tv - josh/narcissus/commit
Improve font cache
authorJoshua Simmons <josh@nega.tv>
Tue, 28 Feb 2023 20:24:05 +0000 (21:24 +0100)
committerJoshua Simmons <josh@nega.tv>
Tue, 28 Feb 2023 20:24:05 +0000 (21:24 +0100)
commite32fc6de19a191ad5bad9cc68eff167a54a64a6f
tree592927a0780358292652c7c70bf87e12b5c7db12
parent18ff412e3dcffc98089884ccf25c95030ee6c013
Improve font cache

Always write the information for touched glyphs every frame, to try and
avoid accidently depending on those being stable across atlas updates.

When the font cache is out of space, perform an emergency repack,
recreating the atlas with only the glyphs touched in the current frame.

This should address both changing requirements on the font cache over
time from the application, as well as inefficient packing from
incrementally building the atlas.
bins/narcissus/src/main.rs
bins/narcissus/src/pipelines/text.rs
bins/narcissus/src/shaders/text.vert.glsl
bins/narcissus/src/shaders/text.vert.spv
libs/narcissus-font/src/cache.rs
libs/narcissus-font/src/font.rs
libs/narcissus-font/src/lib.rs