Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Action<Posef>::create_space to take a &Session #168

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading