added newly functions at MaterialParameters that used index instead of name
This commit is contained in:
parent
3937206fcb
commit
554220699f
@ -55,6 +55,11 @@ public:
|
||||
|
||||
virtual ~MaterialParameters();
|
||||
|
||||
bool BindUBO(const int &index,DeviceBuffer *ubo,bool dynamic=false);
|
||||
bool BindSSBO(const int &index,DeviceBuffer *ubo,bool dynamic=false);
|
||||
bool BindImageSampler(const int &index,Texture *tex,Sampler *sampler);
|
||||
bool BindInputAttachment(const int &index,ImageView *);
|
||||
|
||||
bool BindUBO(const AnsiString &name,DeviceBuffer *ubo,bool dynamic=false);
|
||||
bool BindSSBO(const AnsiString &name,DeviceBuffer *ubo,bool dynamic=false);
|
||||
bool BindImageSampler(const AnsiString &name,Texture *tex,Sampler *sampler);
|
||||
|
@ -16,6 +16,17 @@ MaterialParameters::~MaterialParameters()
|
||||
delete descriptor_set;
|
||||
}
|
||||
|
||||
bool MaterialParameters::BindUBO(const int &index,DeviceBuffer *ubo,bool dynamic)
|
||||
{
|
||||
if(index<0||!ubo)
|
||||
return(false);
|
||||
|
||||
if(!descriptor_set->BindUBO(index,ubo,dynamic))
|
||||
return(false);
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool MaterialParameters::BindUBO(const AnsiString &name,DeviceBuffer *ubo,bool dynamic)
|
||||
{
|
||||
if(name.IsEmpty()||!ubo)
|
||||
@ -32,6 +43,17 @@ bool MaterialParameters::BindUBO(const AnsiString &name,DeviceBuffer *ubo,bool d
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool MaterialParameters::BindSSBO(const int &index,DeviceBuffer *ssbo,bool dynamic)
|
||||
{
|
||||
if(index<0||!ssbo)
|
||||
return(false);
|
||||
|
||||
if(!descriptor_set->BindSSBO(index,ssbo,dynamic))
|
||||
return(false);
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool MaterialParameters::BindSSBO(const AnsiString &name,DeviceBuffer *ssbo,bool dynamic)
|
||||
{
|
||||
if(name.IsEmpty()||!ssbo)
|
||||
@ -48,6 +70,17 @@ bool MaterialParameters::BindSSBO(const AnsiString &name,DeviceBuffer *ssbo,bool
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool MaterialParameters::BindImageSampler(const int &index,Texture *tex,Sampler *sampler)
|
||||
{
|
||||
if(index<0||!tex||!sampler)
|
||||
return(false);
|
||||
|
||||
if(!descriptor_set->BindImageSampler(index,tex,sampler))
|
||||
return(false);
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool MaterialParameters::BindImageSampler(const AnsiString &name,Texture *tex,Sampler *sampler)
|
||||
{
|
||||
if(name.IsEmpty()||!tex||!sampler)
|
||||
@ -64,6 +97,17 @@ bool MaterialParameters::BindImageSampler(const AnsiString &name,Texture *tex,Sa
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool MaterialParameters::BindInputAttachment(const int &index,ImageView *iv)
|
||||
{
|
||||
if(index<0||!iv)
|
||||
return(false);
|
||||
|
||||
if(!descriptor_set->BindInputAttachment(index,iv))
|
||||
return(false);
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool MaterialParameters::BindInputAttachment(const AnsiString &name,ImageView *iv)
|
||||
{
|
||||
if(name.IsEmpty()||!iv)
|
||||
|
Loading…
x
Reference in New Issue
Block a user