fixed a bug that MaterialParameters didn't support dynamic UBO/SSBO.

This commit is contained in:
2021-09-15 19:17:56 +08:00
parent d82534b168
commit 72351af025
14 changed files with 175 additions and 123 deletions

View File

@@ -42,6 +42,13 @@ private:
private:
bool RecreatePipeline()
{
pipeline=CreatePipeline(material,InlinePipeline::Solid2D,Prim::Fan);
return pipeline;
}
bool InitMaterial()
{
material=db->CreateMaterial(OS_TEXT("res/material/PureColor2D"));
@@ -52,9 +59,7 @@ private:
if(!material_instance)return(false);
pipeline=CreatePipeline(material,InlinePipeline::Solid2D,Prim::Fan);
return pipeline;
return RecreatePipeline();
}
void CreateRenderObject()
@@ -166,6 +171,9 @@ public:
ubo_camera_info->Write(&cam.info);
RecreatePipeline();
renderable_instance->UpdatePipeline(pipeline);
BuildCommandBuffer(&render_list);
}
};//class TestApp:public VulkanApplicationFramework