07-02-2020 10:40 AM
07-23-2020 12:16 PM
07-23-2020 02:21 PM
07-24-2020 02:25 PM
07-24-2020 03:18 PM
void OpenXRMgr::Recenter()
{
using namespace OVR;
XrSpaceLocation location = { XR_TYPE_SPACE_LOCATION };
XrResult res;
XR_CHECK(xrLocateSpace(spaceView, spaceLocalRuntime, GetTime(), &location));
XrSpaceLocationFlags valid = XR_VIEW_STATE_ORIENTATION_VALID_BIT | XR_VIEW_STATE_POSITION_VALID_BIT;
if ((location.locationFlags & valid) != valid)
return;
// TODO: This code doesn't work with the Oculus runtime (while the HUD looks correct, the main layer gets the wrong ATW window)
XR_CHECK(xrDestroySpace(spaceLocalCustom));
XrReferenceSpaceCreateInfo createInfo = { XR_TYPE_REFERENCE_SPACE_CREATE_INFO };
createInfo.referenceSpaceType = XR_REFERENCE_SPACE_TYPE_LOCAL;
float yaw;
((const Quatf &)location.pose.orientation).GetYawPitchRoll(&yaw, nullptr, nullptr);
centerPose = Posef(Quatf(Axis_Y, yaw), (const Vector3f &)location.pose.position).Normalized();
createInfo.poseInReferenceSpace = (XrPosef &)centerPose;
XR_CHECK(xrCreateReferenceSpace(session, &createInfo, &spaceLocalCustom));
}
07-29-2020 07:40 AM
07-31-2020 04:26 PM
08-01-2020 02:13 AM
XrInstanceProperties instanceProperties = { XR_TYPE_INSTANCE_PROPERTIES };
XR_CHECK(xrGetInstanceProperties(instance, &instanceProperties));
RVRLogFmt("OpenXR runtime version %u.%u.%u: %s", XR_VERSION_MAJOR(instanceProperties.runtimeVersion),
XR_VERSION_MINOR(instanceProperties.runtimeVersion), XR_VERSION_PATCH(instanceProperties.runtimeVersion),
instanceProperties.runtimeName);
10-19-2020 10:25 AM
11-22-2020 09:54 AM