removed unused workaround
This commit is contained in:
@@ -14,9 +14,6 @@ use openxr as xr;
|
|||||||
|
|
||||||
pub fn initialize_xr_graphics(
|
pub fn initialize_xr_graphics(
|
||||||
window: Option<RawHandleWrapper>,
|
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<(
|
) -> anyhow::Result<(
|
||||||
RenderDevice,
|
RenderDevice,
|
||||||
RenderQueue,
|
RenderQueue,
|
||||||
@@ -34,11 +31,8 @@ pub fn initialize_xr_graphics(
|
|||||||
XrInput,
|
XrInput,
|
||||||
XrViews,
|
XrViews,
|
||||||
XrFrameState,
|
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 {
|
pub fn xr_entry() -> xr::Entry {
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ pub fn initialize_xr_graphics(
|
|||||||
window: Option<RawHandleWrapper>,
|
window: Option<RawHandleWrapper>,
|
||||||
// Horrible hack to get the Handtacking extension Loaded, Replace with good system to load
|
// Horrible hack to get the Handtacking extension Loaded, Replace with good system to load
|
||||||
// any extension at some point
|
// any extension at some point
|
||||||
enable_hand_tracking: bool,
|
|
||||||
) -> anyhow::Result<(
|
) -> anyhow::Result<(
|
||||||
RenderDevice,
|
RenderDevice,
|
||||||
RenderQueue,
|
RenderQueue,
|
||||||
@@ -42,7 +41,6 @@ pub fn initialize_xr_graphics(
|
|||||||
XrFrameState,
|
XrFrameState,
|
||||||
// Horrible hack to get the Handtacking extension Loaded, Replace with good system to load
|
// Horrible hack to get the Handtacking extension Loaded, Replace with good system to load
|
||||||
// any extension at some point
|
// any extension at some point
|
||||||
bool,
|
|
||||||
)> {
|
)> {
|
||||||
use wgpu_hal::{api::Vulkan as V, Api};
|
use wgpu_hal::{api::Vulkan as V, Api};
|
||||||
|
|
||||||
@@ -413,7 +411,6 @@ pub fn initialize_xr_graphics(
|
|||||||
.into(),
|
.into(),
|
||||||
// Horrible hack to get the Handtacking extension Loaded, Replace with good system to load
|
// Horrible hack to get the Handtacking extension Loaded, Replace with good system to load
|
||||||
// any extension at some point
|
// any extension at some point
|
||||||
available_extensions.ext_hand_tracking && enable_hand_tracking,
|
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
src/lib.rs
10
src/lib.rs
@@ -32,11 +32,11 @@ pub const LEFT_XR_TEXTURE_HANDLE: ManualTextureViewHandle = ManualTextureViewHan
|
|||||||
pub const RIGHT_XR_TEXTURE_HANDLE: ManualTextureViewHandle = ManualTextureViewHandle(3383858418);
|
pub const RIGHT_XR_TEXTURE_HANDLE: ManualTextureViewHandle = ManualTextureViewHandle(3383858418);
|
||||||
|
|
||||||
/// Adds OpenXR support to an App
|
/// Adds OpenXR support to an App
|
||||||
pub struct OpenXrPlugin(pub bool);
|
pub struct OpenXrPlugin;
|
||||||
|
|
||||||
impl Default for OpenXrPlugin {
|
impl Default for OpenXrPlugin {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
OpenXrPlugin(true)
|
OpenXrPlugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,8 +87,7 @@ impl Plugin for OpenXrPlugin {
|
|||||||
input,
|
input,
|
||||||
views,
|
views,
|
||||||
frame_state,
|
frame_state,
|
||||||
hand_tracking_enabled,
|
) = graphics::initialize_xr_graphics(primary_window).unwrap();
|
||||||
) = graphics::initialize_xr_graphics(primary_window, self.0).unwrap();
|
|
||||||
// std::thread::sleep(Duration::from_secs(5));
|
// std::thread::sleep(Duration::from_secs(5));
|
||||||
debug!("Configured wgpu adapter Limits: {:#?}", device.limits());
|
debug!("Configured wgpu adapter Limits: {:#?}", device.limits());
|
||||||
debug!("Configured wgpu adapter Features: {:#?}", device.features());
|
debug!("Configured wgpu adapter Features: {:#?}", device.features());
|
||||||
@@ -106,9 +105,6 @@ impl Plugin for OpenXrPlugin {
|
|||||||
views,
|
views,
|
||||||
frame_state,
|
frame_state,
|
||||||
));
|
));
|
||||||
if !hand_tracking_enabled {
|
|
||||||
app.insert_resource(DisableHandTracking::Both);
|
|
||||||
}
|
|
||||||
app.insert_resource(ActionSets(vec![]));
|
app.insert_resource(ActionSets(vec![]));
|
||||||
app.add_plugins(RenderPlugin {
|
app.add_plugins(RenderPlugin {
|
||||||
render_creation: RenderCreation::Manual(
|
render_creation: RenderCreation::Manual(
|
||||||
|
|||||||
Reference in New Issue
Block a user