diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-10 15:14:04 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-10 15:14:04 +0100 |
| commit | e213eae8ad44fe93d446ca70d4cf020f0c46f560 (patch) | |
| tree | 77cdb68a86a0b8d8156a454906a02a8061f22096 | |
| parent | 49c74168cb6346f96c29e728428e148fb734e792 (diff) | |
lets just use egl
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | src/graphics.cc | 15 | ||||
| -rw-r--r-- | src/graphics.h | 7 |
3 files changed, 2 insertions, 22 deletions
@@ -61,7 +61,7 @@ OBJECTS += $(MI_OBJECT) DEPS = $(OBJECTS:.o=.d) -LIBRARIES = -lwayland-client -lvulkan +LIBRARIES = -lwayland-client all: $(WAYCLOCK) diff --git a/src/graphics.cc b/src/graphics.cc index 94a637f..68fee14 100644 --- a/src/graphics.cc +++ b/src/graphics.cc @@ -8,24 +8,9 @@ enum graphics_error_e wayc_graphics_init(struct graphics_s* graphics) { wayc_notnull(graphics); memset(graphics, 0, sizeof(*graphics)); - VkApplicationInfo appinfo = {}; - appinfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; - appinfo.apiVersion = VK_API_VERSION_1_3; - - VkInstanceCreateInfo createinfo = {}; - createinfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; - createinfo.pApplicationInfo = &appinfo; - - VkResult result = vkCreateInstance(&createinfo, nullptr, &graphics->instance); - if (result != VK_SUCCESS) return GRAPHICS_ERROR_INSTANCE; - - graphics->instance = VK_NULL_HANDLE; return GRAPHICS_ERROR_NONE; } void wayc_graphics_deinit(struct graphics_s* graphics) { wayc_notnull(graphics); - - if (graphics->instance == nullptr) return; - vkDestroyInstance(graphics->instance, nullptr); } diff --git a/src/graphics.h b/src/graphics.h index 373e302..20544de 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -1,15 +1,10 @@ #pragma once -#include <vulkan/vulkan.h> - enum graphics_error_e { GRAPHICS_ERROR_NONE = 0, - GRAPHICS_ERROR_INSTANCE, }; -struct graphics_s { - VkInstance instance; -}; +struct graphics_s {}; enum graphics_error_e wayc_graphics_init(struct graphics_s* graphics); void wayc_graphics_deinit(struct graphics_s* graphics); |
