SpiecsEngine
 
Loading...
Searching...
No Matches

◆ AddBindLessTexture() [2/2]

template<typename T >
Renderer::DescriptorSetBuilder & Spices::Renderer::DescriptorSetBuilder::AddBindLessTexture ( uint32_t set,
uint32_t binding,
VkShaderStageFlags stageFlags,
const std::vector< std::string > & textureNames )
inline

fill in imageInfos.

Registy descriptor and add binging to it.

Definition at line 2681 of file Renderer.h.

2687 {
2689
2693 for (int i = 0; i < textureNames.size(); i++)
2694 {
2695 const std::shared_ptr<Texture> texture = ResourcePool<Texture>::Load<T>(textureNames[i], textureNames[i]);
2696 m_ImageInfos[set][binding].push_back(*texture->GetResource<VulkanImage>()->GetImageInfo());
2697 }
2698
2702 const auto descriptorSet = DescriptorSetManager::Registry(m_DescriptorSetId, set);
2703 descriptorSet->AddBinding(binding, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, stageFlags, SpicesShader::BINDLESS_TEXTURE_MAXNUM);
2704
2705 return *this;
2706 }
#define SPICES_PROFILE_ZONE
static std::shared_ptr< VulkanDescriptorSet > Registry(const String2 &name, uint32_t set)
Registry a VulkanDescriptorSet, create one if find none.
std::unordered_map< uint32_t, std::unordered_map< uint32_t, std::vector< VkDescriptorImageInfo > > > m_ImageInfos
DescriptorSet Image type binging info. [set] - [binding] - [info].
Definition Renderer.h:742
String2 m_DescriptorSetId
The Descriptor Set Manager ID descriptorSet belongs to.
Definition Renderer.h:730

References m_DescriptorSetId.