#pragma once #include #include #include #include #include #include #include namespace hgl{namespace graph{ struct RenderTargetOutputConfig { uint color; bool depth; bool stencil; }; class MaterialCreateInfo { AnsiString shader_name; protected: RenderTargetOutputConfig rto_cfg; ///<输出配置 uint32_t shader_stage; ///<着色器阶段 MaterialDescriptorInfo mdi; ///<材质描述符管理器 AnsiString mi_codes; ///0&&codes.Length()<4)return(false); mi_length=length; if(length>0) mi_codes=codes; return(true); } bool AddStruct(const AnsiString &ubo_typename,const AnsiString &codes); bool AddStruct(const ShaderBufferSource &ss) { return AddStruct(ss.struct_name,ss.codes); } bool AddUBO(const VkShaderStageFlagBits flag_bits,const DescriptorSetType set_type,const AnsiString &type_name,const AnsiString &name); bool AddSampler(const VkShaderStageFlagBits flag_bits,const DescriptorSetType set_type,const SamplerType &st,const AnsiString &name); bool AddUBO(const uint32_t flag_bits,const DescriptorSetType &set_type,const ShaderBufferSource &ss); bool CreateShader(); const MaterialDescriptorInfo &GetMDI()const{return mdi;} };//class MaterialCreateInfo }}//namespace hgl::graph