Why is setprop `debug.xr.graphicsPlugin` required on Android?
See original GitHub issueFor running the hello_xr
sample code, various docs (e.g. here and here) require this manual config step:
Before running hello_xr, make sure to specify the graphic plugin to use with one of the following adb commands:
adb shell setprop debug.xr.graphicsPlugin OpenGLES
adb shell setprop debug.xr.graphicsPlugin Vulkan
To make it simpler to run the sample app, could we set a fallback default in main.cpp to avoid needing to run the adb shell setprop
step? We can output a log to let the developer know that a fallback was chosen for them.
If a different graphics plugin is required for different device models (e.g. Oculus Quest 2 vs Hololens), then we could check the ro.product.name
or ro.product.name
system property and choose a fallback value based on the device?
I could probably create a pull request if I am given some guidance on what you would like implemented here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
So the Gradle builds that are in this tree actually do have a fallback, and a configuration for each graphics plugin:
./gradlew buildVulkanDebug
for example will build an APK that defaults to Vulkan if you don’t setprop. There’s even binaries for it in the latest release: https://github.com/KhronosGroup/OpenXR-SDK-Source/releases/tag/release-1.0.20 - see the two APK files. Does that meet your needs?I don’t have control over either of the docs you linked, unfortunately. Pico has not yet submitted their runtime’s conformance tests, so their system is not officially OpenXR conformant. I’d like to get in touch with them and work with them to help fix that and their instructions but do not have a current contact. They have re-joined the working group, however, so I’m hopeful this will be cleared up soon.
The blog post is (as far as I know) still relatively accurate for Oculus, as I don’t think they are yet using the unified cross-vendor loader for Android, but hopefully soon there will be no need for separate Oculus instructions.
Nice, thanks for all the detailed answers! Feel free to close this issue (I left it open in case you want to use it for any of your own tracking).