Manages Vulkan descriptor sets for a given render pass specification. More...
#include <DescriptorSetManager.h>
Public Member Functions | |
| DescriptorSetManager ()=default | |
| ~DescriptorSetManager ()=default | |
| ILLUMINE_API void | Init (Ref< Shader > shader) |
| Initializes the manager with a render pass specification. | |
| ILLUMINE_API 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. | |
| ILLUMINE_API void | SetInput (const Ref< Image2D > &image, std::string_view imageName, std::string_view samplerName) |
| Adds a texture input by reference, associating it with image and sampler binding names. | |
| ILLUMINE_API void | SetInput (const Ref< Image2D > &image, std::string_view imageName) |
| ILLUMINE_API void | SetInput (const Ref< TextureCube > &cubemap, std::string_view imageName, std::string_view samplerName) |
| ILLUMINE_API void | SetInput (const Ref< StorageBuffer > &buffer, std::string_view name) |
| ILLUMINE_API void | Bake () |
| Finalizes and uploads all descriptor sets to the GPU. | |
| ILLUMINE_API const std::vector< VkDescriptorSet > & | GetDescriptorSets () const |
| ILLUMINE_API void | UpdateShader (Ref< Shader > shader) |
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.
|
inline |
Initializes the manager with a render pass specification.
Must be called before setting inputs or baking descriptor sets.
| shader | Ref to the shader to use. |
| void Raven::DescriptorSetManager::SetInput | ( | const Ref< Image2D > & | image, |
| std::string_view | imageName ) |
| void Raven::DescriptorSetManager::SetInput | ( | const Ref< StorageBuffer > & | buffer, |
| std::string_view | name ) |
| void Raven::DescriptorSetManager::SetInput | ( | const Ref< TextureCube > & | cubemap, |
| std::string_view | imageName, | ||
| std::string_view | samplerName ) |
| 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. |
|
inline |