diff options
author | omnisci3nce <omniscient.oce@gmail.com> | 2024-07-14 21:47:25 +1000 |
---|---|---|
committer | omnisci3nce <omniscient.oce@gmail.com> | 2024-07-14 21:47:25 +1000 |
commit | 529a603128d5e9dc4701322f44961f165e2183e1 (patch) | |
tree | 3e5d65ac503b971412ae35bfc5fb67a438a3c364 /src/core | |
parent | 5b001d39d42314085164724d3a417fb8ebd54f98 (diff) |
generate api docs python
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core.c | 2 | ||||
-rw-r--r-- | src/core/core.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/core/core.c b/src/core/core.c index 602d35c..385479d 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -34,6 +34,7 @@ void Core_Bringup() { .scr_height = SCR_HEIGHT, .clear_colour = (Vec3){ .08, .08, .1 } }; + g_core.renderer = malloc(Renderer_GetMemReqs()); // initialise all subsystems if (!Renderer_Init(conf, g_core.renderer)) { // FATAL("Failed to start renderer"); @@ -61,6 +62,7 @@ void Core_Bringup() { void Core_Shutdown() { Input_Shutdown(&g_core.input); Renderer_Shutdown(g_core.renderer); + free(g_core.renderer); } bool ShouldExit() { diff --git a/src/core/core.h b/src/core/core.h index 7916143..78dcd14 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -9,6 +9,8 @@ typedef struct Core Core; +struct Renderer; + Core* get_global_core(); /** @brief Throws error if the core cannot be instantiated */ @@ -16,6 +18,8 @@ void Core_Bringup(); void Core_Shutdown(); bool ShouldExit(); +struct Renderer* Core_GetRenderer(Core* core); + void Frame_Begin(); void Frame_Draw(); void Frame_End(); |