I create VR game software using hand-rolled C and open source libraries. I am interested in making use of OpenXR, however, I can only use OpenXR if it offers equivalent functionality to existing APIs. I am reading the 0.90.1 spec and I have some questions.
There is a /user/hand/left and a /user/hand/right. The spec says: “If more than two hand-held controllers or devices are active, the runtime must determine which two are accessible as /user/hand/left and /user/hand/right.” This text seems to imply that if there are more than two handsets connected, the third cannot be exposed at all. However there are some existing setups which intentionally use a third controller. For example I have heard from people who use a third controller as a “camera” in a mixed-reality filming setup (you can find a blog post about this if you google for “Kert Gardner mixed reality”; the author had to plug in an additional Bluetooth dongle because the Vive hardware had a limit of two controllers, but by their description it sounds like OpenVR could handle it). Does OpenXR support handsets n > 2 at all?
There is a /user/gamepad. What if there are two gamepads? (For an example of why this might happen, consider a party game with asymmetric multiplayer, where one player has a VR headset and the other players are using controllers while watching the game on the computer monitor. Maybe the VR player is a giant swinging a hammer and the controller players are running around at their feet shooting arrows. For a game like this it would be completely normal to have two or more USB controllers.) Is OpenXR limited to a single gamepad?
In OpenXR, how do you detect device presence? For example say I simply want to know if /user/gamepad or /user/hand/left is currently connected. I spoke to someone who suggested I could attempt to create an action for the device and detect an error if this fails, but there is no single action which all devices respond to and also this is inconvenient for checking whether the device list has changed from frame to frame. In real-world use it is normal for devices to appear and disappear while a game is running. Is there a single test that allows checking “present” for any device regardless of kind? Is there an event which gets sent when a device disconnects or connects?
Depending on the answers to these questions, I might have some suggestions in the feedback thread. Thanks!