diff options
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; |