diff options
| author | skal <pascal.massimino@gmail.com> | 2026-01-27 18:56:59 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-01-27 18:58:50 +0100 |
| commit | 2f68b86ba403fdae97c00569b6bb9b58ad1f33a6 (patch) | |
| tree | cd38e2aa13c26fdcfcf3555050a46db63c936efb /src/platform.cpp | |
initial commit
Diffstat (limited to 'src/platform.cpp')
| -rw-r--r-- | src/platform.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/platform.cpp b/src/platform.cpp new file mode 100644 index 0000000..adb41d2 --- /dev/null +++ b/src/platform.cpp @@ -0,0 +1,26 @@ +#include "platform.h" +#include <GLFW/glfw3.h> + +static GLFWwindow* window = nullptr; + +void platform_init() { + glfwInit(); + window = glfwCreateWindow(1280, 720, "demo64k", nullptr, nullptr); +} + +void platform_shutdown() { + glfwDestroyWindow(window); + glfwTerminate(); +} + +void platform_poll() { + glfwPollEvents(); +} + +bool platform_should_close() { + return glfwWindowShouldClose(window); +} + +GLFWwindow* platform_get_window() { + return window; +} |
