/// <summary> /// Returns information about the current HMD. /// /// ovr_Initialize must be called prior to calling this function, /// otherwise ovrHmdDesc::Type will be set to ovrHmd_None without /// checking for the HMD presence. /// </summary> /// <param name="sessionPtr"> /// Specifies an ovrSession previously returned by ovr_Create() or NULL. /// </param> /// <returns> /// Returns an ovrHmdDesc. If invoked with NULL session argument, ovrHmdDesc::Type /// set to ovrHmd_None indicates that the HMD is not connected. /// </returns> public static HmdDesc GetHmdDesc(IntPtr sessionPtr) { HmdDesc hmdDesc; if (Environment.Is64BitProcess) { HmdDesc64 hmdDesc64; OculusNative64.ovr_GetHmdDesc64(out hmdDesc64, sessionPtr); hmdDesc = new HmdDesc(hmdDesc64); } else { OculusNative32.ovr_GetHmdDesc32(out hmdDesc, sessionPtr); } return(hmdDesc); }
internal static extern void ovr_GetHmdDesc32(out HmdDesc result, IntPtr sessionPtr);