summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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