Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add manifest entries for Magic Leap #178

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

BastiaanOlij
Copy link
Member

@BastiaanOlij BastiaanOlij commented Jun 27, 2024

This PR adds a new export plugin for Magic Leap 2 based on https://developer-docs.magicleap.cloud/docs/guides/openxr/getting-started/android-manifest-settings/
It uses the standard Khronos loader but adds in specific settings for Magic Leap.

It's not clearly defined in the writeup here but from what I gather the hand tracking is a normal permission and doesn't require further user interaction.

The interaction can be found under the Magicleap heading:
image

I can't test on a Magic Leap myself but we have a user on discord who's likely able to test this for us.

@BastiaanOlij BastiaanOlij added the enhancement New feature or request label Jun 27, 2024
@BastiaanOlij BastiaanOlij added this to the 3.0.0 milestone Jun 27, 2024
@BastiaanOlij BastiaanOlij self-assigned this Jun 27, 2024
@m4gr3d
Copy link
Collaborator

m4gr3d commented Jun 27, 2024

I've not added checks in whether HTC and Magic Leap settings are both selected.

We should include a vendor drop down under the khronos section and only show the options for the vendors that is selected.

@BastiaanOlij
Copy link
Member Author

I've not added checks in whether HTC and Magic Leap settings are both selected.

We should include a vendor drop down under the khronos section and only show the options for the vendors that is selected.

Is that possible in that interface? That would definitely be the preferred option. It can then also have a "other" options that just exports without any platform specific flags that hopefully works on future devices

@m4gr3d
Copy link
Collaborator

m4gr3d commented Jun 29, 2024

I've not added checks in whether HTC and Magic Leap settings are both selected.

We should include a vendor drop down under the khronos section and only show the options for the vendors that is selected.

Is that possible in that interface? That would definitely be the preferred option. It can then also have a "other" options that just exports without any platform specific flags that hopefully works on future devices

@BastiaanOlij The second commit of #181 showcases how to do so.

@m4gr3d
Copy link
Collaborator

m4gr3d commented Jul 1, 2024

@BastiaanOlij Can you update the changelog.

@BastiaanOlij
Copy link
Member Author

@BastiaanOlij Can you update the changelog.

Done, also rebased and added an export preset for Magic Leap.

@BastiaanOlij BastiaanOlij force-pushed the add_magic_leap_2_settings branch 3 times, most recently from 09f2c7b to d92abcb Compare July 3, 2024 02:08
@BastiaanOlij
Copy link
Member Author

Turns out Magic Leap is an x86_64 device, not arm :) Had to update the export preset accordingly.

@BastiaanOlij
Copy link
Member Author

During xR meeting discussed whether we should have an HTC entry and Magic leap entry separate just like we have a Pico entry, to make this more managable. Might redo this PR to show that approach.

@m4gr3d
Copy link
Collaborator

m4gr3d commented Jul 17, 2024

During xR meeting discussed whether we should have an HTC entry and Magic leap entry separate just like we have a Pico entry, to make this more managable. Might redo this PR to show that approach.

@BastiaanOlij Should this be put as a draft for now?

@BastiaanOlij
Copy link
Member Author

During xR meeting discussed whether we should have an HTC entry and Magic leap entry separate just like we have a Pico entry, to make this more managable. Might redo this PR to show that approach.

@BastiaanOlij Should this be put as a draft for now?

Yes I'll change it, I just need to find some time to make the needed changes

@BastiaanOlij BastiaanOlij marked this pull request as draft July 17, 2024 04:08
@BastiaanOlij BastiaanOlij modified the milestones: 3.0.0, 3.0.1 Aug 16, 2024
@BastiaanOlij BastiaanOlij force-pushed the add_magic_leap_2_settings branch 2 times, most recently from 7c58b50 to 0feace8 Compare August 21, 2024 04:12
@BastiaanOlij
Copy link
Member Author

Apologies for taking so long to finally redo this one.

As discussed in the XR meeting a few weeks ago, we've decided to start creating separate export plugin entries for each vendor even if they are using the Khronos loader. This so we can separate out the needed manifest entries and privilege handling.
As we minimize what we duplicate and ensure in our export that only relevant binaries are included, this seems to be the best path forward to deal with the differences between vendors.

Eventually the Khronos entry should become an entry that makes no assumptions about the vendor and result in an APK that can run on any Android device but won't be able to make use of any vendor specific logic that requires vendor specific manifest entries.
This is a future target as this requires changes/enforcement in the OpenXR spec that currently is not available.

At some point in the near future we will thus make HTC its own export plugin, but that is not covered by this PR.

This PR purely implements Magicleap as an export plugin similar to what we've already done with PICO. Both also use the Khronos loader. These two now form the blueprint for other platforms we intent to add in the near future.

@BastiaanOlij BastiaanOlij marked this pull request as ready for review August 21, 2024 04:23
@BastiaanOlij BastiaanOlij modified the milestones: 3.0.1, 3.1.0 Aug 23, 2024
@BastiaanOlij
Copy link
Member Author

XR Meeting 23/08/24

Think we should merge this soonish because we can't fully test this. If there is an issue we can always do a fix.
Fredia to do a final Code Review
Bas to update CHANGES.MD

Need to time this if we do indeed release a 3.0.1 patch or if we're going straight to a 3.1.0 release as our next release.

Copy link
Collaborator

@m4gr3d m4gr3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@BastiaanOlij
Copy link
Member Author

@m4gr3d shall we go ahead and merge this? I'm assuming the simulator failure can be ignored?

@dsnopek
Copy link
Collaborator

dsnopek commented Sep 3, 2024

I'm assuming the simulator failure can be ignored?

I just reran the tests and they are passing! The old logs appear to be gone, so I'm not sure what they were failing on before - it could have been the issue with Meta's NPM server? In any case, seems to be fine now.

@The-Cyber-Captain
Copy link
Contributor

Yep, I checked the NPM server when the first errors were logged here and it (the server) was failing on every http request... but don't know enough about the (our?) build process to feel I could confirm or add anything useful at the time. Checked again this morning when Bas updated and it was fine (though up to v68 of the simulator as latest now, which I originally thought might have been a contributing factor. Evidently not, though).

Good spot, and fix, guys. (y)

@m4gr3d m4gr3d merged commit b38201a into GodotVR:master Sep 13, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants