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

Finish filling in all of the API docs #165

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Jun 17, 2024

This PR finishes filling in all the missing API documentation. This will appear both in the editor and in the online documentation.

@dsnopek dsnopek added the documentation Improvements or additions to documentation label Jun 17, 2024
@dsnopek dsnopek added this to the 3.0.0 milestone Jun 17, 2024
@dsnopek dsnopek requested a review from devloglogan June 17, 2024 16:32
@dsnopek
Copy link
Collaborator Author

dsnopek commented Jun 17, 2024

@devloglogan Can you review the docs I added for the extensions that you worked on?

Related to that:

  • I unbound OpenXRFbPassthroughExtensionWrapper::destroy_color_lut() because I don't think developers are meant to call that directly, but instead just free OpenXRMetaPassthroughColorLut objects.
  • We have both is_passthrough_supported() and has_passthrough_capability() on OpenXRFbPassthrough. I'm not sure how to explain the difference.

Thanks!

@devloglogan
Copy link
Collaborator

@dsnopek I agree with unbinding OpenXRFbPassthroughExtensionWrapper::destroy_color_lut(). As for the other point, I believe I meant to rename is_passthrough_supported() to is_passthrough_started(), but I never actually removed the first function. So those two functions just do the same thing. So, my vote is to remove the is_passthrough_supported() function. Or we could rename has_passthrough_capability() to is_passthrough_supported(). Whatever is preferable!

@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="OpenXRFbBodyTrackingExtensionWrapper" inherits="OpenXRExtensionWrapperExtension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
<brief_description>
Wraps the [code]XR_FB_body_tracking[/code] extension.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we unregister the singleton for the extension wrapper classes that don't provide any methods?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The singleton isn't being registered, only the class, but that's enough for it to appear in the editor's help docs so we need to provide something here. And, unfortunately, we have to register the class, because unlike in Godot itself, GDExtension classes won't work without being registered.

@dsnopek
Copy link
Collaborator Author

dsnopek commented Jun 18, 2024

As for the other point, I believe I meant to rename is_passthrough_supported() to is_passthrough_started(), but I never actually removed the first function.

We already have an is_passthrough_started() also, but that's something else.

So those two functions just do the same thing.

Well, looking at the code, they don't do exactly the same thing.

Here's what all the methods mentioned here appear to do:

  • is_passthrough_supported(): checks if the XR_FB_passthrough module is enabled
  • has_passthrough_capability(): checks if the XR_PASSTHROUGH_CAPABILITY_BIT_FB is set on XrSystemPassthroughProperties2FB::capabilities
  • is_passthrough_started(): checks if we've been able to successfully execute xrPassthroughStartFB()

Looking at the spec, it seems like not all runtimes that support XR_FB_passthrough will support XrSystemPassthroughProperties2FB:

Selection_165

So, thinking about this a bit more, I think all the has_passthrough_capability() tells us, is if the developer can trust the result of has_color_passthrough_capability() or has_layer_depth_passthrough_capability(). Because, if the XR_PASSTHROUGH_CAPABILITY_BIT_FB wasn't set, then it probably means the runtime doesn't support XrSystemPassthroughProperties2FB because I think it's safe to assume that if the XR_FB_passthrough extension is enabled, that we have support for basic passthrough.

Does that sound right?

I'll update the docs to say that for now :-)

Copy link
Collaborator

@devloglogan devloglogan left a comment

Choose a reason for hiding this comment

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

Just a couple small comments. Thanks for writing these out!

doc_classes/OpenXRFbHandTrackingMesh.xml Outdated Show resolved Hide resolved
doc_classes/OpenXRFbPassthroughGeometry.xml Outdated Show resolved Hide resolved
@devloglogan
Copy link
Collaborator

@dsnopek Ah, I see, had a hasty misread when I looked at the functions in the header file. That makes sense to me. I'm still not a huge fan of the somewhat colliding function names, but maybe there isn't a perfect way around it in this case.

@m4gr3d m4gr3d merged commit a90b6fd into GodotVR:master Jun 18, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants