fixed merge conflicts

This commit is contained in:
Schmarni
2023-11-16 03:09:42 +01:00
21 changed files with 2869 additions and 387 deletions

View File

@@ -27,6 +27,8 @@ use xr_input::hands::hand_tracking::HandTrackingPlugin;
use xr_input::handtracking::HandTrackingTracker;
use xr_input::OpenXrInput;
use crate::xr_input::oculus_touch::ActionSets;
const VIEW_TYPE: xr::ViewConfigurationType = xr::ViewConfigurationType::PRIMARY_STEREO;
pub const LEFT_XR_TEXTURE_HANDLE: ManualTextureViewHandle = ManualTextureViewHandle(1208214591);
@@ -158,8 +160,14 @@ impl Plugin for OpenXrPlugin {
.insert_resource(input.clone())
.insert_resource(views.clone())
.insert_resource(frame_state.clone())
.insert_resource(action_sets.clone())
.insert_resource(HandTrackingTracker::new(&session).unwrap());
.insert_resource(action_sets.clone());
let hands = xr_instance.exts().ext_hand_tracking.is_some();
if hands {
app.insert_resource(HandTrackingTracker::new(&session).unwrap());
app.insert_resource(HandInputSource::OpenXr);
} else {
app.insert_resource(HandInputSource::Emulated);
}
let (left, right) = swapchain.get_render_views();
let left = ManualTextureView {
@@ -347,15 +355,17 @@ pub fn end_frame(
}
{
let _span = info_span!("xr_end_frame").entered();
swapchain
.end(
xr_frame_state.lock().unwrap().predicted_display_time,
&*views.lock().unwrap(),
&input.stage,
**resolution,
**environment_blend_mode,
)
.unwrap();
let result = swapchain.end(
xr_frame_state.lock().unwrap().predicted_display_time,
&*views.lock().unwrap(),
&input.stage,
**resolution,
**environment_blend_mode,
);
match result {
Ok(_) => {}
Err(e) => warn!("error: {}", e),
}
}
}