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

[OpenXR] Adds optional support for the Passthrough extension #2119

Closed
wants to merge 4 commits into from

Conversation

joreg
Copy link
Contributor

@joreg joreg commented Jan 22, 2024

PR Details

For OpenXR devices, this PR adds the option to instantiate the XR_FB_passthrough extension when enabling a VRDevice.

Description

OpenXR supports a wide range of optional extensions. Currently the OpenXR implementation in Stride allows to register extensions by adding them to the OpenXRHmd.extensions list before the device is started. Like this any exension that does not require any deeper integration with the engine (e.g. the XR_EXT_hand_tracking) can then be dealt with in custom code.

In order to support the XR_FB_passthrough extension we needed tighter integration with the engine because it requires a composition layer. So this PR "hardcodes" the support for the passthrough extension which still has to be requested for the device in order to be activated.

In OpenXRHmd.Enable(..) we added a new argument "requestPassthrough" which, if true, adds the XR_FB_passthrough to the list of desired extensions and in case the current hardware supports this extension, it will be instantiated in the public PassthroughExt property. This public property is then meant to be controlled from custom code by setting its public Enabled property.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

@joreg joreg marked this pull request as ready for review January 23, 2024 13:04
@joreg joreg changed the title Adds optional support for the OpenXR Passthrough extension [OpenXR] Adds optional support for the Passthrough extension Jan 23, 2024
@Eideren
Copy link
Collaborator

Eideren commented Jan 26, 2024

@joreg how do you want to move forward with this ? @azeno proposed to fix your conflicts in #2121, would you rather take care of that yourself ?

@azeno
Copy link
Collaborator

azeno commented Jan 26, 2024

We'll rebase this PR and report back. Thanks for merging so quickly!

@azeno
Copy link
Collaborator

azeno commented Feb 7, 2024

To be continued in #2141

@azeno azeno closed this Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants