From 7de1a371e887865512312dc5937c6a3c6bf1299d Mon Sep 17 00:00:00 2001 From: ladevieq Date: Tue, 16 Feb 2021 22:26:33 +0100 Subject: Attempt using imgui --- include/vk-api.hpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'include/vk-api.hpp') diff --git a/include/vk-api.hpp b/include/vk-api.hpp index ed8ff65..6534e3f 100644 --- a/include/vk-api.hpp +++ b/include/vk-api.hpp @@ -3,6 +3,7 @@ #include #include +#include #include "vk-context.hpp" @@ -12,11 +13,11 @@ struct Buffer { void* mapped_ptr; }; -struct ComputePipeline { - VkShaderModule shader_module; - VkDescriptorSetLayout descriptor_set_layout; - VkPipelineLayout layout; - VkPipeline handle; +struct Pipeline { + std::vector shader_modules; + VkDescriptorSetLayout descriptor_set_layout; + VkPipelineLayout layout; + VkPipeline handle; }; struct Image { @@ -69,8 +70,9 @@ class vkapi { void destroy_command_buffers(std::vector &command_buffers); - ComputePipeline create_compute_pipeline(const char* shader_path, std::vector bindings); - void destroy_compute_pipeline(ComputePipeline &pipeline); + Pipeline create_compute_pipeline(std::string& shader_name, std::vector bindings); + Pipeline create_graphics_pipeline(std::string& shader_name, VkShaderStageFlagBits shader_stages, std::vector bindings); + void destroy_pipeline(Pipeline &pipeline); std::vector create_descriptor_sets(VkDescriptorSetLayout descriptor_sets_layout, size_t descriptor_sets_count); @@ -105,6 +107,10 @@ class vkapi { vkcontext context; + private: + + std::string shader_stage_extension(VkShaderStageFlags shader_stage); + VkCommandPool command_pool; VkDescriptorPool descriptor_pool; -- cgit v1.3