#pragma once #include #include #include class Buffer; class Image; enum class DescriptorSet { WORLD, SIMULATION, MESH }; class DescriptorPool { public: DescriptorPool(); ~DescriptorPool(); void bindBuffer(const Buffer &buffer, VkDescriptorType type, DescriptorSet set, uint32_t binding); void bindImage(const Image &image, VkDescriptorType type, DescriptorSet set, uint32_t binding); std::map sets; std::map layouts; VkDescriptorPool handle = VK_NULL_HANDLE; private: void createLayout(DescriptorSet set, const std::vector &bindings); };