diff --git a/inc/hgl/graph/shader/ShaderResource.h b/inc/hgl/graph/shader/ShaderResource.h index c8f1c96a..a8775bd1 100644 --- a/inc/hgl/graph/shader/ShaderResource.h +++ b/inc/hgl/graph/shader/ShaderResource.h @@ -51,6 +51,17 @@ struct ShaderDescriptor using ShaderDescriptorList=List; +enum class DescriptorSetsType +{ + //设计使其对应shader中的sets + + Material=0, ///<材质中永远不变的参数 + MaterialTexture, ///<材质中的纹理参数 + MaterialValues, ///<材质中的变量参数 + RenderableInstance, ///<渲染实例参数 + Global, ///<全局参数 +};// + #ifndef VK_DESCRIPTOR_TYPE_BEGIN_RANGE constexpr size_t VK_DESCRIPTOR_TYPE_BEGIN_RANGE=VK_DESCRIPTOR_TYPE_SAMPLER; #endif//VK_DESCRIPTOR_TYPE_BEGIN_RANGE diff --git a/src/SceneGraph/Vulkan/VKDescriptorSetLayoutCreater.h b/src/SceneGraph/Vulkan/VKDescriptorSetLayoutCreater.h index 41cb1fdb..d4a2a890 100644 --- a/src/SceneGraph/Vulkan/VKDescriptorSetLayoutCreater.h +++ b/src/SceneGraph/Vulkan/VKDescriptorSetLayoutCreater.h @@ -6,13 +6,6 @@ VK_NAMESPACE_BEGIN class DescriptorSets; -enum class DescriptorSetType -{ - Material=0, - Renderable, - Global, -};// - /** * 描述符合集创造器 */ @@ -23,6 +16,7 @@ class DescriptorSetLayoutCreater List layout_binding_list; VkDescriptorSetLayout dsl=VK_NULL_HANDLE; + BindingMapping index_by_binding; BindingMapping index_by_binding_ri; BindingMapping index_by_binding_global; @@ -73,6 +67,6 @@ public: const VkPipelineLayout GetPipelineLayout()const{return pipeline_layout;} - DescriptorSets *Create(const DescriptorSetType &type=DescriptorSetType::Material); + DescriptorSets *Create(const DescriptorSetsType &type); };//class DescriptorSetLayoutCreater VK_NAMESPACE_END \ No newline at end of file