summaryrefslogtreecommitdiff
path: root/src/core/core.h
diff options
context:
space:
mode:
authorOmniscient <omniscient.oce@gmail.com>2024-07-11 18:03:29 +1000
committerOmniscient <omniscient.oce@gmail.com>2024-07-11 18:03:29 +1000
commit65d74bdb26af833b5380046dec204f685f745cc1 (patch)
tree6a913e8b47787fff9f4650963074ea3f8ab5de27 /src/core/core.h
parent3103f383751a12f8a0bdb22309704f1f826d204c (diff)
changing styles plus simplifying a bit
Diffstat (limited to 'src/core/core.h')
-rw-r--r--src/core/core.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/core/core.h b/src/core/core.h
new file mode 100644
index 0000000..89702fd
--- /dev/null
+++ b/src/core/core.h
@@ -0,0 +1,40 @@
+#pragma once
+
+#include "input.h"
+#include "render_types.h"
+#include "scene.h"
+#include "screenspace.h"
+#include "terrain.h"
+#include "text.h"
+// #include "threadpool.h"
+
+typedef struct core {
+ const char* app_name;
+ // foundations
+ renderer renderer;
+ // threadpool threadpool;
+ // systems
+ input_state input;
+ text_system_state text;
+ terrain_state terrain;
+ screenspace_state screenspace;
+ // data storage
+ scene default_scene;
+ model_pool models;
+ // model_darray* models;
+} core;
+
+core* get_global_core();
+
+// --- Lifecycle
+
+/** @brief Throws error if the core cannot be instantiated */
+void core_bringup();
+void core_shutdown();
+bool should_exit();
+
+void frame_begin();
+void frame_draw();
+void frame_end();
+
+void core_input_update();