Skip to content

Commit

Permalink
Change Action<Posef>::create_space to take a &Session
Browse files Browse the repository at this point in the history
Closes #130
  • Loading branch information
Supreeeme committed Aug 26, 2024
1 parent 6c7747a commit 8b3e901
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions openxr/examples/vulkan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,10 @@ pub fn main() {

// Create an action space for each device we want to locate
let right_space = right_action
.create_space(session.clone(), xr::Path::NULL, xr::Posef::IDENTITY)
.create_space(&session, xr::Path::NULL, xr::Posef::IDENTITY)
.unwrap();
let left_space = left_action
.create_space(session.clone(), xr::Path::NULL, xr::Posef::IDENTITY)
.create_space(&session, xr::Path::NULL, xr::Posef::IDENTITY)
.unwrap();

// OpenXR uses a couple different types of reference frames for positioning content; we need
Expand Down
4 changes: 2 additions & 2 deletions openxr/src/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl Action<Posef> {
/// Creates a `Space` relative to this action
pub fn create_space<G>(
&self,
session: Session<G>,
session: &Session<G>,
subaction_path: Path,
pose_in_action_space: Posef,
) -> Result<Space> {
Expand All @@ -97,7 +97,7 @@ impl Action<Posef> {
&info,
&mut out,
))?;
Ok(Space::action_from_raw(self.clone(), session, out))
Ok(Space::action_from_raw(self.clone(), session.clone(), out))
}
}

Expand Down

0 comments on commit 8b3e901

Please sign in to comment.