class
DescriptorSetRAII wrapper around a descriptor set, simplifying adding individual descriptor bindings for whatever stage they're required at.
Contents
- Reference
Wrapping descriptor functionality in your own way for projects that are even slightly more advanced than test rigs is probably wise, however. Managing descriptor state, reducing bindings, and coalescing what features/resources you can is for the best - along with using update templates, which this implementation does not support.
Public functions
- void AddDescriptorInfo(VkDescriptorImageInfo info, const VkDescriptorType& type, const size_t& item_binding_idx)
- Sets the required image info for the descriptor at the given index.
- void AddDescriptorInfo(VkDescriptorBufferInfo info, const VkDescriptorType& descr_type, const size_t& item_binding_idx)
- Functionally the same as AddDescriptorInfo with VkDescriptorImageInfo.
- void AddDescriptorInfo(VkDescriptorBufferInfo info, const VkBufferView& view, const VkDescriptorType& type, const size_t& idx)
- Add info for a texel buffer.
- void AddSamplerBinding(const size_t& idx, VkSampler sampler_handler)
- Binds a separable sampler object to the given index.
- void Init(const VkDescriptorPool& parent_pool, const VkDescriptorSetLayout& set_layout)
- Call after all descriptor bindings and infos required have been added, and make sure you have enough space in the given pool for all of these resources.