Port changes from -x repo (#3)

* Port config support from -x repo

* Port changes from -x repo
This commit is contained in:
Aleksander
2024-01-29 18:14:54 +01:00
committed by GitHub
parent 3b0440562a
commit dded4f6398
16 changed files with 352 additions and 91 deletions

View File

@@ -1,14 +1,17 @@
use std::{collections::VecDeque, time::Instant};
use glam::{Affine3A, Vec2, Vec3A};
use ovr_overlay::TrackedDeviceIndex;
use tinyvec::array_vec;
#[cfg(feature = "openvr")]
use ovr_overlay::TrackedDeviceIndex;
use crate::state::AppState;
use super::{common::OverlayContainer, overlay::OverlayData};
pub struct TrackedDevice {
#[cfg(feature = "openvr")]
pub index: TrackedDeviceIndex,
pub valid: bool,
pub soc: Option<f32>,

View File

@@ -62,7 +62,7 @@ pub fn openvr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
};
let mut state = {
let graphics = WlxGraphics::new(instance_extensions, device_extensions_fn);
let graphics = WlxGraphics::new_openvr(instance_extensions, device_extensions_fn);
AppState::from_graphics(graphics)
};

View File

@@ -225,7 +225,6 @@ impl OverlayData<OpenVrOverlayData> {
m_pQueue: graphics.queue.handle().as_raw() as *mut _,
m_nQueueFamilyIndex: graphics.queue.queue_family_index(),
};
log::info!(
"{}: UploadTex {:?}, {}x{}, {:?}",
self.state.name,

View File

@@ -54,7 +54,7 @@ pub fn openxr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
log::info!("Using environment blend mode: {:?}", environment_blend_mode);
let mut app_state = {
let graphics = WlxGraphics::new_xr(xr_instance.clone(), system);
let graphics = WlxGraphics::new_openxr(xr_instance.clone(), system);
AppState::from_graphics(graphics)
};