Upgrade OpenVR;

This commit is contained in:
bjorn 2020-09-29 16:34:44 -06:00
parent 8db2f67b45
commit b139500864
2 changed files with 4 additions and 4 deletions

2
deps/openvr vendored

@ -1 +1 @@
Subproject commit b72abcebff7e6c6c70ce8ac8f6a09b70d44397e2
Subproject commit 0eb70325a4ea3edca2a0ff8aefa631f2529e6eb7

View File

@ -360,7 +360,7 @@ static bool openvr_getPose(Device device, vec3 position, quat orientation) {
if (device == DEVICE_HAND_LEFT || device == DEVICE_HAND_RIGHT) {
InputPoseActionData_t action;
state.input->GetPoseActionData(state.poseActions[device], state.compositor->GetTrackingSpace(), 0.f, &action, sizeof(action), 0);
state.input->GetPoseActionDataForNextFrame(state.poseActions[device], state.compositor->GetTrackingSpace(), &action, sizeof(action), 0);
mat4_fromMat34(transform, action.pose.mDeviceToAbsoluteTracking.m);
transform[13] += state.offset;
mat4_getPosition(transform, position);
@ -378,7 +378,7 @@ static bool openvr_getVelocity(Device device, vec3 velocity, vec3 angularVelocit
if (device == DEVICE_HEAD) {
pose = &state.renderPoses[k_unTrackedDeviceIndex_Hmd];
} else if (device == DEVICE_HAND_LEFT || device == DEVICE_HAND_RIGHT) {
state.input->GetPoseActionData(state.poseActions[device], state.compositor->GetTrackingSpace(), 0.f, &action, sizeof(action), 0);
state.input->GetPoseActionDataForNextFrame(state.poseActions[device], state.compositor->GetTrackingSpace(), &action, sizeof(action), 0);
pose = &action.pose;
} else {
return false;
@ -430,7 +430,7 @@ static bool openvr_getSkeleton(Device device, float* poses) {
// Bone transforms are relative to the hand instead of the origin, so get the hand pose first
InputPoseActionData_t handPose;
state.input->GetPoseActionData(state.poseActions[device], state.compositor->GetTrackingSpace(), 0.f, &handPose, sizeof(handPose), 0);
state.input->GetPoseActionDataForNextFrame(state.poseActions[device], state.compositor->GetTrackingSpace(), &handPose, sizeof(handPose), 0);
if (!handPose.pose.bPoseIsValid) {
return false;
}