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

Mesh cache purging #2

Open
blaind opened this issue Aug 2, 2021 · 1 comment
Open

Mesh cache purging #2

blaind opened this issue Aug 2, 2021 · 1 comment

Comments

@blaind
Copy link
Owner

blaind commented Aug 2, 2021

The crate uses a global mesh cache.

It is not being cleaned up at all, resulting to polluted cache, when:

  • user does not render with a specific font anymore
  • user creates glyphs with varying depths (maybe generate mesh with constant depth, and change vertice depths at runtime?)
@FrankenApps
Copy link

The first point could probably be improved by beeing able to manually clear the cache for a certain font.
Regarding the second point I would definetly only store the mesh with a depth of one (+ maybe the flat 2D mesh) and then scale the depth component as needed during runtime. The same should probably be done regarding the different font sizes (e.g. store one fixed size mesh and scale it as needed to accomodate for different font size).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants