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.

27 lines
594 B

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