using System;
using System.Runtime.InteropServices;

internal static class OVRPlugin
{
	public static Version version
	{
		get
		{
			if (OVRPlugin._version == null)
			{
				try
				{
					string text = OVRPlugin.OVRP_1_1_0.ovrp_GetVersion();
					if (text != null)
					{
						text = text.Split(new char[]
						{
							'-'
						})[0];
						OVRPlugin._version = new Version(text);
					}
					else
					{
						OVRPlugin._version = OVRPlugin._versionZero;
					}
				}
				catch
				{
					OVRPlugin._version = OVRPlugin._versionZero;
				}
				if (OVRPlugin._version == OVRPlugin.OVRP_0_5_0.version)
				{
					OVRPlugin._version = OVRPlugin.OVRP_0_1_0.version;
				}
				if (OVRPlugin._version > OVRPlugin._versionZero && OVRPlugin._version < OVRPlugin.OVRP_1_3_0.version)
				{
					throw new PlatformNotSupportedException(string.Concat(new object[]
					{
						"Oculus Utilities version ",
						OVRPlugin.wrapperVersion,
						" is too new for OVRPlugin version ",
						OVRPlugin._version.ToString(),
						". Update to the latest version of Unity."
					}));
				}
			}
			return OVRPlugin._version;
		}
	}

	public static Version nativeSDKVersion
	{
		get
		{
			if (OVRPlugin._nativeSDKVersion == null)
			{
				try
				{
					string text = string.Empty;
					if (OVRPlugin.version >= OVRPlugin.OVRP_1_1_0.version)
					{
						text = OVRPlugin.OVRP_1_1_0.ovrp_GetNativeSDKVersion();
					}
					else
					{
						text = OVRPlugin._versionZero.ToString();
					}
					if (text != null)
					{
						text = text.Split(new char[]
						{
							'-'
						})[0];
						OVRPlugin._nativeSDKVersion = new Version(text);
					}
					else
					{
						OVRPlugin._nativeSDKVersion = OVRPlugin._versionZero;
					}
				}
				catch
				{
					OVRPlugin._nativeSDKVersion = OVRPlugin._versionZero;
				}
			}
			return OVRPlugin._nativeSDKVersion;
		}
	}

	public static bool initialized
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetInitialized() == OVRPlugin.Bool.True;
		}
	}

	public static bool chromatic
	{
		get
		{
			return !(OVRPlugin.version >= OVRPlugin.OVRP_1_7_0.version) || OVRPlugin.OVRP_1_7_0.ovrp_GetAppChromaticCorrection() == OVRPlugin.Bool.True;
		}
		set
		{
			if (OVRPlugin.version >= OVRPlugin.OVRP_1_7_0.version)
			{
				OVRPlugin.OVRP_1_7_0.ovrp_SetAppChromaticCorrection(OVRPlugin.ToBool(value));
			}
		}
	}

	public static bool monoscopic
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetAppMonoscopic() == OVRPlugin.Bool.True;
		}
		set
		{
			OVRPlugin.OVRP_1_1_0.ovrp_SetAppMonoscopic(OVRPlugin.ToBool(value));
		}
	}

	public static bool rotation
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetTrackingOrientationEnabled() == OVRPlugin.Bool.True;
		}
		set
		{
			OVRPlugin.OVRP_1_1_0.ovrp_SetTrackingOrientationEnabled(OVRPlugin.ToBool(value));
		}
	}

	public static bool position
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetTrackingPositionEnabled() == OVRPlugin.Bool.True;
		}
		set
		{
			OVRPlugin.OVRP_1_1_0.ovrp_SetTrackingPositionEnabled(OVRPlugin.ToBool(value));
		}
	}

	public static bool useIPDInPositionTracking
	{
		get
		{
			return !(OVRPlugin.version >= OVRPlugin.OVRP_1_6_0.version) || OVRPlugin.OVRP_1_6_0.ovrp_GetTrackingIPDEnabled() == OVRPlugin.Bool.True;
		}
		set
		{
			if (OVRPlugin.version >= OVRPlugin.OVRP_1_6_0.version)
			{
				OVRPlugin.OVRP_1_6_0.ovrp_SetTrackingIPDEnabled(OVRPlugin.ToBool(value));
			}
		}
	}

	public static bool positionSupported
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetTrackingPositionSupported() == OVRPlugin.Bool.True;
		}
	}

	public static bool positionTracked
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetNodePositionTracked(OVRPlugin.Node.EyeCenter) == OVRPlugin.Bool.True;
		}
	}

	public static bool powerSaving
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetSystemPowerSavingMode() == OVRPlugin.Bool.True;
		}
	}

	public static bool hmdPresent
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetNodePresent(OVRPlugin.Node.EyeCenter) == OVRPlugin.Bool.True;
		}
	}

	public static bool userPresent
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetUserPresent() == OVRPlugin.Bool.True;
		}
	}

	public static bool headphonesPresent
	{
		get
		{
			return OVRPlugin.OVRP_1_3_0.ovrp_GetSystemHeadphonesPresent() == OVRPlugin.Bool.True;
		}
	}

	public static int recommendedMSAALevel
	{
		get
		{
			if (OVRPlugin.version >= OVRPlugin.OVRP_1_6_0.version)
			{
				return OVRPlugin.OVRP_1_6_0.ovrp_GetSystemRecommendedMSAALevel();
			}
			return 2;
		}
	}

	public static OVRPlugin.SystemRegion systemRegion
	{
		get
		{
			if (OVRPlugin.version >= OVRPlugin.OVRP_1_5_0.version)
			{
				return OVRPlugin.OVRP_1_5_0.ovrp_GetSystemRegion();
			}
			return OVRPlugin.SystemRegion.Unspecified;
		}
	}

	public static string audioOutId
	{
		get
		{
			try
			{
				IntPtr intPtr = OVRPlugin.OVRP_1_1_0.ovrp_GetAudioOutId();
				if (intPtr != IntPtr.Zero)
				{
					OVRPlugin.GUID guid = (OVRPlugin.GUID)Marshal.PtrToStructure(intPtr, typeof(OVRPlugin.GUID));
					Guid guid2 = new Guid(guid.a, guid.b, guid.c, guid.d0, guid.d1, guid.d2, guid.d3, guid.d4, guid.d5, guid.d6, guid.d7);
					if (guid2 != OVRPlugin._cachedAudioOutGuid)
					{
						OVRPlugin._cachedAudioOutGuid = guid2;
						OVRPlugin._cachedAudioOutString = OVRPlugin._cachedAudioOutGuid.ToString();
					}
					return OVRPlugin._cachedAudioOutString;
				}
			}
			catch
			{
			}
			return string.Empty;
		}
	}

	public static string audioInId
	{
		get
		{
			try
			{
				IntPtr intPtr = OVRPlugin.OVRP_1_1_0.ovrp_GetAudioInId();
				if (intPtr != IntPtr.Zero)
				{
					OVRPlugin.GUID guid = (OVRPlugin.GUID)Marshal.PtrToStructure(intPtr, typeof(OVRPlugin.GUID));
					Guid guid2 = new Guid(guid.a, guid.b, guid.c, guid.d0, guid.d1, guid.d2, guid.d3, guid.d4, guid.d5, guid.d6, guid.d7);
					if (guid2 != OVRPlugin._cachedAudioInGuid)
					{
						OVRPlugin._cachedAudioInGuid = guid2;
						OVRPlugin._cachedAudioInString = OVRPlugin._cachedAudioInGuid.ToString();
					}
					return OVRPlugin._cachedAudioInString;
				}
			}
			catch
			{
			}
			return string.Empty;
		}
	}

	public static bool hasVrFocus
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetAppHasVrFocus() == OVRPlugin.Bool.True;
		}
	}

	public static bool shouldQuit
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetAppShouldQuit() == OVRPlugin.Bool.True;
		}
	}

	public static bool shouldRecenter
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetAppShouldRecenter() == OVRPlugin.Bool.True;
		}
	}

	public static string productName
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetSystemProductName();
		}
	}

	public static string latency
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetAppLatencyTimings();
		}
	}

	public static float eyeDepth
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetUserEyeDepth();
		}
		set
		{
			OVRPlugin.OVRP_1_1_0.ovrp_SetUserEyeDepth(value);
		}
	}

	public static float eyeHeight
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetUserEyeHeight();
		}
		set
		{
			OVRPlugin.OVRP_1_1_0.ovrp_SetUserEyeHeight(value);
		}
	}

	public static float batteryLevel
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetSystemBatteryLevel();
		}
	}

	public static float batteryTemperature
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetSystemBatteryTemperature();
		}
	}

	public static int cpuLevel
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetSystemCpuLevel();
		}
		set
		{
			OVRPlugin.OVRP_1_1_0.ovrp_SetSystemCpuLevel(value);
		}
	}

	public static int gpuLevel
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetSystemGpuLevel();
		}
		set
		{
			OVRPlugin.OVRP_1_1_0.ovrp_SetSystemGpuLevel(value);
		}
	}

	public static int vsyncCount
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetSystemVSyncCount();
		}
		set
		{
			OVRPlugin.OVRP_1_2_0.ovrp_SetSystemVSyncCount(value);
		}
	}

	public static float systemVolume
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetSystemVolume();
		}
	}

	public static float ipd
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetUserIPD();
		}
		set
		{
			OVRPlugin.OVRP_1_1_0.ovrp_SetUserIPD(value);
		}
	}

	public static bool occlusionMesh
	{
		get
		{
			return OVRPlugin.OVRP_1_3_0.ovrp_GetEyeOcclusionMeshEnabled() == OVRPlugin.Bool.True;
		}
		set
		{
			OVRPlugin.OVRP_1_3_0.ovrp_SetEyeOcclusionMeshEnabled(OVRPlugin.ToBool(value));
		}
	}

	public static OVRPlugin.BatteryStatus batteryStatus
	{
		get
		{
			return OVRPlugin.OVRP_1_1_0.ovrp_GetSystemBatteryStatus();
		}
	}

	public static OVRPlugin.Posef GetEyeVelocity(OVRPlugin.Eye eyeId)
	{
		return OVRPlugin.GetNodeVelocity((OVRPlugin.Node)eyeId, false);
	}

	public static OVRPlugin.Posef GetEyeAcceleration(OVRPlugin.Eye eyeId)
	{
		return OVRPlugin.GetNodeAcceleration((OVRPlugin.Node)eyeId, false);
	}

	public static OVRPlugin.Frustumf GetEyeFrustum(OVRPlugin.Eye eyeId)
	{
		return OVRPlugin.OVRP_1_1_0.ovrp_GetNodeFrustum((OVRPlugin.Node)eyeId);
	}

	public static OVRPlugin.Sizei GetEyeTextureSize(OVRPlugin.Eye eyeId)
	{
		return OVRPlugin.OVRP_0_1_0.ovrp_GetEyeTextureSize(eyeId);
	}

	public static OVRPlugin.Posef GetTrackerPose(OVRPlugin.Tracker trackerId)
	{
		return OVRPlugin.GetNodePose((OVRPlugin.Node)(trackerId + 5), false);
	}

	public static OVRPlugin.Frustumf GetTrackerFrustum(OVRPlugin.Tracker trackerId)
	{
		return OVRPlugin.OVRP_1_1_0.ovrp_GetNodeFrustum((OVRPlugin.Node)(trackerId + 5));
	}

	public static bool ShowUI(OVRPlugin.PlatformUI ui)
	{
		return OVRPlugin.OVRP_1_1_0.ovrp_ShowSystemUI(ui) == OVRPlugin.Bool.True;
	}

	public static bool SetOverlayQuad(bool onTop, bool headLocked, IntPtr leftTexture, IntPtr rightTexture, IntPtr device, OVRPlugin.Posef pose, OVRPlugin.Vector3f scale, int layerIndex = 0, OVRPlugin.OverlayShape shape = OVRPlugin.OverlayShape.Quad)
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_6_0.version)
		{
			uint num = 0u;
			if (onTop)
			{
				num |= 1u;
			}
			if (headLocked)
			{
				num |= 2u;
			}
			if (shape == OVRPlugin.OverlayShape.Cylinder || shape == OVRPlugin.OverlayShape.Cubemap)
			{
				if (shape != OVRPlugin.OverlayShape.Cubemap || !(OVRPlugin.version >= OVRPlugin.OVRP_1_10_0.version))
				{
					return false;
				}
				num |= (uint)((uint)shape << 4);
			}
			return OVRPlugin.OVRP_1_6_0.ovrp_SetOverlayQuad3(num, leftTexture, rightTexture, device, pose, scale, layerIndex) == OVRPlugin.Bool.True;
		}
		return layerIndex == 0 && OVRPlugin.OVRP_0_1_1.ovrp_SetOverlayQuad2(OVRPlugin.ToBool(onTop), OVRPlugin.ToBool(headLocked), leftTexture, device, pose, scale) == OVRPlugin.Bool.True;
	}

	public static bool UpdateNodePhysicsPoses(int frameIndex, double predictionSeconds)
	{
		return OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version && OVRPlugin.OVRP_1_8_0.ovrp_Update2(0, frameIndex, predictionSeconds) == OVRPlugin.Bool.True;
	}

	public static OVRPlugin.Posef GetNodePose(OVRPlugin.Node nodeId, bool usePhysicsPose)
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version && usePhysicsPose)
		{
			return OVRPlugin.OVRP_1_8_0.ovrp_GetNodePose2(0, nodeId);
		}
		return OVRPlugin.OVRP_0_1_2.ovrp_GetNodePose(nodeId);
	}

	public static OVRPlugin.Posef GetNodeVelocity(OVRPlugin.Node nodeId, bool usePhysicsPose)
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version && usePhysicsPose)
		{
			return OVRPlugin.OVRP_1_8_0.ovrp_GetNodeVelocity2(0, nodeId);
		}
		return OVRPlugin.OVRP_0_1_3.ovrp_GetNodeVelocity(nodeId);
	}

	public static OVRPlugin.Posef GetNodeAcceleration(OVRPlugin.Node nodeId, bool usePhysicsPose)
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version && usePhysicsPose)
		{
			return OVRPlugin.OVRP_1_8_0.ovrp_GetNodeAcceleration2(0, nodeId);
		}
		return OVRPlugin.OVRP_0_1_3.ovrp_GetNodeAcceleration(nodeId);
	}

	public static bool GetNodePresent(OVRPlugin.Node nodeId)
	{
		return OVRPlugin.OVRP_1_1_0.ovrp_GetNodePresent(nodeId) == OVRPlugin.Bool.True;
	}

	public static bool GetNodeOrientationTracked(OVRPlugin.Node nodeId)
	{
		return OVRPlugin.OVRP_1_1_0.ovrp_GetNodeOrientationTracked(nodeId) == OVRPlugin.Bool.True;
	}

	public static bool GetNodePositionTracked(OVRPlugin.Node nodeId)
	{
		return OVRPlugin.OVRP_1_1_0.ovrp_GetNodePositionTracked(nodeId) == OVRPlugin.Bool.True;
	}

	public static OVRPlugin.ControllerState GetControllerState(uint controllerMask)
	{
		return OVRPlugin.OVRP_1_1_0.ovrp_GetControllerState(controllerMask);
	}

	public static bool SetControllerVibration(uint controllerMask, float frequency, float amplitude)
	{
		return OVRPlugin.OVRP_0_1_2.ovrp_SetControllerVibration(controllerMask, frequency, amplitude) == OVRPlugin.Bool.True;
	}

	public static OVRPlugin.HapticsDesc GetControllerHapticsDesc(uint controllerMask)
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_6_0.version)
		{
			return OVRPlugin.OVRP_1_6_0.ovrp_GetControllerHapticsDesc(controllerMask);
		}
		return default(OVRPlugin.HapticsDesc);
	}

	public static OVRPlugin.HapticsState GetControllerHapticsState(uint controllerMask)
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_6_0.version)
		{
			return OVRPlugin.OVRP_1_6_0.ovrp_GetControllerHapticsState(controllerMask);
		}
		return default(OVRPlugin.HapticsState);
	}

	public static bool SetControllerHaptics(uint controllerMask, OVRPlugin.HapticsBuffer hapticsBuffer)
	{
		return OVRPlugin.version >= OVRPlugin.OVRP_1_6_0.version && OVRPlugin.OVRP_1_6_0.ovrp_SetControllerHaptics(controllerMask, hapticsBuffer) == OVRPlugin.Bool.True;
	}

	public static float GetEyeRecommendedResolutionScale()
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_6_0.version)
		{
			return OVRPlugin.OVRP_1_6_0.ovrp_GetEyeRecommendedResolutionScale();
		}
		return 1f;
	}

	public static float GetAppCpuStartToGpuEndTime()
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_6_0.version)
		{
			return OVRPlugin.OVRP_1_6_0.ovrp_GetAppCpuStartToGpuEndTime();
		}
		return 0f;
	}

	public static bool GetBoundaryConfigured()
	{
		return OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version && OVRPlugin.OVRP_1_8_0.ovrp_GetBoundaryConfigured() == OVRPlugin.Bool.True;
	}

	public static OVRPlugin.BoundaryTestResult TestBoundaryNode(OVRPlugin.Node nodeId, OVRPlugin.BoundaryType boundaryType)
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version)
		{
			return OVRPlugin.OVRP_1_8_0.ovrp_TestBoundaryNode(nodeId, boundaryType);
		}
		return default(OVRPlugin.BoundaryTestResult);
	}

	public static OVRPlugin.BoundaryTestResult TestBoundaryPoint(OVRPlugin.Vector3f point, OVRPlugin.BoundaryType boundaryType)
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version)
		{
			return OVRPlugin.OVRP_1_8_0.ovrp_TestBoundaryPoint(point, boundaryType);
		}
		return default(OVRPlugin.BoundaryTestResult);
	}

	public static bool SetBoundaryLookAndFeel(OVRPlugin.BoundaryLookAndFeel lookAndFeel)
	{
		return OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version && OVRPlugin.OVRP_1_8_0.ovrp_SetBoundaryLookAndFeel(lookAndFeel) == OVRPlugin.Bool.True;
	}

	public static bool ResetBoundaryLookAndFeel()
	{
		return OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version && OVRPlugin.OVRP_1_8_0.ovrp_ResetBoundaryLookAndFeel() == OVRPlugin.Bool.True;
	}

	public static OVRPlugin.BoundaryGeometry GetBoundaryGeometry(OVRPlugin.BoundaryType boundaryType)
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version)
		{
			return OVRPlugin.OVRP_1_8_0.ovrp_GetBoundaryGeometry(boundaryType);
		}
		return default(OVRPlugin.BoundaryGeometry);
	}

	public static bool GetBoundaryGeometry2(OVRPlugin.BoundaryType boundaryType, IntPtr points, ref int pointsCount)
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_9_0.version)
		{
			return OVRPlugin.OVRP_1_9_0.ovrp_GetBoundaryGeometry2(boundaryType, points, ref pointsCount) == OVRPlugin.Bool.True;
		}
		pointsCount = 0;
		return false;
	}

	public static OVRPlugin.AppPerfStats GetAppPerfStats()
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_9_0.version)
		{
			return OVRPlugin.OVRP_1_9_0.ovrp_GetAppPerfStats();
		}
		return default(OVRPlugin.AppPerfStats);
	}

	public static bool ResetAppPerfStats()
	{
		return OVRPlugin.version >= OVRPlugin.OVRP_1_9_0.version && OVRPlugin.OVRP_1_9_0.ovrp_ResetAppPerfStats() == OVRPlugin.Bool.True;
	}

	public static OVRPlugin.Vector3f GetBoundaryDimensions(OVRPlugin.BoundaryType boundaryType)
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version)
		{
			return OVRPlugin.OVRP_1_8_0.ovrp_GetBoundaryDimensions(boundaryType);
		}
		return default(OVRPlugin.Vector3f);
	}

	public static bool GetBoundaryVisible()
	{
		return OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version && OVRPlugin.OVRP_1_8_0.ovrp_GetBoundaryVisible() == OVRPlugin.Bool.True;
	}

	public static bool SetBoundaryVisible(bool value)
	{
		return OVRPlugin.version >= OVRPlugin.OVRP_1_8_0.version && OVRPlugin.OVRP_1_8_0.ovrp_SetBoundaryVisible(OVRPlugin.ToBool(value)) == OVRPlugin.Bool.True;
	}

	public static OVRPlugin.SystemHeadset GetSystemHeadsetType()
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_9_0.version)
		{
			return OVRPlugin.OVRP_1_9_0.ovrp_GetSystemHeadsetType();
		}
		return OVRPlugin.SystemHeadset.None;
	}

	public static OVRPlugin.Controller GetActiveController()
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_9_0.version)
		{
			return OVRPlugin.OVRP_1_9_0.ovrp_GetActiveController();
		}
		return OVRPlugin.Controller.None;
	}

	public static OVRPlugin.Controller GetConnectedControllers()
	{
		if (OVRPlugin.version >= OVRPlugin.OVRP_1_9_0.version)
		{
			return OVRPlugin.OVRP_1_9_0.ovrp_GetConnectedControllers();
		}
		return OVRPlugin.Controller.None;
	}

	private static OVRPlugin.Bool ToBool(bool b)
	{
		return (!b) ? OVRPlugin.Bool.False : OVRPlugin.Bool.True;
	}

	public static OVRPlugin.TrackingOrigin GetTrackingOriginType()
	{
		return OVRPlugin.OVRP_1_0_0.ovrp_GetTrackingOriginType();
	}

	public static bool SetTrackingOriginType(OVRPlugin.TrackingOrigin originType)
	{
		return OVRPlugin.OVRP_1_0_0.ovrp_SetTrackingOriginType(originType) == OVRPlugin.Bool.True;
	}

	public static OVRPlugin.Posef GetTrackingCalibratedOrigin()
	{
		return OVRPlugin.OVRP_1_0_0.ovrp_GetTrackingCalibratedOrigin();
	}

	public static bool SetTrackingCalibratedOrigin()
	{
		return OVRPlugin.OVRP_1_2_0.ovrpi_SetTrackingCalibratedOrigin() == OVRPlugin.Bool.True;
	}

	public static bool RecenterTrackingOrigin(OVRPlugin.RecenterFlags flags)
	{
		return OVRPlugin.OVRP_1_0_0.ovrp_RecenterTrackingOrigin((uint)flags) == OVRPlugin.Bool.True;
	}

	internal static bool ignoreVrFocus
	{
		set
		{
			OVRPlugin.OVRP_1_2_1.ovrp_SetAppIgnoreVrFocus(OVRPlugin.ToBool(value));
		}
	}

	public static readonly Version wrapperVersion = OVRPlugin.OVRP_1_10_0.version;

	private static Version _version;

	private static Version _nativeSDKVersion;

	private const int OverlayShapeFlagShift = 4;

	public const int AppPerfFrameStatsMaxCount = 5;

	private static Guid _cachedAudioOutGuid;

	private static string _cachedAudioOutString;

	private static Guid _cachedAudioInGuid;

	private static string _cachedAudioInString;

	private const string pluginName = "OVRPlugin";

	private static Version _versionZero = new Version(0, 0, 0);

	private struct GUID
	{
		public int a;

		public short b;

		public short c;

		public byte d0;

		public byte d1;

		public byte d2;

		public byte d3;

		public byte d4;

		public byte d5;

		public byte d6;

		public byte d7;
	}

	public enum Bool
	{
		False,
		True
	}

	public enum Eye
	{
		None = -1,
		Left,
		Right,
		Count
	}

	public enum Tracker
	{
		None = -1,
		Zero,
		One,
		Two,
		Three,
		Count
	}

	public enum Node
	{
		None = -1,
		EyeLeft,
		EyeRight,
		EyeCenter,
		HandLeft,
		HandRight,
		TrackerZero,
		TrackerOne,
		TrackerTwo,
		TrackerThree,
		Head,
		Count
	}

	public enum Controller
	{
		None,
		LTouch,
		RTouch,
		Touch,
		Remote,
		Gamepad = 16,
		Touchpad = 134217728,
		Active = -2147483648,
		All = -1
	}

	public enum TrackingOrigin
	{
		EyeLevel,
		FloorLevel,
		Count
	}

	public enum RecenterFlags
	{
		Default,
		IgnoreAll = -2147483648,
		Count
	}

	public enum BatteryStatus
	{
		Charging,
		Discharging,
		Full,
		NotCharging,
		Unknown
	}

	public enum PlatformUI
	{
		None = -1,
		GlobalMenu,
		ConfirmQuit,
		GlobalMenuTutorial
	}

	public enum SystemRegion
	{
		Unspecified,
		Japan,
		China
	}

	public enum SystemHeadset
	{
		None,
		GearVR_R320,
		GearVR_R321,
		GearVR_R322,
		GearVR_R323,
		Rift_DK1 = 4096,
		Rift_DK2,
		Rift_CV1
	}

	public enum OverlayShape
	{
		Quad,
		Cylinder,
		Cubemap
	}

	private enum OverlayFlag
	{
		None,
		OnTop,
		HeadLocked,
		ShapeFlag_Quad = 0,
		ShapeFlag_Cylinder = 16,
		ShapeFlag_Cubemap = 32,
		ShapeFlagRangeMask = 240
	}

	public struct Vector2i
	{
		public int x;

		public int y;
	}

	public struct Vector2f
	{
		public float x;

		public float y;
	}

	public struct Vector3f
	{
		public float x;

		public float y;

		public float z;
	}

	public struct Quatf
	{
		public float x;

		public float y;

		public float z;

		public float w;
	}

	public struct Posef
	{
		public OVRPlugin.Quatf Orientation;

		public OVRPlugin.Vector3f Position;
	}

	public struct ControllerState
	{
		public uint ConnectedControllers;

		public uint Buttons;

		public uint Touches;

		public uint NearTouches;

		public float LIndexTrigger;

		public float RIndexTrigger;

		public float LHandTrigger;

		public float RHandTrigger;

		public OVRPlugin.Vector2f LThumbstick;

		public OVRPlugin.Vector2f RThumbstick;
	}

	public struct HapticsBuffer
	{
		public IntPtr Samples;

		public int SamplesCount;
	}

	public struct HapticsState
	{
		public int SamplesAvailable;

		public int SamplesQueued;
	}

	public struct HapticsDesc
	{
		public int SampleRateHz;

		public int SampleSizeInBytes;

		public int MinimumSafeSamplesQueued;

		public int MinimumBufferSamplesCount;

		public int OptimalBufferSamplesCount;

		public int MaximumBufferSamplesCount;
	}

	public struct AppPerfFrameStats
	{
		public int HmdVsyncIndex;

		public int AppFrameIndex;

		public int AppDroppedFrameCount;

		public float AppMotionToPhotonLatency;

		public float AppQueueAheadTime;

		public float AppCpuElapsedTime;

		public float AppGpuElapsedTime;

		public int CompositorFrameIndex;

		public int CompositorDroppedFrameCount;

		public float CompositorLatency;

		public float CompositorCpuElapsedTime;

		public float CompositorGpuElapsedTime;

		public float CompositorCpuStartToGpuEndElapsedTime;

		public float CompositorGpuEndToVsyncElapsedTime;
	}

	public struct AppPerfStats
	{
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
		public OVRPlugin.AppPerfFrameStats[] FrameStats;

		public int FrameStatsCount;

		public OVRPlugin.Bool AnyFrameStatsDropped;

		public float AdaptiveGpuPerformanceScale;
	}

	public struct Sizei
	{
		public int w;

		public int h;
	}

	public struct Frustumf
	{
		public float zNear;

		public float zFar;

		public float fovX;

		public float fovY;
	}

	public enum BoundaryType
	{
		OuterBoundary = 1,
		PlayArea = 256
	}

	public struct BoundaryTestResult
	{
		public OVRPlugin.Bool IsTriggering;

		public float ClosestDistance;

		public OVRPlugin.Vector3f ClosestPoint;

		public OVRPlugin.Vector3f ClosestPointNormal;
	}

	public struct BoundaryLookAndFeel
	{
		public OVRPlugin.Colorf Color;
	}

	public struct BoundaryGeometry
	{
		public OVRPlugin.BoundaryType BoundaryType;

		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
		public OVRPlugin.Vector3f[] Points;

		public int PointsCount;
	}

	public struct Colorf
	{
		public float r;

		public float g;

		public float b;

		public float a;
	}

	private static class OVRP_0_1_0
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Sizei ovrp_GetEyeTextureSize(OVRPlugin.Eye eyeId);

		public static readonly Version version = new Version(0, 1, 0);
	}

	private static class OVRP_0_1_1
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetOverlayQuad2(OVRPlugin.Bool onTop, OVRPlugin.Bool headLocked, IntPtr texture, IntPtr device, OVRPlugin.Posef pose, OVRPlugin.Vector3f scale);

		public static readonly Version version = new Version(0, 1, 1);
	}

	private static class OVRP_0_1_2
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Posef ovrp_GetNodePose(OVRPlugin.Node nodeId);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetControllerVibration(uint controllerMask, float frequency, float amplitude);

		public static readonly Version version = new Version(0, 1, 2);
	}

	private static class OVRP_0_1_3
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Posef ovrp_GetNodeVelocity(OVRPlugin.Node nodeId);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Posef ovrp_GetNodeAcceleration(OVRPlugin.Node nodeId);

		public static readonly Version version = new Version(0, 1, 3);
	}

	private static class OVRP_0_5_0
	{
		public static readonly Version version = new Version(0, 5, 0);
	}

	private static class OVRP_1_0_0
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.TrackingOrigin ovrp_GetTrackingOriginType();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetTrackingOriginType(OVRPlugin.TrackingOrigin originType);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Posef ovrp_GetTrackingCalibratedOrigin();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_RecenterTrackingOrigin(uint flags);

		public static readonly Version version = new Version(1, 0, 0);
	}

	private static class OVRP_1_1_0
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetInitialized();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrp_GetVersion")]
		private static extern IntPtr _ovrp_GetVersion();

		public static string ovrp_GetVersion()
		{
			return Marshal.PtrToStringAnsi(OVRPlugin.OVRP_1_1_0._ovrp_GetVersion());
		}

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrp_GetNativeSDKVersion")]
		private static extern IntPtr _ovrp_GetNativeSDKVersion();

		public static string ovrp_GetNativeSDKVersion()
		{
			return Marshal.PtrToStringAnsi(OVRPlugin.OVRP_1_1_0._ovrp_GetNativeSDKVersion());
		}

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr ovrp_GetAudioOutId();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr ovrp_GetAudioInId();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern float ovrp_GetEyeTextureScale();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetEyeTextureScale(float value);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetTrackingOrientationSupported();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetTrackingOrientationEnabled();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetTrackingOrientationEnabled(OVRPlugin.Bool value);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetTrackingPositionSupported();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetTrackingPositionEnabled();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetTrackingPositionEnabled(OVRPlugin.Bool value);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetNodePresent(OVRPlugin.Node nodeId);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetNodeOrientationTracked(OVRPlugin.Node nodeId);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetNodePositionTracked(OVRPlugin.Node nodeId);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Frustumf ovrp_GetNodeFrustum(OVRPlugin.Node nodeId);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.ControllerState ovrp_GetControllerState(uint controllerMask);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern int ovrp_GetSystemCpuLevel();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetSystemCpuLevel(int value);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern int ovrp_GetSystemGpuLevel();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetSystemGpuLevel(int value);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetSystemPowerSavingMode();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern float ovrp_GetSystemDisplayFrequency();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern int ovrp_GetSystemVSyncCount();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern float ovrp_GetSystemVolume();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.BatteryStatus ovrp_GetSystemBatteryStatus();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern float ovrp_GetSystemBatteryLevel();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern float ovrp_GetSystemBatteryTemperature();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrp_GetSystemProductName")]
		private static extern IntPtr _ovrp_GetSystemProductName();

		public static string ovrp_GetSystemProductName()
		{
			return Marshal.PtrToStringAnsi(OVRPlugin.OVRP_1_1_0._ovrp_GetSystemProductName());
		}

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_ShowSystemUI(OVRPlugin.PlatformUI ui);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetAppMonoscopic();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetAppMonoscopic(OVRPlugin.Bool value);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetAppHasVrFocus();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetAppShouldQuit();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetAppShouldRecenter();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrp_GetAppLatencyTimings")]
		private static extern IntPtr _ovrp_GetAppLatencyTimings();

		public static string ovrp_GetAppLatencyTimings()
		{
			return Marshal.PtrToStringAnsi(OVRPlugin.OVRP_1_1_0._ovrp_GetAppLatencyTimings());
		}

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetUserPresent();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern float ovrp_GetUserIPD();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetUserIPD(float value);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern float ovrp_GetUserEyeDepth();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetUserEyeDepth(float value);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern float ovrp_GetUserEyeHeight();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetUserEyeHeight(float value);

		public static readonly Version version = new Version(1, 1, 0);
	}

	private static class OVRP_1_2_0
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetSystemVSyncCount(int vsyncCount);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrpi_SetTrackingCalibratedOrigin();

		public static readonly Version version = new Version(1, 2, 0);
	}

	private static class OVRP_1_2_1
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetAppIgnoreVrFocus(OVRPlugin.Bool value);

		public static readonly Version version = new Version(1, 2, 1);
	}

	private static class OVRP_1_3_0
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetEyeOcclusionMeshEnabled();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetEyeOcclusionMeshEnabled(OVRPlugin.Bool value);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetSystemHeadphonesPresent();

		public static readonly Version version = new Version(1, 3, 0);
	}

	private static class OVRP_1_5_0
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.SystemRegion ovrp_GetSystemRegion();

		public static readonly Version version = new Version(1, 5, 0);
	}

	private static class OVRP_1_6_0
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetTrackingIPDEnabled();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetTrackingIPDEnabled(OVRPlugin.Bool value);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.HapticsDesc ovrp_GetControllerHapticsDesc(uint controllerMask);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.HapticsState ovrp_GetControllerHapticsState(uint controllerMask);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetControllerHaptics(uint controllerMask, OVRPlugin.HapticsBuffer hapticsBuffer);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetOverlayQuad3(uint flags, IntPtr textureLeft, IntPtr textureRight, IntPtr device, OVRPlugin.Posef pose, OVRPlugin.Vector3f scale, int layerIndex);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern float ovrp_GetEyeRecommendedResolutionScale();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern float ovrp_GetAppCpuStartToGpuEndTime();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern int ovrp_GetSystemRecommendedMSAALevel();

		public static readonly Version version = new Version(1, 6, 0);
	}

	private static class OVRP_1_7_0
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetAppChromaticCorrection();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetAppChromaticCorrection(OVRPlugin.Bool value);

		public static readonly Version version = new Version(1, 7, 0);
	}

	private static class OVRP_1_8_0
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetBoundaryConfigured();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.BoundaryTestResult ovrp_TestBoundaryNode(OVRPlugin.Node nodeId, OVRPlugin.BoundaryType boundaryType);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.BoundaryTestResult ovrp_TestBoundaryPoint(OVRPlugin.Vector3f point, OVRPlugin.BoundaryType boundaryType);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetBoundaryLookAndFeel(OVRPlugin.BoundaryLookAndFeel lookAndFeel);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_ResetBoundaryLookAndFeel();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.BoundaryGeometry ovrp_GetBoundaryGeometry(OVRPlugin.BoundaryType boundaryType);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Vector3f ovrp_GetBoundaryDimensions(OVRPlugin.BoundaryType boundaryType);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetBoundaryVisible();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_SetBoundaryVisible(OVRPlugin.Bool value);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_Update2(int stateId, int frameIndex, double predictionSeconds);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Posef ovrp_GetNodePose2(int stateId, OVRPlugin.Node nodeId);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Posef ovrp_GetNodeVelocity2(int stateId, OVRPlugin.Node nodeId);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Posef ovrp_GetNodeAcceleration2(int stateId, OVRPlugin.Node nodeId);

		public static readonly Version version = new Version(1, 8, 0);
	}

	private static class OVRP_1_9_0
	{
		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.SystemHeadset ovrp_GetSystemHeadsetType();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Controller ovrp_GetActiveController();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Controller ovrp_GetConnectedControllers();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_GetBoundaryGeometry2(OVRPlugin.BoundaryType boundaryType, IntPtr points, ref int pointsCount);

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.AppPerfStats ovrp_GetAppPerfStats();

		[DllImport("OVRPlugin", CallingConvention = CallingConvention.Cdecl)]
		public static extern OVRPlugin.Bool ovrp_ResetAppPerfStats();

		public static readonly Version version = new Version(1, 9, 0);
	}

	private static class OVRP_1_10_0
	{
		public static readonly Version version = new Version(1, 10, 0);
	}
}
