Add FB hand mesh support with GLB fallback (#934)

Use the XR_FB_HAND_TRACKING_MESH extension to render hand models when supported,
and fall back to the bundled GLB hand models otherwise. This fixes incorrect hand
model rendering on PFDM MR device, Have tested with PFDM MR V4.5.0 version.
This commit is contained in:
EasonZxp
2026-05-26 09:40:37 +02:00
committed by GitHub
parent 18d685976e
commit 6a72c537c2
11 changed files with 451 additions and 4 deletions
+8
View File
@@ -47,6 +47,9 @@ xr::system::system(xr::instance & inst, XrFormFactor formfactor)
if (inst.has_extension(XR_EXT_HAND_TRACKING_EXTENSION_NAME))
hand_tracking_supported_ = hand_tracking_properties().supportsHandTracking;
if (hand_tracking_supported_ and inst.has_extension(XR_FB_HAND_TRACKING_MESH_EXTENSION_NAME))
hand_mesh_fb_supported_ = true;
body_tracker = xr::body_tracker_supported(inst, *this);
face_tracker = xr::face_tracker_supported(inst, *this);
}
@@ -275,6 +278,11 @@ bool xr::system::hand_tracking_supported() const
return hand_tracking_supported_;
}
bool xr::system::hand_mesh_fb_supported() const
{
return hand_mesh_fb_supported_;
}
vk::raii::PhysicalDevice xr::system::physical_device(vk::raii::Instance & vulkan) const
{
auto xrGetVulkanGraphicsDevice2KHR =