This commit is contained in:
galister
2025-12-17 16:13:40 +09:00
parent e1a3471ed1
commit b28c402ddf
28 changed files with 88 additions and 90 deletions

View File

@@ -1,6 +1,6 @@
use std::f32::consts::PI;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
use ash::vk::SubmitInfo;
use glam::{Affine3A, Vec3, Vec3A, Vec4};
@@ -8,6 +8,7 @@ use idmap::IdMap;
use ovr_overlay::overlay::OverlayManager;
use ovr_overlay::sys::ETrackingUniverseOrigin;
use vulkano::{
VulkanObject,
command_buffer::{
CommandBufferBeginInfo, CommandBufferLevel, CommandBufferUsage, RecordingCommandBuffer,
},
@@ -15,22 +16,21 @@ use vulkano::{
image::view::ImageView,
image::{Image, ImageLayout},
sync::{
fence::{Fence, FenceCreateInfo},
AccessFlags, DependencyInfo, ImageMemoryBarrier, PipelineStages,
fence::{Fence, FenceCreateInfo},
},
VulkanObject,
};
use wgui::gfx::WGfx;
use crate::backend::input::{HoverResult, PointerHit};
use crate::state::AppState;
use crate::subsystem::hid::WheelDelta;
use crate::windowing::Z_ORDER_LINES;
use crate::windowing::backend::{
BackendAttrib, BackendAttribValue, FrameMeta, OverlayBackend, OverlayEventData,
RenderResources, ShouldRender,
};
use crate::windowing::window::{OverlayWindowConfig, OverlayWindowData};
use crate::windowing::Z_ORDER_LINES;
use super::overlay::OpenVrOverlayData;

View File

@@ -5,33 +5,34 @@ use std::{
time::{Duration, Instant},
};
use anyhow::{anyhow, Result};
use anyhow::{Result, anyhow};
use ovr_overlay::{
sys::{ETrackedDeviceProperty, EVRApplicationType, EVREventType},
TrackedDeviceIndex,
sys::{ETrackedDeviceProperty, EVRApplicationType, EVREventType},
};
use smallvec::smallvec;
use vulkano::{device::physical::PhysicalDevice, Handle, VulkanObject};
use vulkano::{Handle, VulkanObject, device::physical::PhysicalDevice};
use wlx_common::overlays::ToastTopic;
use crate::{
RUNNING,
backend::{
BackendError, XrBackend,
input::interact,
openvr::{
helpers::adjust_gain,
input::{set_action_manifest, OpenVrInputSource},
input::{OpenVrInputSource, set_action_manifest},
lines::LinePool,
manifest::{install_manifest, uninstall_manifest},
overlay::OpenVrOverlayData,
},
task::{OpenVrTask, OverlayTask, TaskType},
BackendError, XrBackend,
},
config::save_state,
graphics::{init_openvr_graphics, GpuFutures},
graphics::{GpuFutures, init_openvr_graphics},
overlays::{
toast::Toast,
watch::{watch_fade, WATCH_NAME},
watch::{WATCH_NAME, watch_fade},
},
state::AppState,
subsystem::notifications::NotificationManager,
@@ -39,7 +40,6 @@ use crate::{
backend::{RenderResources, RenderTarget, ShouldRender},
manager::OverlayWindowManager,
},
RUNNING,
};
#[cfg(feature = "wayvr")]

View File

@@ -5,16 +5,16 @@ use smallvec::SmallVec;
use std::{
f32::consts::PI,
sync::{
atomic::{AtomicUsize, Ordering},
Arc,
atomic::{AtomicUsize, Ordering},
},
};
use wgui::gfx::{
WGfx,
cmd::WGfxClearMode,
pass::WGfxPass,
pipeline::{WGfxPipeline, WPipelineCreateInfo},
WGfx,
};
use crate::{
@@ -28,8 +28,8 @@ use vulkano::{
};
use super::{
swapchain::{create_swapchain, SwapchainOpts, WlxSwapchain},
CompositionLayer, XrState,
swapchain::{SwapchainOpts, WlxSwapchain, create_swapchain},
};
static LINE_AUTO_INCREMENT: AtomicUsize = AtomicUsize::new(1);

View File

@@ -1,7 +1,7 @@
use std::{
collections::VecDeque,
ops::Add,
sync::{atomic::Ordering, Arc},
sync::{Arc, atomic::Ordering},
time::{Duration, Instant},
};
@@ -14,17 +14,18 @@ use vulkano::{Handle, VulkanObject};
use wlx_common::overlays::ToastTopic;
use crate::{
FRAME_COUNTER, RUNNING,
backend::{
BackendError, XrBackend,
input::interact,
openxr::{lines::LinePool, overlay::OpenXrOverlayData},
task::{OverlayTask, TaskType},
BackendError, XrBackend,
},
config::save_state,
graphics::{init_openxr_graphics, GpuFutures},
graphics::{GpuFutures, init_openxr_graphics},
overlays::{
toast::Toast,
watch::{watch_fade, WATCH_NAME},
watch::{WATCH_NAME, watch_fade},
},
state::AppState,
subsystem::notifications::NotificationManager,
@@ -32,7 +33,6 @@ use crate::{
backend::{RenderResources, RenderTarget, ShouldRender},
manager::OverlayWindowManager,
},
FRAME_COUNTER, RUNNING,
};
#[cfg(feature = "wayvr")]

View File

@@ -1,12 +1,12 @@
use glam::Vec3A;
use openxr::{self as xr, CompositionLayerFlags};
use smallvec::{smallvec, SmallVec};
use smallvec::{SmallVec, smallvec};
use std::f32::consts::PI;
use xr::EyeVisibility;
use super::{helpers, swapchain::WlxSwapchain, CompositionLayer, XrState};
use super::{CompositionLayer, XrState, helpers, swapchain::WlxSwapchain};
use crate::{
backend::openxr::swapchain::{create_swapchain, SwapchainOpts, WlxSwapchainImage},
backend::openxr::swapchain::{SwapchainOpts, WlxSwapchainImage, create_swapchain},
state::AppState,
windowing::window::OverlayWindowData,
};

View File

@@ -15,13 +15,13 @@ use wgui::gfx::{cmd::WGfxClearMode, pipeline::WPipelineCreateInfo};
use crate::{
backend::openxr::{helpers::translation_rotation_to_posef, swapchain::SwapchainOpts},
config_io,
graphics::{dds::WlxCommandBufferDds, ExtentExt, GpuFutures},
graphics::{ExtentExt, GpuFutures, dds::WlxCommandBufferDds},
state::AppState,
};
use super::{
swapchain::{create_swapchain, WlxSwapchain},
CompositionLayer, XrState,
swapchain::{WlxSwapchain, create_swapchain},
};
pub(super) struct Skybox {

View File

@@ -5,12 +5,12 @@ use openxr as xr;
use smallvec::SmallVec;
use vulkano::{
Handle,
image::{
ImageCreateInfo, ImageUsage,
sys::RawImage,
view::{ImageView, ImageViewCreateInfo},
ImageCreateInfo, ImageUsage,
},
Handle,
};
use wgui::gfx::WGfx;