From 70c912b7d545515823d0b06953a8afe0253ab09c Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Tue, 17 Sep 2024 02:20:35 -0500 Subject: core: add several new files Add several new files to the core subsystem. These files will be the basic building blocks upon which the rest of the engine will sit atop of. These files will be present in all builds, including headless and platform builds. Signed-off-by: Danny Holman --- core/init.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 core/init.c (limited to 'core/init.c') diff --git a/core/init.c b/core/init.c new file mode 100644 index 0000000..e56a1ec --- /dev/null +++ b/core/init.c @@ -0,0 +1,23 @@ +#include +#include +#include +#include +#include +#include + +static struct rune_window *window; +static struct rune_renderer *renderer; + +struct rune_window* rune_init(uint32_t width, uint32_t height, const char *title) { + log_output(LOG_INFO, "Started Rune Engine version %s", VERSION); + window = rune_create_window(width, height, title); + rune_input_init(window); + renderer = rune_create_renderer(window, RUNE_RENDERER_VULKAN); +} + +void rune_exit(void) { + log_output(LOG_INFO, "Engine shutdown requested"); + rune_destroy_renderer(renderer); + rune_destroy_window(window); + rune_free_all(); +} -- cgit v1.2.3