diff options
author | kartofen <mladenovnasko0@gmail.com> | 2023-11-10 21:30:33 +0200 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2023-11-10 21:30:33 +0200 |
commit | 2a733f3d513a7279c1df4efe88fc5386ced2ed14 (patch) | |
tree | 800bd6d5c63034b9408d38c7a2b6264297981fbd /src/graphics.h | |
parent | 4512fafc57d2ad95b83c8476781ce105a2cdc4e5 (diff) |
uniform buffer added
Diffstat (limited to 'src/graphics.h')
-rw-r--r-- | src/graphics.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/graphics.h b/src/graphics.h index 71a8889..ff03e12 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -39,6 +39,7 @@ typedef struct graphics { struct pipeline { VkRenderPass render_pass; + VkDescriptorSetLayout descriptor_layout; // VkDescriptorSetLayout *descriptor_layouts; VkPipelineLayout layout; VkPipeline pipeline; } pipeline; @@ -60,6 +61,12 @@ typedef struct graphics { VkCommandBuffer buffer; } command_graphics, command_transfer; + struct descriptor { + VkDescriptorPool pool; + VkDescriptorSetLayout layout; + VkDescriptorSet set; + } ubo_descriptor; + struct sync { VkSemaphore semph_image_available; VkSemaphore semph_render_finished; @@ -69,6 +76,12 @@ typedef struct graphics { buffer_t vertex_buffer; buffer_t index_buffer; + struct { + buffer_t buffer; + void *mapped_data; + int (*update_ubo)(void *ubo); + } ubo; + } * graphics_t; struct graphics_info { @@ -83,6 +96,9 @@ struct graphics_info { u32 *indices; size_t nindices; + size_t ubo_size; + int (*update_ubo)(void *ubo); + int (*surface_func)(VkInstance instance, VkSurfaceKHR *surface); }; |