Closed dsnopek closed 2 weeks ago
@devloglogan Can you review the docs I added for the extensions that you worked on?
Related to that:
OpenXRFbPassthroughExtensionWrapper::destroy_color_lut()
because I don't think developers are meant to call that directly, but instead just free OpenXRMetaPassthroughColorLut
objects.is_passthrough_supported()
and has_passthrough_capability()
on OpenXRFbPassthrough
. I'm not sure how to explain the difference.Thanks!
@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!
As for the other point, I believe I meant to rename
is_passthrough_supported()
tois_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 enabledhas_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
:
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 :-)
@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.
This PR finishes filling in all the missing API documentation. This will appear both in the editor and in the online documentation.