From f8641a5cc4c8baf1f0a7be3685afc219d90143d9 Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Wed, 17 Jul 2024 14:45:31 +1000 Subject: whole thing is compiling and running again --- src/core/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/core.c b/src/core/core.c index 6ccd0d0..de67b56 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -22,6 +22,8 @@ inline Core* GetCore() { return &g_core; } void Core_Bringup() { INFO("Initiate Core bringup"); + memset(&g_core, 0, sizeof(Core)); + RendererConfig conf = { .window_name = { "Celeritas Engine Core" }, .scr_width = SCR_WIDTH, .scr_height = SCR_HEIGHT, @@ -29,7 +31,7 @@ void Core_Bringup() { g_core.renderer = malloc(Renderer_GetMemReqs()); // initialise all subsystems - if (!Renderer_Init(conf, g_core.renderer)) { + if (!Renderer_Init(conf, g_core.renderer, &g_core.window)) { // FATAL("Failed to start renderer"); ERROR_EXIT("Failed to start renderer\n"); } @@ -50,8 +52,6 @@ void Core_Bringup() { // scene_init(&g_core.default_scene); } -#include - void Core_Shutdown() { Input_Shutdown(&g_core.input); Renderer_Shutdown(g_core.renderer); @@ -63,7 +63,7 @@ bool ShouldExit() { } void Frame_Begin() { - glfwPollEvents(); + Input_Update(&g_core.input); Render_FrameBegin(g_core.renderer); } void Frame_Draw() {} -- cgit v1.2.3-70-g09d2