SpiecsEngine
 
Loading...
Searching...
No Matches

◆ AddAttachmentTexture()

Renderer::DescriptorSetBuilder & Spices::Renderer::DescriptorSetBuilder::AddAttachmentTexture ( uint32_t set,
uint32_t binding,
VkShaderStageFlags stageFlags,
const std::vector< std::string > & textureNames )

Add the attachment as texture to descriptor set layout.

Parameters
[in]setWhich set this texture wil use.
[in]bindingWhich binding this texture wil use.
[in]stageFlagsWhich buffer stage this buffer will use.
[in]textureNamesAll Texture's Name.
Returns
Returns this reference.

fill in imageInfos.

fill in imageInfos.

Definition at line 1747 of file Renderer.cpp.

1753 {
1755
1759 for (size_t i = 0; i < textureNames.size(); i++)
1760 {
1761 RendererResourceCreateInfo resInfo;
1762 resInfo.name = textureNames[i];
1763 const auto info = m_Renderer->m_RendererResourcePool->AccessResource(resInfo);
1764
1765 m_ImageInfos[set][binding].push_back(*info);
1766 }
1767
1768 const auto descriptorSet = DescriptorSetManager::Registry(m_DescriptorSetId, set);
1769 descriptorSet->AddBinding(binding, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, stageFlags, static_cast<uint32_t>(textureNames.size()));
1770
1771 return *this;
1772 }
#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
Renderer * m_Renderer
Specific Renderer pointer. Passed while this class instanced.
Definition Renderer.h:720
std::shared_ptr< RendererResourcePool > m_RendererResourcePool
RendererResourcePool, Passed by instanced.
Definition Renderer.h:2007

References m_DescriptorSetId.