summaryrefslogtreecommitdiff
path: root/src/wayclock.cc
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-02-10 14:42:16 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-02-10 14:42:16 +0100
commit44b8ab08af2f7acf9bd30b75d07e8adf97884142 (patch)
tree697496883961243d1926610bba1130fb79a30273 /src/wayclock.cc
parentf43f3a070078eb6e97e84a3972763a8a3dc768d0 (diff)
creating wgpu instance
Diffstat (limited to 'src/wayclock.cc')
-rw-r--r--src/wayclock.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wayclock.cc b/src/wayclock.cc
index af54543..07d767e 100644
--- a/src/wayclock.cc
+++ b/src/wayclock.cc
@@ -1,7 +1,10 @@
+#include <wgpu.h>
+
#include <cstdio>
#include "events.h"
#include "graphics.h"
+#include "webgpu.h"
#include "window.h"
#define WAYC_APP_NAME "Wayclock"
@@ -39,6 +42,9 @@ void handle(struct eventloop_s* loop, struct event_s* event) {
}
int main() {
+ WGPUInstance instance = wgpuCreateInstance(nullptr);
+ if (instance == nullptr) wayc_panic("Failed to create WGPU instance");
+
struct graphics_s graphics;
if (wayc_graphics_init(&graphics) != GRAPHICS_ERROR_NONE)
wayc_panic("Failed to initialize graphics");
@@ -63,5 +69,6 @@ int main() {
wayc_window_deinit(&window);
wayc_eventloop_deinit(&loop);
wayc_graphics_deinit(&graphics);
+ wgpuInstanceRelease(instance);
return 0;
} \ No newline at end of file