2024-10-09 14:31:30 -06:00
|
|
|
#ifndef PIPELINE_H
|
|
|
|
#define PIPELINE_H
|
|
|
|
|
|
|
|
#include "vulkan/vulkan_core.h"
|
|
|
|
#include "cglm/types.h"
|
2024-10-09 20:00:56 -06:00
|
|
|
#include "vk_mem_alloc.h"
|
|
|
|
#include "command.h"
|
2024-10-09 14:31:30 -06:00
|
|
|
|
|
|
|
typedef struct GraphicsPipelineStruct {
|
2024-10-09 20:00:56 -06:00
|
|
|
VkPipelineLayout layout;
|
|
|
|
VkPipeline pipeline;
|
2024-10-09 14:31:30 -06:00
|
|
|
} GraphicsPipeline;
|
|
|
|
|
2024-10-09 20:00:56 -06:00
|
|
|
struct UIElement {
|
|
|
|
vec3 pos;
|
|
|
|
vec2 size;
|
|
|
|
vec4 color;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct UIUniform {
|
|
|
|
vec2 size;
|
2024-10-09 14:31:30 -06:00
|
|
|
};
|
|
|
|
|
2024-10-12 14:01:23 -06:00
|
|
|
VkResult create_ui_polygon_pipeline(VkDevice device, VkRenderPass render_pass, VkDescriptorSetLayout descriptor_layout, GraphicsPipeline* pipeline);
|
|
|
|
|
|
|
|
|
|
|
|
VkResult create_ui_descriptor_set(VkDevice device, VmaAllocator allocator, VkExtent2D swapchain_extent, VkDescriptorSetLayout* ui_descriptor_layout, VkDescriptorPool* ui_descriptor_pool, VkDescriptorSet* ui_descriptor_set, VmaAllocation* ui_descriptor_memory, VkBuffer* ui_descriptor_buffer);
|
|
|
|
|
|
|
|
VkResult create_ui_polygon_buffer(VkDevice device, Queue transfer_queue, VkCommandPool transfer_pool, VmaAllocator allocator, VmaAllocation* polygon_buffer_memory, VkBuffer* polygon_buffer);
|
2024-10-09 20:00:56 -06:00
|
|
|
|
2024-10-09 14:31:30 -06:00
|
|
|
#endif
|