upgraded DescriptorBinding

This commit is contained in:
2023-03-27 10:22:55 +08:00
parent 88f23d9a07
commit 3937206fcb
5 changed files with 27 additions and 15 deletions

View File

@@ -2,22 +2,30 @@
#define HGL_GRAPH_DESCRIPTOR_BINDING_MANAGE_INCLUDE
#include<hgl/type/Map.h>
#include<hgl/graph/VKDescriptorSetType.h>
namespace hgl
{
namespace graph
{
class DeviceBuffer;
class Texture;
class MaterialParameters;
class MaterialInstance;
class DescriptorBinding
{
DescriptorSetType set_type;
Map<AnsiString,DeviceBuffer *> ubo_map;
Map<AnsiString,DeviceBuffer *> ssbo_map;
Map<AnsiString,Texture *> texture_map;
public:
DescriptorBinding(const DescriptorSetType &dst)
{
set_type=dst;
}
bool AddUBO(const AnsiString &name,DeviceBuffer *buf)
{
if(!buf)return(false);
@@ -84,7 +92,7 @@ namespace hgl
texture_map.DeleteByValue(tex);
}
bool Bind(MaterialParameters *);
bool Bind(MaterialInstance *);
};//class DescriptorBinding
}//namespace graph
}//namespace hgl