diff options
author | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-02-24 22:47:46 +1100 |
---|---|---|
committer | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-02-24 22:47:46 +1100 |
commit | 7b3afcaf77f96e7d62f6cd1623ead7f17512d79f (patch) | |
tree | b5f82c64e9c06a84e4d095ab4ac48712e860b673 /examples | |
parent | b047be5252aeb981faea077409c1768fda0301d9 (diff) |
repo init. partial port of existing code
Diffstat (limited to 'examples')
-rw-r--r-- | examples/first.c | 9 | ||||
-rw-r--r-- | examples/main_loop/ex_main_loop.c | 22 |
2 files changed, 22 insertions, 9 deletions
diff --git a/examples/first.c b/examples/first.c deleted file mode 100644 index 0f61a51..0000000 --- a/examples/first.c +++ /dev/null @@ -1,9 +0,0 @@ -#include <stdio.h> -#include "defines.h" - -int main() { - i32 num = -256; - printf("A number: %d\n", num); - - return 0; -}
\ No newline at end of file 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 <GLFW/glfw3.h> + +#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 |