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:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user