added BindSSBO function at MaterialInstance
This commit is contained in:
parent
79feea274a
commit
fa62d7f7ab
@ -26,6 +26,7 @@ public:
|
|||||||
~MaterialInstance();
|
~MaterialInstance();
|
||||||
|
|
||||||
bool BindUBO(const AnsiString &name,GPUBuffer *ubo,bool dynamic=false);
|
bool BindUBO(const AnsiString &name,GPUBuffer *ubo,bool dynamic=false);
|
||||||
|
bool BindSSBO(const AnsiString &name,GPUBuffer *ubo,bool dynamic=false);
|
||||||
bool BindSampler(const AnsiString &name,Texture *tex,Sampler *sampler);
|
bool BindSampler(const AnsiString &name,Texture *tex,Sampler *sampler);
|
||||||
|
|
||||||
void Update();
|
void Update();
|
||||||
|
@ -31,6 +31,22 @@ bool MaterialInstance::BindUBO(const AnsiString &name,GPUBuffer *ubo,bool dynami
|
|||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MaterialInstance::BindSSBO(const AnsiString &name,GPUBuffer *ssbo,bool dynamic)
|
||||||
|
{
|
||||||
|
if(name.IsEmpty()||!ssbo)
|
||||||
|
return(false);
|
||||||
|
|
||||||
|
const int index=material->GetSSBO(name);
|
||||||
|
|
||||||
|
if(index<0)
|
||||||
|
return(false);
|
||||||
|
|
||||||
|
if(!descriptor_sets->BindSSBO(index,ssbo,dynamic))
|
||||||
|
return(false);
|
||||||
|
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
bool MaterialInstance::BindSampler(const AnsiString &name,Texture *tex,Sampler *sampler)
|
bool MaterialInstance::BindSampler(const AnsiString &name,Texture *tex,Sampler *sampler)
|
||||||
{
|
{
|
||||||
if(name.IsEmpty()||!tex||!sampler)
|
if(name.IsEmpty()||!tex||!sampler)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user