Prefer OpenXR for desktop XR policy

This commit is contained in:
2026-06-05 16:06:52 +02:00
parent 308fb13075
commit bdd7a32ff5
8 changed files with 149 additions and 20 deletions

View File

@@ -17,8 +17,25 @@ enum class PlatformFamily {
webgl,
};
enum class XrRuntimeBackend {
none,
openxr,
openvr,
};
struct XrRuntimeSelection {
XrRuntimeBackend backend = XrRuntimeBackend::none;
bool uses_legacy_openvr_fallback = false;
};
[[nodiscard]] PlatformFamily current_platform_family() noexcept;
[[nodiscard]] const char* xr_runtime_backend_name(XrRuntimeBackend backend) noexcept;
[[nodiscard]] XrRuntimeSelection select_desktop_xr_runtime(
bool openxr_available,
bool openvr_available,
bool allow_legacy_openvr_fallback) noexcept;
[[nodiscard]] bool platform_deletes_recorded_files_on_clear(PlatformFamily family) noexcept;
[[nodiscard]] bool platform_publishes_exported_images(PlatformFamily family) noexcept;
[[nodiscard]] bool platform_flushes_persistent_storage(PlatformFamily family) noexcept;