You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
574 B

#pragma once
#include <vulkan/vulkan_core.h>
#include <vector>
#include <map>
class Buffer;
enum class DescriptorSet {
WORLD = 0,
MESH = 1
};
class DescriptorPool {
public:
DescriptorPool();
~DescriptorPool();
void bindBuffer(Buffer* buffer, VkDescriptorType type, DescriptorSet set, uint32_t binding);
std::map<DescriptorSet, VkDescriptorSet> sets;
std::map<DescriptorSet, VkDescriptorSetLayout> setLayouts;
private:
VkDescriptorPool handle = VK_NULL_HANDLE;
void createLayout(DescriptorSet set, const std::vector<VkDescriptorSetLayoutBinding> &bindings);
};