renamed to PerMaterialInstance instead of PerMaterial
This commit is contained in:
@@ -23,7 +23,7 @@ MaterialInstance::MaterialInstance(Material *mtl,VIL *v)
|
||||
|
||||
vil=v;
|
||||
|
||||
mp_per_mi=mtl->GetMP(DescriptorSetType::PerMaterial);
|
||||
mp_per_mi=mtl->GetMP(DescriptorSetType::PerMaterialInstance);
|
||||
}
|
||||
|
||||
bool MaterialInstance::BindUBO(const DescriptorSetType &type,const AnsiString &name,DeviceBuffer *ubo,bool dynamic)
|
||||
|
@@ -7,13 +7,13 @@ VK_NAMESPACE_BEGIN
|
||||
MaterialParameters::MaterialParameters(const MaterialDescriptorSets *_mds,const DescriptorSetType &type,DescriptorSet *ds)
|
||||
{
|
||||
mds=_mds;
|
||||
ds_type=type;
|
||||
descriptor_sets=ds;
|
||||
set_type=type;
|
||||
descriptor_set=ds;
|
||||
}
|
||||
|
||||
MaterialParameters::~MaterialParameters()
|
||||
{
|
||||
delete descriptor_sets;
|
||||
delete descriptor_set;
|
||||
}
|
||||
|
||||
bool MaterialParameters::BindUBO(const AnsiString &name,DeviceBuffer *ubo,bool dynamic)
|
||||
@@ -26,7 +26,7 @@ bool MaterialParameters::BindUBO(const AnsiString &name,DeviceBuffer *ubo,bool d
|
||||
if(index<0)
|
||||
return(false);
|
||||
|
||||
if(!descriptor_sets->BindUBO(index,ubo,dynamic))
|
||||
if(!descriptor_set->BindUBO(index,ubo,dynamic))
|
||||
return(false);
|
||||
|
||||
return(true);
|
||||
@@ -42,7 +42,7 @@ bool MaterialParameters::BindSSBO(const AnsiString &name,DeviceBuffer *ssbo,bool
|
||||
if(index<0)
|
||||
return(false);
|
||||
|
||||
if(!descriptor_sets->BindSSBO(index,ssbo,dynamic))
|
||||
if(!descriptor_set->BindSSBO(index,ssbo,dynamic))
|
||||
return(false);
|
||||
|
||||
return(true);
|
||||
@@ -58,7 +58,7 @@ bool MaterialParameters::BindSampler(const AnsiString &name,Texture *tex,Sampler
|
||||
if(index<0)
|
||||
return(false);
|
||||
|
||||
if(!descriptor_sets->BindSampler(index,tex,sampler))
|
||||
if(!descriptor_set->BindSampler(index,tex,sampler))
|
||||
return(false);
|
||||
|
||||
return(true);
|
||||
@@ -74,7 +74,7 @@ bool MaterialParameters::BindInputAttachment(const AnsiString &name,ImageView *i
|
||||
if(index<0)
|
||||
return(false);
|
||||
|
||||
if(!descriptor_sets->BindInputAttachment(index,iv))
|
||||
if(!descriptor_set->BindInputAttachment(index,iv))
|
||||
return(false);
|
||||
|
||||
return(true);
|
||||
@@ -82,6 +82,6 @@ bool MaterialParameters::BindInputAttachment(const AnsiString &name,ImageView *i
|
||||
|
||||
void MaterialParameters::Update()
|
||||
{
|
||||
descriptor_sets->Update();
|
||||
descriptor_set->Update();
|
||||
}
|
||||
VK_NAMESPACE_END
|
@@ -61,7 +61,7 @@ void LoadShaderDescriptor(const uint8 *data,ShaderDescriptor *sd_list,const uint
|
||||
if(ver==2) //以下是旧的,未来不用了,现仅保证能运行
|
||||
{
|
||||
if(sd->name[0]=='g')sd->set_type=DescriptorSetType::Global;else
|
||||
if(sd->name[0]=='m')sd->set_type=DescriptorSetType::PerMaterial;else
|
||||
if(sd->name[0]=='m')sd->set_type=DescriptorSetType::PerMaterialInstance;else
|
||||
if(sd->name[0]=='r')sd->set_type=DescriptorSetType::PerObject;else
|
||||
sd->set_type=DescriptorSetType::PerFrame;
|
||||
}
|
||||
|
Reference in New Issue
Block a user