~ 5% speedup for font-rendering overall
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m55s

This is probably the last speedup for this.
This commit is contained in:
2024-09-11 18:33:29 -04:00
parent 9903fc19c9
commit f6e8875eb9
4 changed files with 12 additions and 40 deletions

View File

@@ -34,10 +34,9 @@ namespace JGL {
if (font.face == nullptr)
return;
FT_Set_Pixel_Sizes(font.face, 0, size);
//If the font doesn't exist in the cache yet.
if (!cachedFont) {
FT_Set_Pixel_Sizes(font.face, 0, size);
jlog::Debug("Caching font data...");
GLuint texture_id;
glGenTextures(1, &texture_id);