diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-14 23:55:18 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-14 23:55:18 +1000 |
commit | b9315f9cb625db09c3c41d8adf5230a67510bef7 (patch) | |
tree | 8e02010d4e29c82ec9310b02b7924f4c8456ef6f /src/core | |
parent | 529a603128d5e9dc4701322f44961f165e2183e1 (diff) |
wip shadows
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core.c | 7 | ||||
-rw-r--r-- | src/core/core.h | 15 |
2 files changed, 14 insertions, 8 deletions
diff --git a/src/core/core.c b/src/core/core.c index 385479d..6ccd0d0 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -17,13 +17,6 @@ Core g_core; /** @brief global `Core` that other files can use */ -struct Core { - const char* app_name; - GLFWwindow* window; - Renderer* renderer; - Input_State input; -}; - /** @brief Gets the global `Core` singleton */ inline Core* GetCore() { return &g_core; } diff --git a/src/core/core.h b/src/core/core.h index 78dcd14..b0f8dbe 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -2,12 +2,25 @@ #include "input.h" #include "render_types.h" +#include "mem.h" #include "scene.h" #include "screenspace.h" #include "terrain.h" #include "text.h" -typedef struct Core Core; +TYPED_POOL(Model, Model) +#define MODEL_GET(h) (Model_pool_get(&g_core.models, h)) + +typedef struct GLFWwindow GLFWwindow; + +typedef struct Core { + const char* app_name; + GLFWwindow* window; + Renderer* renderer; + Input_State input; + Model_pool models; +} Core; +extern Core g_core; struct Renderer; |