Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
796 stars 100 forks source link

[OpenXR] Properly detect eye tracking availability #1525

Closed svillar closed 3 weeks ago

svillar commented 4 weeks ago

In order to use eye tracking we need to perform two different tests, first of all the runtime must advertise the extension as supported and secondly, the runtime must acknowledge that the extension is ready to be used.

In the OpenXRInput code that was initializing the eye trackers we were only checking the first condition. However we should also check the value of eyeGazeProperties.supportsEyeGazeInteraction in order to verify that eye tracking is indeed ready to be used in the specific device we're using.

That's why OpenXRInput now receives a new bool parameter in the creation method which is only true if the extension is available in the runtime and enabled in the device.