GodotVR / godot_openxr_vendors

Godot 4 wrapper for OpenXR vendors loaders and extensions
MIT License
82 stars 17 forks source link

Finish filling in all of the API docs #165

Closed dsnopek closed 2 weeks ago

dsnopek commented 2 weeks ago

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

dsnopek commented 2 weeks ago

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

Related to that:

Thanks!

devloglogan commented 2 weeks ago

@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!

dsnopek commented 2 weeks ago

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:

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 :-)

devloglogan commented 2 weeks ago

@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.