Fix text being shifted up by it's own height.
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
2024-07-18 14:01:58 -04:00
parent 26d17dae38
commit 4eca3311c8
2 changed files with 6 additions and 5 deletions

View File

@@ -27,6 +27,9 @@ namespace JGL {
void J2D::DrawString(const Color4& color, const std::string& text, float x, float y, float scale, u32 size, const Font& font) {
glUseProgram(0); // Fixed-function pipeline.
// Offset by height to render at "correct" location.
y += size;
CachedFont* cachedFont = fontCache.getFont(size, font.index);
//Set up the regular font.