umbra/projs/shadow/shadow-renderer/inc/vlkx/render/shader/Descriptor.h
Curle a370f28f14
Implement a Vulkan Renderer module (#2)
* Starting work on the Vlkx renderer

* Fix renderer implementation

* Move GLM to FetchContent
2022-07-19 20:41:44 +02:00

30 lines
672 B
C++

#pragma once
#include <vulkan/vulkan.h>
#include <vector>
class Descriptor {
public:
Descriptor();
~Descriptor();
// Global descriptor bindings
VkDescriptorSetLayout layout;
VkDescriptorPool pool;
VkDescriptorSet set;
// Allocate and prepare the descriptors for a simple (uniform buffer only) descriptor.
void createAndAllocateSimple(uint32_t imageCount);
// Fill the Descriptors with the given uniforms
void populate(uint32_t imageCount, VkBuffer uniforms, size_t bufferSize);
void destroy();
private:
// Set up the layout for a single UBO
void createSimpleLayout();
// Setup the pool for a single UBO
void createSimplePool(uint32_t imageCount);
};