DescriptorSets增加BindUBODynamic函数
This commit is contained in:
parent
8bf102b0f4
commit
837d76f8f1
@ -40,6 +40,7 @@ public:
|
|||||||
|
|
||||||
void Clear();
|
void Clear();
|
||||||
bool BindUBO(const uint32_t binding,const VkDescriptorBufferInfo *);
|
bool BindUBO(const uint32_t binding,const VkDescriptorBufferInfo *);
|
||||||
|
bool BindUBODynamic(const uint32_t binding,const VkDescriptorBufferInfo *);
|
||||||
bool BindSampler(const uint32_t binding,Texture *,Sampler *);
|
bool BindSampler(const uint32_t binding,Texture *,Sampler *);
|
||||||
void Update();
|
void Update();
|
||||||
};//class DescriptorSets
|
};//class DescriptorSets
|
||||||
|
@ -25,6 +25,21 @@ bool DescriptorSets::BindUBO(const uint32_t binding,const VkDescriptorBufferInfo
|
|||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DescriptorSets::BindUBODynamic(const uint32_t binding,const VkDescriptorBufferInfo *buf_info)
|
||||||
|
{
|
||||||
|
VkWriteDescriptorSet writeDescriptorSet = {};
|
||||||
|
|
||||||
|
writeDescriptorSet.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
|
||||||
|
writeDescriptorSet.dstSet = desc_set;
|
||||||
|
writeDescriptorSet.descriptorCount = 1;
|
||||||
|
writeDescriptorSet.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC;
|
||||||
|
writeDescriptorSet.pBufferInfo = buf_info;
|
||||||
|
writeDescriptorSet.dstBinding = binding;
|
||||||
|
|
||||||
|
write_desc_sets.Add(writeDescriptorSet);
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
bool DescriptorSets::BindSampler(const uint32_t binding,Texture *tex,Sampler *sampler)
|
bool DescriptorSets::BindSampler(const uint32_t binding,Texture *tex,Sampler *sampler)
|
||||||
{
|
{
|
||||||
if(!tex||!sampler)
|
if(!tex||!sampler)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user