summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-11-20 22:28:38 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-11-20 22:28:38 -0500
commit5e458dff3bcc832b0b28d83bd3ef482174d1dc09 (patch)
tree28ac081edae5d36aad5df5b2e53848034dc2b99c /main.c
parentc3fd9dfa23969c842991da4cd852330288889463 (diff)
more text rendering
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.c b/main.c
index 1d549a6..2353d08 100644
--- a/main.c
+++ b/main.c
@@ -3,6 +3,7 @@ no_warn_start
#include <SDL2/SDL.h>
no_warn_end
#include <GL/gl.h>
+#include "text.h"
static void die(char const *fmt, ...) {
char buf[256] = {0};
@@ -38,6 +39,10 @@ int main(void) {
SDL_GL_SetSwapInterval(1); // vsync
+ Font *font = text_font_load("assets/font.ttf", 12);
+ if (!font) {
+ die("Couldn't load font: %s", text_get_err());
+ }
bool quit = false;
while (!quit) {