stride icon indicating copy to clipboard operation
stride copied to clipboard

[OpenXR] Adds a minimal API to request and control Passthrough

Open azeno opened this issue 1 year ago • 1 comments

PR Details

Description

Follow up on #2119 and #2121. It adds the following new public APIs:

  • VRDeviceSystem.RequestPassthrough - needs to be set in order for the OpenXR extension to get considered.
  • VRRendererSettings.RequestPassthrough - can be set in GameStudio and get passed to the VR device system by the ForwardRenderer
  • VRDevice.SupportsPassthrough - does the device support it?
  • VRDevice.StartPassthrough - needs to be called by user code to turn the feature on

The PR is a little bit different to the original one not exposing internal classes to the user. Not entirly sure here what is the best approach. It's only supported by OpenXR and there also by some devices, but having to cast on these types manually in Stride game code seems awkward as well.

Related Issue

#2119 and #2121

Types of changes

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

Checklist

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

azeno avatar Feb 06 '24 16:02 azeno

Overall looks good. The bool property indicating support is great as it clearly indicates to the user if they can enable this passthrough mode on the given device/VR system.

manio143 avatar Feb 07 '24 08:02 manio143

@manio143 do you think there is now anything left holding this back from being merged?

joreg avatar Feb 26 '24 09:02 joreg

I'll run the build and if it passes I'll merge it. Thanks for reminder

manio143 avatar Feb 26 '24 09:02 manio143