DBGCFLAGS=-g -fsanitize=address
DBGLDFLAGS=-fsanitize=address
CFLAGS=-Wall -pedantic $(DBGCFLAGS) -std=c89
-LIBS=
+LIBS=-lSDL3
LDFLAGS=$(DBGLDFLAGS) $(LIBS)
INSTALL_DIR=/usr/local
/* Platform and renderer configuration */
#define LRTS_PLATFORM_POSIX
-#define LRTS_RENDERER_CLI
+#define LRTS_RENDERER_SDL
+/* #define LRTS_RENDERER_CLI */
#endif
#endif
+#ifdef LRTS_RENDERER_SDL
+#include "p_r_sdl/p_init.c"
+#endif
+
#ifdef LRTS_RENDERER_CLI
#include "p_r_cli/p_init.c"
#endif
--- /dev/null
+#include "../p_platform.h"
+#include <SDL3/SDL.h>
+
+int p_render_init(void) {
+ if (!SDL_Init(SDL_INIT_VIDEO)) {
+ u_fprintf(u_stderr, "Failed to init video: %s\n",
+ SDL_GetError());
+ exit(-1);
+ }
+ return 0;
+}
+
+int p_renderer_finish(void) {
+ return 0;
+}