Refactor xr::handle

This commit is contained in:
Patrick Nicolas
2024-06-16 12:07:38 +02:00
parent a7e8b281d3
commit 03c12a9aaf
18 changed files with 98 additions and 151 deletions
+14
View File
@@ -19,6 +19,20 @@
#include "hand_tracker.h"
static PFN_xrDestroyHandTrackerEXT xrDestroyHandTrackerEXT{};
XrResult xr::destroy_hand_tracker(XrHandTrackerEXT id)
{
return xrDestroyHandTrackerEXT(id);
}
xr::hand_tracker::hand_tracker(instance & inst, XrHandTrackerEXT h)
{
id = h;
xrLocateHandJointsEXT = inst.get_proc<PFN_xrLocateHandJointsEXT>("xrLocateHandJointsEXT");
xrDestroyHandTrackerEXT = inst.get_proc<PFN_xrDestroyHandTrackerEXT>("xrDestroyHandTrackerEXT");
}
std::optional<std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT>> xr::hand_tracker::locate(XrSpace space, XrTime time)
{
if (!id || !xrLocateHandJointsEXT)