summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-05-10 17:24:15 +1000
committerOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-05-10 17:24:15 +1000
commit3bd21c92678c62e61c10ba730e8c839edc5e967a (patch)
tree11da104541f13459303a8d47500de91c53fe38c0 /src
parent53fe85a463c9c68ec75fa4efb496d1ff864a929e (diff)
poll glfw events on frame start
Diffstat (limited to 'src')
-rw-r--r--src/core.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index ffd72a5..26e7613 100644
--- a/src/core.c
+++ b/src/core.c
@@ -59,7 +59,9 @@ void core_bringup() {
#include <glfw3.h>
/* bool should_window_close(core* core) { glfwWindowShouldClose(core->renderer.window); } */
-void core_input_update() { input_update(&g_core.input); }
+void core_input_update() {
+ input_update(&g_core.input);
+}
void core_frame_begin(core* core) { render_frame_begin(&core->renderer); }
void core_frame_end(core* core) { render_frame_end(&core->renderer); }
@@ -73,6 +75,8 @@ bool should_exit() {
return key_just_released(KEYCODE_ESCAPE) || glfwWindowShouldClose(g_core.renderer.window);
}
-void frame_begin() { render_frame_begin(&g_core.renderer); }
+void frame_begin() {
+ glfwPollEvents();
+ render_frame_begin(&g_core.renderer); }
void frame_draw() {}
void frame_end() { render_frame_end(&g_core.renderer); }