Skip to content

Initial preparation for Android XR support#1552

Closed
matthargett wants to merge 13 commits into
BabylonJS:masterfrom
rebeckerspecialties:create-branch-for-babylon-openxr-upgrade
Closed

Initial preparation for Android XR support#1552
matthargett wants to merge 13 commits into
BabylonJS:masterfrom
rebeckerspecialties:create-branch-for-babylon-openxr-upgrade

Conversation

@matthargett

@matthargett matthargett commented Sep 26, 2025

Copy link
Copy Markdown

Status — superseded (2026-07-10)

There is no remaining patch from this branch that should be merged. Replaying the PR onto current master (7e7e5db9be238b38c68d48d4c48fd45e1481399f) drops the two imported upstream PRs and the exported-activity commit as already applied; the other commits are obsolete, self-reverting, or tied to files that upstream replaced. The clean result is exactly master, so an empty force-push would add no value.

Intent already fulfilled

Intentionally not carried forward

  • The local char_traits workarounds and downstream JsRuntimeHost patch were added and then removed within this PR.
  • The final JsRuntimeHost fork-branch pin is stale; remaining runtime hardening is tracked separately in [codex] Port remaining Android XR compatibility fixes JsRuntimeHost#182.
  • The "system V8" search only modified Install/Test/CMakeLists.txt, which now supports Win32 only. It never changed the production Android runtime path.
  • The androidXrSimulator flavor only changed ABI filtering and added no Android XR/OpenXR behavior. Android's documentation now states that the Android XR emulator does not support OpenXR apps.

Actual Android XR follow-up

Android XR support itself is not complete. The active implementation is #1766, which adds the real Android OpenXR/OpenGL ES backend, stereo swapchains, frame lifecycle, and initial Quest Touch input. It is a much better base than any code in this PR.

Before BabylonNative + NativeXr can claim correct support for Samsung Galaxy XR and XREAL Aura, #1766 still needs Android XR Gradle/manifest/loader packaging, immersive-vr versus immersive-ar blend-mode plumbing, centered viewer poses and robust runtime session loss/end handling, natural hand interaction without a controller requirement, world-understanding mappings, and physical-device validation. Galaxy XR is the first test target; Aura-specific additive-display behavior requires Aura hardware.

References: Android XR OpenXR setup, supported extensions.

@matthargett

Copy link
Copy Markdown
Author

The Win32_x64_D3D12 job appears to fail intermittently beyond my PR due to timeouts. Let me know if there's anything else I need to do. I'm upstreaming the NDK bump and the C++20 clang compatibility fix into JsRuntimeHost , PR in progress.

@CedricGuillemet

Copy link
Copy Markdown
Collaborator

Hi @matthargett issue with D3D12 is fixed with #1550

@matthargett

Copy link
Copy Markdown
Author

Hi @matthargett issue with D3D12 is fixed with #1550

Excellent, thanks! Once the JsRuntimeHost PR passes and merges, I'll pop back up to this one and remove the local patch.

@matthargett

Copy link
Copy Markdown
Author

JSRuntimeHost PR is complete and awaiting review/merge. Once that's done, I'll update this PR to pull in that version and continue. BabylonJS/JsRuntimeHost#115

CedricGuillemet and others added 3 commits October 10, 2025 00:56
- Add `dist/` TS build folder in gitIgnore
- up to latest macOS for installation test iOS/macOS
- up Babylon.js to 8.28.2
- Increased Timeout to 60min because D3D12 check is way slower that it
was 2weeks ago
- Disabled 2 Visual Tests with D3D12
- Moved screenshot capture method from Engine to TestUtils
…JsRuntimeHost PR branch to test integration. macOS tests build and pass.
@matthargett

Copy link
Copy Markdown
Author

Integration tested the JsRuntimeHost PR here, unit tests pass and test app works in macOS and Android Pixel 2 Android 10 simulator.

@yuripourre

Copy link
Copy Markdown

@matthargett it shows that it has conflicts.

Thank you so much for working on this feature. I hope it get merged some day!!

@matthargett

Copy link
Copy Markdown
Author

I revisited this against current master (7e7e5db9be238b38c68d48d4c48fd45e1481399f). The semantic rebase is empty:

The remaining branch changes should not be replayed: the char_traits and downstream JsRuntimeHost patches self-revert, the fork-branch pin is stale, the system-V8 search never touched the production Android path, and the XR flavor only changes ABI filtering.

Android XR itself is not finished. The focused continuation is #1766, which already has the real Android OpenXR/OpenGL ES backend, stereo swapchains, frame lifecycle, and initial controller input. It still needs Android XR build/manifest/loader wiring, correct VR/AR blend-mode and lifecycle behavior, natural hand input, world-understanding mappings, and Galaxy XR hardware validation; XREAL Aura needs its own additive-display hardware pass. The Android XR emulator cannot validate OpenXR apps.

Because this PR has no surviving patch and #1766 is the correct implementation base, I did not force-push an empty rebase. Closing in favor of the upstreamed work above and #1766.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants