diff options
author | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-02-25 13:44:43 +1100 |
---|---|---|
committer | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-02-25 13:44:43 +1100 |
commit | 348161b7ac920ea450becd35685b81e87342d1e5 (patch) | |
tree | 2593df21031e2c786c6ef8e86251834bf2fd9338 /examples | |
parent | 90bd31473ac4abdb733188dd6bc1bfdb60d97765 (diff) |
leave main loop in the example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/main_loop/ex_main_loop.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/examples/main_loop/ex_main_loop.c b/examples/main_loop/ex_main_loop.c index 9814fbe..5870f59 100644 --- a/examples/main_loop/ex_main_loop.c +++ b/examples/main_loop/ex_main_loop.c @@ -8,6 +8,7 @@ int main() { core* core = core_bringup(); + // Examples of how to work with arenas and strings size_t arena_size = 1024; arena scratch = arena_create(malloc(arena_size), arena_size); arena* a = &scratch; @@ -30,16 +31,16 @@ int main() { } // 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); - // } + 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; } |