finished write codes of CreateMaterial from MaterialCreateInfo
This commit is contained in:
@@ -57,5 +57,7 @@ public:
|
||||
bool AddSampler(const VkShaderStageFlagBits flag_bits,const DescriptorSetType set_type,const SamplerType &st,const AnsiString &name);
|
||||
|
||||
bool CreateShader();
|
||||
|
||||
const MaterialDescriptorInfo &GetMDI()const{return mdm;}
|
||||
};//class MaterialCreateInfo
|
||||
SHADERGEN_NAMESPACE_END
|
||||
|
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include<hgl/graph/VKShaderDescriptor.h>
|
||||
#include<hgl/graph/VKDescriptorSetType.h>
|
||||
#include<hgl/graph/VKShaderDescriptorSet.h>
|
||||
#include<hgl/shadergen/ShaderGenNamespace.h>
|
||||
#include<hgl/type/Map.h>
|
||||
|
||||
@@ -15,22 +14,6 @@ SHADERGEN_NAMESPACE_BEGIN
|
||||
*/
|
||||
class MaterialDescriptorInfo
|
||||
{
|
||||
struct ShaderDescriptorSet
|
||||
{
|
||||
DescriptorSetType set_type;
|
||||
|
||||
int set;
|
||||
int count;
|
||||
|
||||
ObjectMap<AnsiString,ShaderDescriptor> descriptor_map;
|
||||
|
||||
public:
|
||||
|
||||
ShaderDescriptor *AddDescriptor(VkShaderStageFlagBits ssb,ShaderDescriptor *new_sd); ///<添加一个描述符,如果它本身存在,则返回false
|
||||
};
|
||||
|
||||
using ShaderDescriptorSetArray=ShaderDescriptorSet[DESCRIPTOR_SET_TYPE_COUNT];
|
||||
|
||||
ShaderDescriptorSetArray desc_set_array;
|
||||
|
||||
Map<AnsiString,AnsiString> struct_map;
|
||||
@@ -68,6 +51,11 @@ public:
|
||||
|
||||
void Resort(); //排序产生set号与binding号
|
||||
|
||||
const ShaderDescriptorSetArray &Get()const
|
||||
{
|
||||
return desc_set_array;
|
||||
}
|
||||
|
||||
const bool hasSet(const DescriptorSetType &type)const
|
||||
{
|
||||
return desc_set_array[size_t(type)].count>0;
|
||||
|
@@ -16,7 +16,5 @@ public:
|
||||
|
||||
int AddInput(const graph::VAT &type,const AnsiString &name);
|
||||
int AddInput(const AnsiString &type,const AnsiString &name);
|
||||
|
||||
const hgl::graph::ShaderAttributeArray &GetInput()const;
|
||||
};
|
||||
SHADERGEN_NAMESPACE_END
|
||||
|
Reference in New Issue
Block a user