summaryrefslogtreecommitdiff
path: root/src/platform.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-01-28 02:51:21 +0100
committerskal <pascal.massimino@gmail.com>2026-01-28 02:51:21 +0100
commit295626c3d527613c93fa63e2b1f079704600a98e (patch)
tree978da6b066bb1ff69df4abb02887bc940e88afe1 /src/platform.cc
parent96bfc344ce9098681ff739cd7ed0a1d1f8ba54df (diff)
build: Finalize WebGPU integration and platform fixes
Includes correct CMake configuration for GLFW native access, Objective-C++ compilation for the helper library on macOS, and applies clang-format to modified sources.
Diffstat (limited to 'src/platform.cc')
-rw-r--r--src/platform.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/platform.cc b/src/platform.cc
index b0ec86b..2b6af44 100644
--- a/src/platform.cc
+++ b/src/platform.cc
@@ -42,9 +42,13 @@ void platform_shutdown() {
glfwTerminate();
}
-void platform_poll() { glfwPollEvents(); }
+void platform_poll() {
+ glfwPollEvents();
+}
-bool platform_should_close() { return glfwWindowShouldClose(window); }
+bool platform_should_close() {
+ return glfwWindowShouldClose(window);
+}
void platform_toggle_fullscreen() {
g_is_fullscreen = !g_is_fullscreen;
@@ -62,9 +66,13 @@ void platform_toggle_fullscreen() {
}
}
-GLFWwindow *platform_get_window() { return window; }
+GLFWwindow *platform_get_window() {
+ return window;
+}
-double platform_get_time() { return glfwGetTime(); }
+double platform_get_time() {
+ return glfwGetTime();
+}
WGPUSurface platform_create_wgpu_surface(WGPUInstance instance) {
return glfwCreateWindowWGPUSurface(instance, window);