used newly Bind series function.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user