diff options
author | Danny Holman <dholman@gymli.org> | 2024-11-27 21:59:02 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2024-11-27 22:02:08 -0600 |
commit | a62d0aea52df81648b9d429ffd5b3e8ef190ed52 (patch) | |
tree | 9769372666083d511578a0ac98b3c1ae883173bd /render/vulkan/context.h | |
parent | 6944276194f05c2a61aa92fe7b9104a7b947f43d (diff) |
render: centralize the type definitions
Centralize the type definitions for the Vulkan renderer. This removes
the possibility for cyclic dependencies in the include paths.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'render/vulkan/context.h')
-rw-r--r-- | render/vulkan/context.h | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/render/vulkan/context.h b/render/vulkan/context.h index 14a86f1..e671223 100644 --- a/render/vulkan/context.h +++ b/render/vulkan/context.h @@ -1,39 +1,7 @@ #ifndef VKCONTEXT_H #define VKCONTEXT_H -#include "surface.h" -#include "device.h" -#include "swapchain.h" -#include "renderpass.h" -#include "framebuffer.h" -#include "fence.h" - -struct ext_container { - const char** extensions; - uint32_t ext_count; -}; - -struct vklayer_container { - const char** vklayer_names; - uint32_t vklayer_count; -}; - -struct vkcontext { - VkInstance instance; - VkDebugUtilsMessengerEXT db_messenger; - VkSemaphore *queue_semaphores; - VkSemaphore *image_semaphores; - struct vksurface *surface; - struct vkswapchain *swapchain; - struct vkrendpass *rendpass; - struct vkdev *dev; - struct vkcmdbuffer** cmdbuffers; - struct vkframebuffer** framebuffers; - struct vkfence** fences_in_flight; - struct vkfence** images_in_flight; - uint32_t num_fences_in_flight; - uint32_t img_index; -}; +#include "vk_types.h" struct vkcontext* create_vkcontext(struct vklayer_container *vklayers, struct ext_container *ext); void destroy_vkcontext(struct vkcontext *context); |