Integrate WayVR into wlx directly

This commit is contained in:
Aleksander
2024-10-18 20:21:23 +02:00
committed by galister
parent f84d57dc42
commit edfa77e07c
27 changed files with 2256 additions and 59 deletions

View File

@@ -360,6 +360,11 @@ pub fn openxr_run(running: Arc<AtomicBool>, show_by_default: bool) -> Result<(),
}
}
#[cfg(feature = "wayvr")]
if let Some(wayvr) = &app_state.wayvr {
wayvr.borrow_mut().tick_events()?;
}
for o in overlays.iter_mut() {
if !o.state.want_visible {
continue;
@@ -394,6 +399,11 @@ pub fn openxr_run(running: Arc<AtomicBool>, show_by_default: bool) -> Result<(),
layers.push((0.0, maybe_layer));
}
#[cfg(feature = "wayvr")]
if let Some(wayvr) = &app_state.wayvr {
wayvr.borrow_mut().tick_finish()?;
}
command_buffer.build_and_execute_now()?;
layers.sort_by(|a, b| b.0.total_cmp(&a.0));