diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-11-20 22:28:38 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-11-20 22:28:38 -0500 |
commit | 5e458dff3bcc832b0b28d83bd3ef482174d1dc09 (patch) | |
tree | 28ac081edae5d36aad5df5b2e53848034dc2b99c /main.c | |
parent | c3fd9dfa23969c842991da4cd852330288889463 (diff) |
more text rendering
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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) { |