texture_rect_array was run OK!
This commit is contained in:
@@ -66,4 +66,43 @@ const uint Material::GetVILCount()
|
||||
{
|
||||
return vertex_input->GetInstanceCount();
|
||||
}
|
||||
|
||||
bool Material::BindUBO(const DescriptorSetType &type,const AnsiString &name,DeviceBuffer *ubo,bool dynamic)
|
||||
{
|
||||
MaterialParameters *mp=GetMP(type);
|
||||
|
||||
if(!mp)
|
||||
return(false);
|
||||
|
||||
if(!mp->BindUBO(name,ubo,dynamic))return(false);
|
||||
|
||||
mp->Update();
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool Material::BindSSBO(const DescriptorSetType &type,const AnsiString &name,DeviceBuffer *ubo,bool dynamic)
|
||||
{
|
||||
MaterialParameters *mp=GetMP(type);
|
||||
|
||||
if(!mp)
|
||||
return(false);
|
||||
|
||||
if(!mp->BindSSBO(name,ubo,dynamic))return(false);
|
||||
|
||||
mp->Update();
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool Material::BindImageSampler(const DescriptorSetType &type,const AnsiString &name,Texture *tex,Sampler *sampler)
|
||||
{
|
||||
MaterialParameters *mp=GetMP(type);
|
||||
|
||||
if(!mp)
|
||||
return(false);
|
||||
|
||||
if(!mp->BindImageSampler(name,tex,sampler))return(false);
|
||||
|
||||
mp->Update();
|
||||
return(true);
|
||||
}
|
||||
VK_NAMESPACE_END
|
||||
|
@@ -54,43 +54,4 @@ MaterialInstance::MaterialInstance(Material *mtl,VIL *v,const int id)
|
||||
|
||||
mi_id=id;
|
||||
}
|
||||
|
||||
bool MaterialInstance::BindUBO(const DescriptorSetType &type,const AnsiString &name,DeviceBuffer *ubo,bool dynamic)
|
||||
{
|
||||
MaterialParameters *mp=material->GetMP(type);
|
||||
|
||||
if(!mp)
|
||||
return(false);
|
||||
|
||||
if(!mp->BindUBO(name,ubo,dynamic))return(false);
|
||||
|
||||
mp->Update();
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool MaterialInstance::BindSSBO(const DescriptorSetType &type,const AnsiString &name,DeviceBuffer *ubo,bool dynamic)
|
||||
{
|
||||
MaterialParameters *mp=material->GetMP(type);
|
||||
|
||||
if(!mp)
|
||||
return(false);
|
||||
|
||||
if(!mp->BindSSBO(name,ubo,dynamic))return(false);
|
||||
|
||||
mp->Update();
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool MaterialInstance::BindImageSampler(const DescriptorSetType &type,const AnsiString &name,Texture *tex,Sampler *sampler)
|
||||
{
|
||||
MaterialParameters *mp=material->GetMP(type);
|
||||
|
||||
if(!mp)
|
||||
return(false);
|
||||
|
||||
if(!mp->BindImageSampler(name,tex,sampler))return(false);
|
||||
|
||||
mp->Update();
|
||||
return(true);
|
||||
}
|
||||
VK_NAMESPACE_END
|
||||
|
@@ -147,6 +147,16 @@ Texture2D *RenderResource::LoadTexture2D(const OSString &filename,bool auto_mipm
|
||||
return tex;
|
||||
}
|
||||
|
||||
Texture2DArray *RenderResource::CreateTexture2DArray(const uint32_t width,const uint32_t height,const uint32_t layer,const VkFormat &fmt,bool auto_mipmaps)
|
||||
{
|
||||
Texture2DArray *ta=device->CreateTexture2DArray(width,height,layer,fmt,auto_mipmaps);
|
||||
|
||||
if(ta)
|
||||
Add(ta);
|
||||
|
||||
return ta;
|
||||
}
|
||||
|
||||
bool LoadTexture2DLayerFromFile(GPUDevice *device,Texture2DArray *t2d,const uint32_t layer,const OSString &filename,bool auto_mipmaps);
|
||||
|
||||
bool RenderResource::LoadTexture2DToArray(Texture2DArray *ta,const uint32_t layer,const OSString &filename)
|
||||
|
Reference in New Issue
Block a user