OpenXR: Allow GDExtensions to provide multiple, ordered composition layers #89460
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In PR #87630, we added an API that allows GDExtensions to provide an OpenXR composition layer, so that we could move passthrough support to GDExtension. This API will be new for Godot 4.3.
I've started looking at advancing the work on OpenXR composition layers that @BastiaanOlij started in PR #76877, and this has made me realize that the API we added is too limited: namely, it only allows us to provide a single composition layer, and we can't control the order of the layers. (Godot itself is less limited, because a single extension wrapper can make multiple
OpenXRCompositionLayerProvider
s, but we didn't expose this to GDExtension in a way that would allow it.)So, even if we don't finish the other work on OpenXR composition layers for Godot 4.3, since the API is new in Godot 4.3, I'd like to fix this before we have to worry about backwards compatibility.
That's why I've split this out into it's own PR!
I've tested that this works with passthrough, together with PR GodotVR/godot_openxr_vendors#109
Please let me know what you think :-)