A bit more refactoring to expose the begin/end transactional nature.
This commit is contained in:
parent
b5c6774412
commit
3d36517b4f
3 changed files with 59 additions and 57 deletions
10
vk_engine.h
10
vk_engine.h
|
|
@ -7,6 +7,11 @@
|
|||
#include <vk_descriptors.h>
|
||||
#include "vk_gui.h"
|
||||
|
||||
struct Transaction {
|
||||
VkCommandBuffer cmd;
|
||||
uint32_t swapchainImageIndex = 0;
|
||||
};
|
||||
|
||||
struct DeletionQueue {
|
||||
std::deque<std::function<void()>> deletors;
|
||||
|
||||
|
|
@ -42,7 +47,7 @@ public:
|
|||
VkPipeline _gradientPipeline;
|
||||
VkPipelineLayout _gradientPipelineLayout;
|
||||
|
||||
DescriptorAllocator globalDescriptorAllocator;
|
||||
DescriptorAllocator _globalDescriptorAllocator;
|
||||
VkDescriptorSet _drawImageDescriptors;
|
||||
VkDescriptorSetLayout _drawImageDescriptorLayout;
|
||||
|
||||
|
|
@ -108,6 +113,9 @@ public:
|
|||
|
||||
void immediate_submit(std::function<void(VkCommandBuffer cmd)>&& function);
|
||||
|
||||
Transaction begin_transaction();
|
||||
void commit_transaction(Transaction& cmd);
|
||||
|
||||
private:
|
||||
void init_vulkan();
|
||||
void init_swapchain();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue