diff --git a/CMSceneGraph b/CMSceneGraph index 6dbe730b..6d9ea2f3 160000 --- a/CMSceneGraph +++ b/CMSceneGraph @@ -1 +1 @@ -Subproject commit 6dbe730bb8a12a83095596e2c6f71ddb6e41a71a +Subproject commit 6d9ea2f340cde0ced8d5990d7d45b185fb16b929 diff --git a/example/common/VulkanAppFramework.h b/example/common/VulkanAppFramework.h index 73f56b4d..addc63a1 100644 --- a/example/common/VulkanAppFramework.h +++ b/example/common/VulkanAppFramework.h @@ -153,7 +153,7 @@ public: ubo_vp_info=db->CreateUBO("Viewport",sizeof(ViewportInfo),&vp_info); - db->global_descriptor.AddUBO(mtl::SBS_ViewportInfo.name,ubo_vp_info); + db->static_descriptor.AddUBO(mtl::SBS_ViewportInfo.name,ubo_vp_info); } return(true); diff --git a/inc/hgl/graph/VKRenderResource.h b/inc/hgl/graph/VKRenderResource.h index a0768a0f..04d6d9bf 100644 --- a/inc/hgl/graph/VKRenderResource.h +++ b/inc/hgl/graph/VKRenderResource.h @@ -80,11 +80,15 @@ private: public: //注:并非一定要走这里,这里只是提供一个注册和自动绑定的机制 - DescriptorBinding global_descriptor; ///<全局属性描述符绑定管理 + DescriptorBinding static_descriptor; ///<静态属性描述符绑定管理 + DescriptorBinding global_descriptor; ///<全局属性描述符绑定管理 public: - RenderResource(GPUDevice *dev):device(dev),global_descriptor(DescriptorSetType::Global){} + RenderResource(GPUDevice *dev):device(dev), + static_descriptor(DescriptorSetType::Static), + global_descriptor(DescriptorSetType::Global) + {} virtual ~RenderResource()=default; public: //Add diff --git a/src/SceneGraph/Vulkan/VKRenderResourceMaterial.cpp b/src/SceneGraph/Vulkan/VKRenderResourceMaterial.cpp index 447c3364..295e6241 100644 --- a/src/SceneGraph/Vulkan/VKRenderResourceMaterial.cpp +++ b/src/SceneGraph/Vulkan/VKRenderResourceMaterial.cpp @@ -175,6 +175,7 @@ Material *RenderResource::CreateMaterial(const mtl::MaterialCreateInfo *mci) Add(mtl); + static_descriptor.Bind(mtl); global_descriptor.Bind(mtl); material_by_name.Add(mtl_name,mtl);