diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-10-17 19:18:38 +1100 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-10-17 19:18:38 +1100 |
commit | c557763010a8976680f37609ca10e666ff849cd9 (patch) | |
tree | f2fa05b3e45c5fdc3565d654d485b2c46717324e /src/core.c | |
parent | 3e1aea0243f54e0b68baa3b19ac19f3d965484e0 (diff) |
metal triangle!
Diffstat (limited to 'src/core.c')
-rw-r--r-- | src/core.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1,11 +1,18 @@ // The engine "core" #include <celeritas.h> +#include <stdlib.h> NAMESPACED_LOGGER(core); core g_core = {0}; +#ifdef GPU_METAL +static const char* gapi = "Metal"; +#else +static const char* gapi = "Vulkan"; +#endif + // forward declares void key_callback(GLFWwindow* win, int key, int scancode, int action, int mods); @@ -14,7 +21,11 @@ void core_bringup(const char* window_name, struct GLFWwindow* optional_window) { INFO("Create GLFW window"); glfwInit(); - GLFWwindow* glfw_window = glfwCreateWindow(800, 600, window_name, NULL, NULL); + + char* full_window_name = malloc(sizeof(char) * 100); + int _offset = sprintf(full_window_name, "%s (%s)", window_name, gapi); + + GLFWwindow* glfw_window = glfwCreateWindow(800, 600, full_window_name, NULL, NULL); g_core.window = glfw_window; // This may move into a renderer struct |