Quest and Pico body tracking

* Update OpenXR SDK to 1.1.48
This commit is contained in:
Sapphire
2025-06-08 18:07:23 +02:00
committed by xytovl
parent e29a08ea2e
commit 460fbec06d
28 changed files with 949 additions and 6 deletions
+29 -1
View File
@@ -31,7 +31,7 @@
#include "wifi_lock.h"
#include "xr/actionset.h"
#include "xr/check.h"
#include "xr/pico_eye_types.h"
#include "xr/meta_body_tracking_fidelity.h"
#include "xr/xr.h"
#include <algorithm>
#include <boost/locale.hpp>
@@ -1041,6 +1041,10 @@ void application::initialize()
opt_extensions.push_back(XR_HTC_PASSTHROUGH_EXTENSION_NAME);
opt_extensions.push_back(XR_HTC_FACIAL_TRACKING_EXTENSION_NAME);
opt_extensions.push_back(XR_FB_FACE_TRACKING2_EXTENSION_NAME);
opt_extensions.push_back(XR_FB_BODY_TRACKING_EXTENSION_NAME);
opt_extensions.push_back(XR_META_BODY_TRACKING_FULL_BODY_EXTENSION_NAME);
opt_extensions.push_back(XR_META_BODY_TRACKING_FIDELITY_EXTENSION_NAME);
opt_extensions.push_back(XR_BD_BODY_TRACKING_EXTENSION_NAME);
opt_extensions.push_back(XR_EXT_PALM_POSE_EXTENSION_NAME);
opt_extensions.push_back(XR_KHR_COMPOSITION_LAYER_DEPTH_EXTENSION_NAME);
opt_extensions.push_back(XR_FB_COMPOSITION_LAYER_DEPTH_TEST_EXTENSION_NAME);
@@ -1141,6 +1145,20 @@ void application::initialize()
htc_face_tracking_lip_supported = htc_face_properties.supportLipFacialTracking;
}
if (utils::contains_all(xr_extensions, std::array{XR_FB_BODY_TRACKING_EXTENSION_NAME, XR_META_BODY_TRACKING_FULL_BODY_EXTENSION_NAME, XR_META_BODY_TRACKING_FIDELITY_EXTENSION_NAME}))
{
XrSystemBodyTrackingPropertiesFB fb_body_properties = xr_system_id.fb_body_tracking_properties();
spdlog::info(" FB body tracking support: {}", (bool)fb_body_properties.supportsBodyTracking);
fb_body_tracking_supported = fb_body_properties.supportsBodyTracking;
}
if (utils::contains(xr_extensions, XR_BD_BODY_TRACKING_EXTENSION_NAME))
{
XrSystemBodyTrackingPropertiesBD bd_body_properties = xr_system_id.bd_body_tracking_properties();
spdlog::info(" PICO body tracking support: {}", (bool)bd_body_properties.supportsBodyTracking);
pico_body_tracking_supported = bd_body_properties.supportsBodyTracking;
}
if (utils::contains(xr_extensions, XR_FB_COMPOSITION_LAYER_SETTINGS_EXTENSION_NAME))
{
spdlog::info(" OpenXR post-processing extension support: true");
@@ -1205,6 +1223,16 @@ void application::initialize()
pico_face_tracker = xr_session.create_pico_face_tracker();
}
if (fb_body_tracking_supported)
{
fb_body_tracker = xr_session.create_fb_body_tracker();
}
if (pico_body_tracking_supported)
{
pico_body_tracker = xr_session.create_pico_body_tracker();
}
vk::CommandPoolCreateInfo cmdpool_create_info;
cmdpool_create_info.queueFamilyIndex = vk_queue_family_index;
cmdpool_create_info.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer;