summaryrefslogtreecommitdiff
path: root/src/systems/text.h
diff options
context:
space:
mode:
authoromnisci3nce <omniscient.oce@gmail.com>2024-07-12 12:47:07 +1000
committeromnisci3nce <omniscient.oce@gmail.com>2024-07-12 12:47:07 +1000
commitf74cf52946f4e569a26bc81105537b40be95c2c7 (patch)
tree1d000367350d0e28eb7cfbc800286a0ed30a4e6c /src/systems/text.h
parentfedba7ff68924ff50022405fc9103a5acf7013fe (diff)
wip: big makeover
Diffstat (limited to 'src/systems/text.h')
-rw-r--r--src/systems/text.h82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/systems/text.h b/src/systems/text.h
index f40cfd6..983ffd6 100644
--- a/src/systems/text.h
+++ b/src/systems/text.h
@@ -10,44 +10,44 @@
#include "ral.h"
#include "render_types.h"
-struct core;
-
-/** @brief internal font struct */
-typedef struct font {
- const char *name;
- stbtt_fontinfo stbtt_font;
- stbtt_bakedchar c_data[96];
- texture_handle bitmap_tex;
-} font;
-
-typedef struct draw_text_packet {
- char *contents;
- f32 x;
- f32 y;
-} draw_text_packet;
-
-KITC_DECL_TYPED_ARRAY(draw_text_packet)
-
-typedef struct text_system_state {
- font default_font;
- shader_handle glyph_shader;
- u32 glyph_vbo;
- u32 glyph_vao;
- draw_text_packet_darray *draw_cmd_buf;
- // TODO: fonts array or hashtable
-} text_system_state;
-
-void text_system_render(text_system_state *text);
-
-// --- Lifecycle functions
-bool text_system_init(text_system_state *text);
-void text_system_shutdown(text_system_state *text);
-
-// --- Drawing
-
-/**
- * @brief immediate mode draw text.
- * @note immediately emits draw calls causing a shader program switch if you weren't previously
- drawing text in the current frame.
-*/
-void draw_text(struct core *core, f32 x, f32 y, char *contents); \ No newline at end of file
+// struct core;
+
+// /** @brief internal font struct */
+// typedef struct font {
+// const char *name;
+// stbtt_fontinfo stbtt_font;
+// stbtt_bakedchar c_data[96];
+// texture_handle bitmap_tex;
+// } font;
+
+// typedef struct draw_text_packet {
+// char *contents;
+// f32 x;
+// f32 y;
+// } draw_text_packet;
+
+// KITC_DECL_TYPED_ARRAY(draw_text_packet)
+
+// typedef struct text_system_state {
+// font default_font;
+// shader_handle glyph_shader;
+// u32 glyph_vbo;
+// u32 glyph_vao;
+// draw_text_packet_darray *draw_cmd_buf;
+// // TODO: fonts array or hashtable
+// } text_system_state;
+
+// void text_system_render(text_system_state *text);
+
+// // --- Lifecycle functions
+// bool text_system_init(text_system_state *text);
+// void text_system_shutdown(text_system_state *text);
+
+// // --- Drawing
+
+// /**
+// * @brief immediate mode draw text.
+// * @note immediately emits draw calls causing a shader program switch if you weren't previously
+// drawing text in the current frame.
+// */
+// void draw_text(struct core *core, f32 x, f32 y, char *contents);