Вынес управление VkDescriptorSetLayout и VkPipeline в отдельные классы

This commit is contained in:
Jiga228
2026-06-25 20:08:11 +07:00
parent 2a57a30e29
commit 5f3c5d4fc1
11 changed files with 277 additions and 196 deletions
@@ -11,9 +11,11 @@
#include <mutex>
#include <glm/glm.hpp>
#include "VkObjects/DescriptorSetLayout.hpp"
#include "VkObjects/Device.hpp"
#include "VkObjects/Instance.hpp"
#include "VkObjects/PhysicalDevice.hpp"
#include "VkObjects/Pipeline.hpp"
#include "VkObjects/RenderPass.hpp"
#include "VkObjects/Surface.hpp"
#include "VkObjects/Swapchain.hpp"
@@ -69,11 +71,10 @@ class UwURenderEngine final : public RenderEngineBase
VkObjects::Device device_;
VkObjects::Swapchain swapchain_;
VkObjects::RenderPass render_pass_;
VkDescriptorSetLayout ubo_layout_binding_ = VK_NULL_HANDLE;
VkObjects::DescriptorSetLayout layout_binding_;
VkDescriptorPool descriptor_pool_ = VK_NULL_HANDLE;
std::vector<VkDescriptorSet> descriptor_sets_;
VkPipelineLayout pipeline_layout_ = VK_NULL_HANDLE;
VkPipeline graphics_pipeline_ = VK_NULL_HANDLE;
VkObjects::Pipeline pipeline_;
std::vector<VkFramebuffer> framebuffers_;
VkCommandPool command_pool_ = VK_NULL_HANDLE;
std::vector<VkCommandBuffer> command_buffers_;
@@ -89,14 +90,9 @@ class UwURenderEngine final : public RenderEngineBase
std::vector<VkSemaphore> image_available_semaphores_, render_finished_semaphores_;
std::vector<VkFence> in_flight_fences_;
VkShaderModule create_shader_module(const std::string& code) const;
void create_description_set_layout();
void create_uniform_buffers();
void create_descriptor_pool();
void create_descriptor_sets();
void create_graphics_pipeline();
void create_framebuffers();
void create_command_pool();
void allocate_command_buffers();