made context statically allocated

This commit is contained in:
Luka Jankovic 2025-07-01 23:53:16 +02:00
parent b2a5ede334
commit d41e801aeb
3 changed files with 10 additions and 14 deletions

13
main.c
View file

@ -6,16 +6,17 @@
int main(int argc, char *argv[]) {
struct kubo_context *context = kubo_context_init();
struct kubo_context context;
kubo_context_init(&context);
kubo_window_init(context);
kubo_window_init(&context);
while (!kubo_window_should_close(context)) {
kubo_window_tick(context);
while (!kubo_window_should_close(&context)) {
kubo_window_tick(&context);
}
kubo_window_cleanup(context);
kubo_context_cleanup(context);
kubo_window_cleanup(&context);
kubo_context_cleanup(&context);
return 0;
}