feat: anchor point for working set

This commit is contained in:
galister
2024-04-24 10:19:26 +09:00
parent f6a9db5759
commit 1fa842bb44
14 changed files with 176 additions and 38 deletions

View File

@@ -213,6 +213,8 @@ pub fn openvr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
TaskType::Overlay(sel, f) => {
if let Some(o) = overlays.mut_by_selector(&sel) {
f(&mut state, &mut o.state);
} else {
log::warn!("Overlay not found for task: {:?}", sel);
}
}
TaskType::CreateOverlay(sel, f) => {

View File

@@ -11,7 +11,7 @@ use vulkano::{Handle, VulkanObject};
use crate::{
backend::overlay::{OverlayData, RelativeTo},
graphics::WlxGraphics,
overlays::watch::WATCH_NAME,
overlays::{anchor::ANCHOR_NAME, watch::WATCH_NAME},
state::AppState,
};
@@ -50,6 +50,10 @@ impl OverlayData<OpenVrOverlayData> {
self.data.sort_order = 68;
}
if *self.state.name == *ANCHOR_NAME.as_ref() {
self.data.sort_order = 67;
}
self.data.handle = Some(handle);
self.data.color = Vec4::ONE;
@@ -260,7 +264,7 @@ impl OverlayData<OpenVrOverlayData> {
m_pQueue: graphics.queue.handle().as_raw() as *mut _,
m_nQueueFamilyIndex: graphics.queue.queue_family_index(),
};
log::debug!(
log::trace!(
"{}: UploadTex {:?}, {}x{}, {:?}",
self.state.name,
format,