-
Notifications
You must be signed in to change notification settings - Fork 28
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
Move implementation of XR_FB_passthrough
into godot_openxr_vendors
#79
Conversation
Make sure you also add this to the PICO and HTC plugins. I also believe we should add it to the Khronos plugin, other devices may support it in the future and if they use the Khronos plugin, they immediate piggy back on the existing support (though I hope they'll adopt the official spec approach). HTC has their own vendor extension but that is used by the HTC Focus (and I assume Elite, but they probably didn't update the list yet): https://github.khronos.org/OpenXR-Inventory/extension_support.html#XR_HTC_passthrough This is the reason I'm not happy with us creating separate plugins for each device, multiple devices support the same extensions, support can be queried from OpenXR by seeing which extensions are available. |
Regarding extension/plugin organization in the source repo: What if we kept the source for all the extensions that are in the OpenXR spec in the same place in the source code (maybe And for any extensions that aren't in the OpenXR spec, which require special headers from the vendor, can be exclusively in the directory for that vendor? So, |
That is the purpose of the Regarding |
29507c1
to
1703edb
Compare
Whoops! That's just a copy-paste mistake on my part - I started by copying the scene capture extension. :-) Fixed in my latest push. However, in general, So, even that one could theoretically be in the common code because it's in the OpenXR spec now. |
@dsnopek something I just wondered about, at some point Meta may actually implement this the OpenXR way and it will return the alpha blend mode as supported. At that time we probably need to have some check where the passthrough extension is only used as is when OpenXR reports alpha blend mode as not supported? |
1703edb
to
e7cb72d
Compare
In my latest push, I've moved this extension to the "common" directory and added it to the Pico and Khronos plugins (I think the Vive Cosmos uses the Khronos loader?). If we are switching to having all the extensions in "common", we could certainly do more to organize things better, but that could be done all at once in a dedicated PR. Hopefully, this is OK for now?
Ah, that's a great point! I'm out of time today, but tomorrow I'll look at having the extension wrapper check if the the alpha blend mode is supported, and if so, to not do anything. |
e7cb72d
to
eb66f7c
Compare
In my latest push, it'll now check if the runtime really supports I also re-ordered the methods in Anyway, at this point, I think all the review that directly pertains to this PR (as opposed to refactoring for follow-ups) has been addressed, either in a comment or with a code change. So, I'm going to take this out of draft now! |
XR_FB_passthrough
into godot_openxr_vendorsXR_FB_passthrough
into godot_openxr_vendors
common/src/main/cpp/openxr_fb_passthrough_extension_wrapper.cpp
Outdated
Show resolved
Hide resolved
5300f94
to
d18e368
Compare
I just rebased this after PR #83 re-arranged the source code for the single GDExtension implementation. I retested and it's still working for me on Quest 3! The upstream Godot changes have been merged (see PR godotengine/godot#87630), however, this will still fail tests here until we can use an updated |
Not sure I'm happy about that, I know we love to hate the why and how about Reduz' views on this, but I don't think its acceptable to just plug around it. |
I'll find some time next week to also test this on PICO. PICO supposedly supports the blend mode approach and the meta approach, so I might hack a bit to see if it works both ways. Should also verify whether our overrule works correctly. edit oh, and @dsnopek , we need to think of what happens when the vendor plugin is used with 4.2.1. I don't think we can get away with another "oh use this new vendor plugin only from 4.3 forward", especially because we don't have any form of versioning on the asset library. It's confusing enough as it is with the loader and vendor plugin. |
Actually, after a few revisions, the new method that my quoted comment refers to was removed. It's not in the version of the PR that was merged into Godot and no longer relied upon here. This is connected with the consolidation into Anyway, you don't have to worry about this anymore :-)
Awesome, thanks!
There is a sort of way to handle this in the asset library, but it's a pain. If you set the version on an asset to "4.3" it'll only be shown in the editor when using Godot 4.3 and greater. So, you can have two assets, one set to "4.2" and the other set to "4.3", and folks on earlier Godots won't see the newer version. Anyway, we do need to have a special 4.3+ build since this depends on new APIs added in Godot 4.3. If this build is attempted to be used with an older Godot, you'll get an error message about it -- since godot-cpp will compare the version of Godot it was compiled for (from the I think the trickier part is folks who are upgrading a Godot 4.2 project using passthrough to Godot 4.3. Passthrough will suddenly stop working, and they need to upgrade, but they won't get any message about it or anything. |
Now that godotengine/godot#87630 is merged, we should look into updating the
We've typically following the approach used in Godot core and use the |
@dsnopek Can you bump the |
d18e368
to
a6ac084
Compare
Bumped! |
a6ac084
to
f1c9ea6
Compare
4807df4
to
3999ae0
Compare
common/src/main/cpp/extensions/openxr_fb_passthrough_extension_wrapper.cpp
Outdated
Show resolved
Hide resolved
3999ae0
to
3c2744d
Compare
@m4gr3d Rebased! |
@dsnopek Can you update the |
f89e8c1
to
48313d9
Compare
@m4gr3d Done! |
This depends on PR godotengine/godot#87630
Moving
XR_FB_passthrough
into 'godot_openxr_vendors' would allow us to expand the passthrough functionality to include more Meta-specific features, which wouldn't necessarily be accepted into Godot.Note: This will fail CI until the Godot PR is merged, and we start using an
extension_api.json
from Godot master.