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