used newly Bind series function.

This commit is contained in:
2022-03-09 20:33:26 +08:00
parent edbecbb86d
commit 15e80cbc5a
14 changed files with 70 additions and 178 deletions

View File

@@ -62,23 +62,15 @@ private:
cam.vp_width=cam.width=extent.width;
cam.vp_height=cam.height=extent.height;
cam.Refresh();
cam.RefreshCameraInfo();
ubo_camera_info=db->CreateUBO(sizeof(CameraInfo),&cam.info);
if(!ubo_camera_info)
return(false);
{
MaterialParameters *mp_global=material_instance->GetMP(DescriptorSetsType::Global);
if(!mp_global)
return(false);
if(!material_instance->BindUBO(DescriptorSetsType::Global,"g_camera",ubo_camera_info))return(false);
if(!mp_global->BindUBO("g_camera",ubo_camera_info))return(false);
mp_global->Update();
}
return(true);
}
@@ -121,7 +113,7 @@ public:
cam.vp_width=w;
cam.vp_height=h;
cam.Refresh();
cam.RefreshCameraInfo();
ubo_camera_info->Write(&cam.info);