renderer: fix color glyph rendering under OpenGL

Also changes color atlas to always use an sRGB internal format so that
the texture reads automatically linearize the colors.

Renames the misleading `rgba` atlas format to `bgra`, since both
FreeType and CoreText are set up to draw color glyphs in bgra.
This commit is contained in:
Qwerasd
2025-06-23 17:31:49 -06:00
parent f5439c860a
commit 41ae32814f
8 changed files with 25 additions and 22 deletions

View File

@@ -336,7 +336,7 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
const color = try api.initAtlasTexture(&.{
.data = undefined,
.size = 1,
.format = .rgba,
.format = .bgra,
});
errdefer color.deinit();