From dfb6adbcbcc7d50b770b6d5ea82efdd8f8c32e25 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sat, 5 Oct 2024 12:48:05 +1000 Subject: delete documentation workflow --- archive/src/core/core.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 archive/src/core/core.h (limited to 'archive/src/core/core.h') diff --git a/archive/src/core/core.h b/archive/src/core/core.h new file mode 100644 index 0000000..14ba65d --- /dev/null +++ b/archive/src/core/core.h @@ -0,0 +1,43 @@ +#pragma once + +#include "input.h" +#include "mem.h" +#include "render_types.h" +#include "screenspace.h" +#include "terrain.h" +#include "text.h" + +TYPED_POOL(Model, Model) +#define MODEL_GET(h) (Model_pool_get(&g_core.models, h)) +Model* Model_Get(ModelHandle 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; + +Core* get_global_core(); + +/** + @brief Throws error if the core cannot be instantiated + @param [in] optional_window - Leave NULL if you want Celeritas to instantiate its own window with + GLFW, if you want to provide the glfw window then pass it in here. +*/ +void Core_Bringup(const char* window_name, GLFWwindow* optional_window); +void Core_Shutdown(); +bool ShouldExit(); + +GLFWwindow* Core_GetGlfwWindowPtr(Core* core); +struct Renderer* Core_GetRenderer(Core* core); + +void Frame_Begin(); +void Frame_Draw(); +void Frame_End(); -- cgit v1.2.3-70-g09d2