passthru FB_face_tracking2

This commit is contained in:
galister
2024-08-19 16:35:26 +02:00
committed by xytovl
parent 7f1289bbb0
commit e6f3ae0113
18 changed files with 478 additions and 10 deletions
+13
View File
@@ -741,6 +741,7 @@ void application::initialize()
opt_extensions.push_back(XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME);
opt_extensions.push_back(XR_FB_PASSTHROUGH_EXTENSION_NAME);
opt_extensions.push_back(XR_HTC_PASSTHROUGH_EXTENSION_NAME);
opt_extensions.push_back(XR_FB_FACE_TRACKING2_EXTENSION_NAME);
for (const auto & i: interaction_profiles)
{
@@ -800,6 +801,13 @@ void application::initialize()
eye_gaze_supported = eye_gaze_properties.supportsEyeGazeInteraction;
}
if (utils::contains(xr_extensions, XR_FB_FACE_TRACKING2_EXTENSION_NAME))
{
XrSystemFaceTrackingProperties2FB fb_face2_properties = xr_system_id.fb_face_tracking2_properties();
spdlog::info(" FB face tracking support: {}", (bool)fb_face2_properties.supportsVisualFaceTracking);
fb_face_tracking2_supported = fb_face2_properties.supportsVisualFaceTracking;
}
switch (xr_system_id.passthrough_supported())
{
case xr::system::passthrough_type::no_passthrough:
@@ -848,6 +856,11 @@ void application::initialize()
right_hand = xr_session.create_hand_tracker(XR_HAND_RIGHT_EXT);
}
if (fb_face_tracking2_supported)
{
fb_face_tracker2 = xr_session.create_fb_face_tracker2();
}
vk::CommandPoolCreateInfo cmdpool_create_info;
cmdpool_create_info.queueFamilyIndex = vk_queue_family_index;
cmdpool_create_info.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer;