![]() |
Raven Engine v0.1
|
Manages Vulkan descriptor sets for a given render pass specification. More...
#include <DescriptorSetManager.h>
Public Member Functions | |
| DescriptorSetManager ()=default | |
| ~DescriptorSetManager ()=default | |
| void | Init (RenderPassSpecification *spec) |
| Initializes the manager with a render pass specification. | |
| void | SetInput (const Ref< UniformBuffer > &uniformBuffer, std::string_view name) |
| Adds a uniform buffer input by reference and associates it with a shader binding name. | |
| void | SetInput (const Ref< Texture2D > &texture, std::string_view imageName, std::string_view samplerName) |
| Adds a texture input by reference, associating it with image and sampler binding names. | |
| void | Bake () |
| Finalizes and uploads all descriptor sets to the GPU. | |
Manages Vulkan descriptor sets for a given render pass specification.
Handles the allocation, updating, and baking of descriptor sets based on uniform buffers and textures provided by the user. Internally tracks inputs and prepares Vulkan descriptor writes.
|
default |
|
default |
| void Raven::DescriptorSetManager::Bake | ( | ) |
Finalizes and uploads all descriptor sets to the GPU.
This function performs Vulkan descriptor writes for all inputs added via SetInput. Must be called after all inputs are set.
| void Raven::DescriptorSetManager::Init | ( | RenderPassSpecification * | spec | ) |
Initializes the manager with a render pass specification.
Must be called before setting inputs or baking descriptor sets.
| spec | Pointer to the render pass specification to use. |
| void Raven::DescriptorSetManager::SetInput | ( | const Ref< UniformBuffer > & | uniformBuffer, |
| std::string_view | name ) |
Adds a uniform buffer input by reference and associates it with a shader binding name.
| uniformBuffer | Reference to the uniform buffer. |
| name | Shader uniform name to bind this buffer to. |