NarcEngine 0.1.1
C++ Vulkan game engine
 
Loading...
Searching...
No Matches
DescriptorPool.h
1#pragma once
2
3#include <vulkan/vulkan.h>
4
5#include "DescriptorPoolBuilder.h"
6#include "core/DeviceComponent.h"
7#include "core/DeviceHandler.h"
8
9namespace narc_engine {
10 class DescriptorPool : public DeviceComponent
11 {
12 public:
13 explicit DescriptorPool(uint32_t poolCount);
14 ~DescriptorPool();
15
16 GETTER DescriptorPoolBuilder* builder() const { return m_builder.get(); }
17
18 void create();
19
20 void allocateDescriptorSets(VkDescriptorSetAllocateInfo* allocInfo, VkDescriptorSet* descriptorSets) const;
21
22 void release();
23
24 private:
25 std::unique_ptr<DescriptorPoolBuilder> m_builder;
26
27 VkDescriptorPool m_descriptorPool;
28
29 bool m_allocated = false;
30 };
31}
Definition DescriptorPoolBuilder.h:5