Skip to content

Commit

Permalink
removed unused workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmarni-Dev committed Nov 16, 2023
1 parent 2d4d7f5 commit 4fae7f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
8 changes: 1 addition & 7 deletions src/graphics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ use openxr as xr;

pub fn initialize_xr_graphics(
window: Option<RawHandleWrapper>,
// Horrible hack to get the Handtacking extension Loaded, Replace with good system to load
// any extension at some point
enable_hand_tracking: bool,
) -> anyhow::Result<(
RenderDevice,
RenderQueue,
Expand All @@ -34,11 +31,8 @@ pub fn initialize_xr_graphics(
XrInput,
XrViews,
XrFrameState,
// Horrible hack to get the Handtacking extension Loaded, Replace with good system to load
// any extension at some point
bool,
)> {
vulkan::initialize_xr_graphics(window,enable_hand_tracking)
vulkan::initialize_xr_graphics(window)
}

pub fn xr_entry() -> xr::Entry {
Expand Down
3 changes: 0 additions & 3 deletions src/graphics/vulkan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pub fn initialize_xr_graphics(
window: Option<RawHandleWrapper>,
// Horrible hack to get the Handtacking extension Loaded, Replace with good system to load
// any extension at some point
enable_hand_tracking: bool,
) -> anyhow::Result<(
RenderDevice,
RenderQueue,
Expand All @@ -42,7 +41,6 @@ pub fn initialize_xr_graphics(
XrFrameState,
// Horrible hack to get the Handtacking extension Loaded, Replace with good system to load
// any extension at some point
bool,
)> {
use wgpu_hal::{api::Vulkan as V, Api};

Expand Down Expand Up @@ -413,7 +411,6 @@ pub fn initialize_xr_graphics(
.into(),
// Horrible hack to get the Handtacking extension Loaded, Replace with good system to load
// any extension at some point
available_extensions.ext_hand_tracking && enable_hand_tracking,
))
}

Expand Down
10 changes: 3 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ pub const LEFT_XR_TEXTURE_HANDLE: ManualTextureViewHandle = ManualTextureViewHan
pub const RIGHT_XR_TEXTURE_HANDLE: ManualTextureViewHandle = ManualTextureViewHandle(3383858418);

/// Adds OpenXR support to an App
pub struct OpenXrPlugin(pub bool);
pub struct OpenXrPlugin;

impl Default for OpenXrPlugin {
fn default() -> Self {
OpenXrPlugin(true)
OpenXrPlugin
}
}

Expand Down Expand Up @@ -87,8 +87,7 @@ impl Plugin for OpenXrPlugin {
input,
views,
frame_state,
hand_tracking_enabled,
) = graphics::initialize_xr_graphics(primary_window, self.0).unwrap();
) = graphics::initialize_xr_graphics(primary_window).unwrap();
// std::thread::sleep(Duration::from_secs(5));
debug!("Configured wgpu adapter Limits: {:#?}", device.limits());
debug!("Configured wgpu adapter Features: {:#?}", device.features());
Expand All @@ -106,9 +105,6 @@ impl Plugin for OpenXrPlugin {
views,
frame_state,
));
if !hand_tracking_enabled {
app.insert_resource(DisableHandTracking::Both);
}
app.insert_resource(ActionSets(vec![]));
app.add_plugins(RenderPlugin {
render_creation: RenderCreation::Manual(
Expand Down

0 comments on commit 4fae7f4

Please sign in to comment.