Skip to content

OpenXR: Use GLTFDocument function to get supported extension names#109630

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
aaronfranke:openxr-gltf-doc-ext
Aug 21, 2025
Merged

OpenXR: Use GLTFDocument function to get supported extension names#109630
Repiteo merged 1 commit intogodotengine:masterfrom
aaronfranke:openxr-gltf-doc-ext

Conversation

@aaronfranke
Copy link
Member

I came across this code added in PR #107388 with a redundant list of extensions, and this comment:

// Now find anything we support through plugins, which is a bit of a pain as they are converted to Strings
// and we need to convert them back.

It's actually not a pain, GLTFDocument has function exactly for this purpose. In fact, this function was actually requested for this purpose but forgotten about. So, this PR uses it. The only complexity still in the OpenXR code is to convert Godot's HashSet<String> to a Vector<const char *> to pass to OpenXR, and the logic has been updated to only resize the arrays once, avoiding dynamic memory allocation.

@aaronfranke aaronfranke added this to the 4.6 milestone Aug 15, 2025
@aaronfranke aaronfranke requested a review from a team as a code owner August 15, 2025 06:55
@fire fire requested a review from a team August 15, 2025 14:17
Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

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

Thanks!

I just tested this with SteamVR (which supports this OpenXR render models extension) with the openxr_render_models demo and it worked fine!

Since this feature was added for Godot 4.5, I feel like fixing this issue for release with 4.5 could make sense, so I'm going to change the milestone. But if other folks disagree, we can switch it back to 4.6

@dsnopek dsnopek added bug and removed enhancement labels Aug 20, 2025
@dsnopek dsnopek modified the milestones: 4.6, 4.5 Aug 20, 2025
@Repiteo Repiteo merged commit d5ad055 into godotengine:master Aug 21, 2025
39 of 40 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Aug 21, 2025

Thanks!

@aaronfranke aaronfranke deleted the openxr-gltf-doc-ext branch August 21, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants