diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2021-03-08 23:37:50 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2021-03-08 23:37:50 +0100 |
| commit | 14b00bdd8d0f3a6bdbc5623a964177cc6df2f4cc (patch) | |
| tree | a7907aef4980ad783053e323c6ea3b87809e5a53 /include/vk-api.hpp | |
| parent | a14e25e7954b6101830c604f87694da5aee7625f (diff) | |
Add sampler creation/descruction and draw functions to the api
Diffstat (limited to 'include/vk-api.hpp')
| -rw-r--r-- | include/vk-api.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/vk-api.hpp b/include/vk-api.hpp index 22429fa..78d7068 100644 --- a/include/vk-api.hpp +++ b/include/vk-api.hpp @@ -68,14 +68,19 @@ class vkapi { std::vector<VkSemaphore> create_semaphores(size_t semaphores_count); void destroy_semaphores(std::vector<VkSemaphore> &semaphores); + VkSampler create_sampler(VkFilter filter, VkSamplerAddressMode address_mode); + void destroy_sampler(VkSampler sampler); + std::vector<VkCommandBuffer> create_command_buffers(size_t command_buffers_count); void destroy_command_buffers(std::vector<VkCommandBuffer> &command_buffers); + VkRenderPass create_render_pass(std::vector<VkFormat>& color_attachments_format); VkRenderPass create_render_pass(std::vector<VkFormat>& color_attachments_format, VkFormat depth_attachement_format); void destroy_render_pass(VkRenderPass render_pass); + VkFramebuffer create_framebuffer(VkRenderPass render_pass, std::vector<Image>& images, VkExtent2D size); std::vector<VkFramebuffer> create_framebuffers(VkRenderPass render_pass, std::vector<Image>& images, VkExtent2D size, uint32_t framebuffer_count); void destroy_framebuffer(VkFramebuffer framebuffer); @@ -107,8 +112,14 @@ class vkapi { void image_barrier(VkCommandBuffer command_buffer, VkImageLayout src_layout, VkImageLayout dst_layout, VkPipelineStageFlagBits src_stage, VkPipelineStageFlagBits dst_stage, VkAccessFlags src_access, VkAccessFlags dst_access, Image image); + void begin_render_pass(VkCommandBuffer command_buffer, VkRenderPass render_pass, VkFramebuffer framebuffer, VkExtent2D size, Pipeline pipeline); + void end_render_pass(VkCommandBuffer command_buffer); + void run_compute_pipeline(VkCommandBuffer command_buffer, Pipeline pipeline, VkDescriptorSet set, size_t group_count_x, size_t group_count_y, size_t group_count_z); + void draw(VkCommandBuffer command_buffer, Pipeline pipeline, VkDescriptorSet set, uint32_t vertex_count, uint32_t vertex_offset); + void draw(VkCommandBuffer command_buffer, Pipeline pipeline, VkDescriptorSet set, Buffer index_buffer, uint32_t primitive_count, uint32_t indices_offset, uint32_t vertices_offset); + void blit_full(VkCommandBuffer command_buffer, Image src_image, Image dst_image); void end_record(VkCommandBuffer command_buffer); |
