summaryrefslogtreecommitdiff
path: root/src/text.cc
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-02-11 23:26:31 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-02-11 23:26:31 +0100
commit8536bcc71498c9109ef4254760edc4cd70ddcccd (patch)
treebafe2d4b267a3f3fb0753dee0c852b28bcfb619e /src/text.cc
parent9a90a8f6a6df2603c510f90ec351edf5aca4f8f6 (diff)
working on vao
Diffstat (limited to 'src/text.cc')
-rw-r--r--src/text.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/text.cc b/src/text.cc
index d02cc77..0635440 100644
--- a/src/text.cc
+++ b/src/text.cc
@@ -19,9 +19,8 @@ static bool wayc_font_cache_lookup(struct font_s* font, codepoint_t codepoint,
return ok;
}
-[[maybe_unused]] static void wayc_font_cache_insert(struct font_s* font,
- codepoint_t codepoint,
- struct glyph_s glyph) {
+static void wayc_font_cache_insert(struct font_s* font, codepoint_t codepoint,
+ struct glyph_s glyph) {
wayc_notnull(font);
wayc_hashmap_insert(&font->cache, &codepoint, &glyph);
}
@@ -29,8 +28,14 @@ static bool wayc_font_cache_lookup(struct font_s* font, codepoint_t codepoint,
enum font_context_error_e wayc_font_context_init(struct font_context_s* ctx) {
wayc_notnull(ctx);
+ u32 vao;
+ glCreateVertexArrays(1, &vao);
+ if (vao == 0) return FONT_CONTEXT_ERROR_VAO_CREATION;
+
+
+
FT_Error err = FT_Init_FreeType(&ctx->library);
- if (err) return FONT_CONTEXT_ERROR_LIBRARY;
+ if (err) return FONT_CONTEXT_ERROR_LIBRARY_LOADING;
return FONT_CONTEXT_ERROR_NONE;
}