aboutsummaryrefslogtreecommitdiff
path: root/state.h
diff options
context:
space:
mode:
Diffstat (limited to 'state.h')
-rw-r--r--state.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/state.h b/state.h
index 465e9b6..1929cad 100644
--- a/state.h
+++ b/state.h
@@ -16,6 +16,20 @@
#include "./glad/glad.h"
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+
+typedef struct {
+ float advance_x, advance_y;
+ uint32_t bitmap_width, bitmap_height;
+ uint32_t texture_offset;
+} metrics_t;
+
+typedef struct {
+ uint32_t width, height;
+ GLuint texture;
+ metrics_t metrics[128];
+} atlas_t;
+
typedef struct {
// wayland
struct wl_display* display;
@@ -53,6 +67,8 @@ typedef struct {
FT_Library ft_library;
FT_Face ft_face;
+ atlas_t atlas;
+
bool running;
} client_state;