2020-01-20 15:39:39 +08:00
|
|
|
#ifndef HGL_GRAPH_VULKAN_MATERIAL_INSTANCE_INCLUDE
|
|
|
|
#define HGL_GRAPH_VULKAN_MATERIAL_INSTANCE_INCLUDE
|
|
|
|
|
2020-10-21 11:43:18 +08:00
|
|
|
#include<hgl/graph/VK.h>
|
2020-09-05 17:54:21 +08:00
|
|
|
#include<hgl/type/String.h>
|
2020-01-20 15:39:39 +08:00
|
|
|
VK_NAMESPACE_BEGIN
|
|
|
|
class MaterialInstance
|
|
|
|
{
|
|
|
|
Material *material;
|
|
|
|
|
|
|
|
DescriptorSets *descriptor_sets;
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
friend class Material;
|
|
|
|
|
|
|
|
MaterialInstance(Material *,DescriptorSets *);
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Material * GetMaterial (){return material;}
|
|
|
|
DescriptorSets *GetDescriptorSets (){return descriptor_sets;}
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
~MaterialInstance();
|
|
|
|
|
2020-10-21 12:47:06 +08:00
|
|
|
bool BindUBO(const AnsiString &name,GPUBuffer *ubo);
|
2020-07-07 19:16:23 +08:00
|
|
|
bool BindSampler(const AnsiString &name,Texture *tex,Sampler *sampler);
|
2020-01-20 15:39:39 +08:00
|
|
|
|
|
|
|
void Update();
|
|
|
|
};//class MaterialInstance
|
|
|
|
VK_NAMESPACE_END
|
|
|
|
#endif//HGL_GRAPH_VULKAN_MATERIAL_INSTANCE_INCLUDE
|