OK???? 3rd_draw_triangle_use_RenderList run OK!.

This commit is contained in:
2023-09-05 20:19:53 +08:00
parent 6e8932fc2f
commit 8bb742f3f4
17 changed files with 356 additions and 145 deletions

View File

@@ -13,6 +13,7 @@
namespace hgl{namespace graph
{
struct GPUDeviceAttribute;
struct UBODescriptor;
namespace mtl
{
@@ -21,13 +22,20 @@ namespace hgl{namespace graph
protected:
const MaterialCreateConfig *config;
uint32_t ubo_range;
uint32_t ssbo_range;
MaterialDescriptorInfo mdi; ///<材质描述符管理器
AnsiString mi_codes; ///<MaterialInstance代码
uint32_t mi_data_bytes; ///<MaterialInstance数据长度
uint32_t mi_shader_stage; ///<MaterialInstance着色器阶段
uint32_t mi_max_count; ///<MaterialInstance最大数量
uint32_t mi_max_count;
UBODescriptor *mi_ubo;
uint32_t l2w_shader_stage;
uint32_t l2w_max_count;
UBODescriptor *l2w_ubo;
ShaderCreateInfoMap shader_map; ///<着色器列表
@@ -68,7 +76,9 @@ namespace hgl{namespace graph
MaterialCreateInfo(const MaterialCreateConfig *);
~MaterialCreateInfo()=default;
bool SetMaterialInstance(const AnsiString &mi_glsl_codes,const uint32_t mi_struct_bytes,const uint32_t shader_stage_flag_bit);
bool SetMaterialInstance(const AnsiString &mi_glsl_codes,const uint32_t mi_struct_bytes,const uint32_t shader_stage_flag_bits);
bool SetLocalToWorld(const uint32_t shader_stage_flag_bits);
bool AddStruct(const AnsiString &ubo_typename,const AnsiString &codes);
bool AddStruct(const ShaderBufferSource &ss){return AddStruct(ss.struct_name,ss.codes);}
@@ -78,7 +88,7 @@ namespace hgl{namespace graph
bool AddUBO(const uint32_t flag_bits,const DescriptorSetType &set_type,const ShaderBufferSource &ss);
bool CreateShader(const GPUDeviceAttribute *);
bool CreateShader();
};//class MaterialCreateInfo
}//namespace mtl
}//namespace graph

View File

@@ -81,6 +81,7 @@ public:
void AddFunction(const AnsiString &str){function_list.Add(str);}
void SetMaterialInstance(UBODescriptor *,const AnsiString &);
void SetLocalToWorld(UBODescriptor *);
void SetMain(const AnsiString &str){main_function=str;}

View File

@@ -19,9 +19,8 @@ namespace hgl
int AddInput(const graph::VAT &type,const AnsiString &name,const VkVertexInputRate input_rate=VK_VERTEX_INPUT_RATE_VERTEX,const VertexInputGroup &group=VertexInputGroup::Basic);
int AddInput(const AnsiString &type,const AnsiString &name,const VkVertexInputRate input_rate=VK_VERTEX_INPUT_RATE_VERTEX,const VertexInputGroup &group=VertexInputGroup::Basic);
void AddMaterialInstanceID();
void AddJoint();
void AddLocalToWorld();
void AddAssign();
};//class ShaderCreateInfoVertex:public ShaderCreateInfo
}//namespace graph
}//namespace hgl::graph