From 7b3afcaf77f96e7d62f6cd1623ead7f17512d79f Mon Sep 17 00:00:00 2001 From: Omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sat, 24 Feb 2024 22:47:46 +1100 Subject: repo init. partial port of existing code --- examples/main_loop/ex_main_loop.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 examples/main_loop/ex_main_loop.c (limited to 'examples/main_loop/ex_main_loop.c') diff --git a/examples/main_loop/ex_main_loop.c b/examples/main_loop/ex_main_loop.c new file mode 100644 index 0000000..0ea9ded --- /dev/null +++ b/examples/main_loop/ex_main_loop.c @@ -0,0 +1,22 @@ +#include + +#include "core.h" +#include "render.h" + +int main() { + core* core = core_bringup(); + + // Main loop + while (!glfwWindowShouldClose(core->renderer.window)) { + input_update(&core->input); + threadpool_process_results(&core->threadpool, 1); + + render_frame_begin(&core->renderer); + + // insert work here + + render_frame_end(&core->renderer); + } + + return 0; +} \ No newline at end of file -- cgit v1.2.3-70-g09d2