diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 4679662..551fe23 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -62,7 +62,7 @@ jobs: uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} - branch: master + branch: ${{ github.ref }} build-linux: needs: build-windows @@ -105,4 +105,4 @@ jobs: uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} - branch: master + branch: ${{ github.ref }} diff --git a/Providers/Display/Display.cpp b/Providers/Display/Display.cpp index d30513a..b29b30c 100644 --- a/Providers/Display/Display.cpp +++ b/Providers/Display/Display.cpp @@ -763,9 +763,9 @@ bool OpenVRDisplayProvider::SubmitToCompositor( vr::EVREye eEye, int nStage ) tex.eColorSpace = vr::ColorSpace_Auto; // Check if we have a valid depth buffer - if (m_pNativeDepthTextures[eEye][nStage]) + if (m_pNativeDepthTextures[nStage][nTexIndex]) { - tex.depth.handle = m_pNativeDepthTextures[eEye][nStage]; + tex.depth.handle = m_pNativeDepthTextures[nStage][nTexIndex]; } if ( !m_bIsOverlayApplication ) diff --git a/Providers/Input/Input.cpp b/Providers/Input/Input.cpp index 2817f9d..f9a6421 100644 --- a/Providers/Input/Input.cpp +++ b/Providers/Input/Input.cpp @@ -474,7 +474,7 @@ void OpenVRInputProvider::OpenVRToUnityTracking( const vr::TrackedDevicePose_t & if ( postTransform ) { XRMatrix4x4 &xrTrackingTransformRef = reinterpret_cast< XRMatrix4x4 & >( trackingToReference ); - xrTrackingTransformRef *= reinterpret_cast< XRMatrix4x4 & >( *postTransform ); + xrTrackingTransformRef = reinterpret_cast< XRMatrix4x4 & >( *postTransform ) * xrTrackingTransformRef; } outPosition.x = trackingToReference.columns[3].x; diff --git a/Providers/UserProjectSettings.cpp b/Providers/UserProjectSettings.cpp index 1d36176..2295bdc 100644 --- a/Providers/UserProjectSettings.cpp +++ b/Providers/UserProjectSettings.cpp @@ -493,6 +493,15 @@ SetUserDefinedSettings( UserDefinedSettings settings ) if ( settings.actionManifestPath && strlen( settings.actionManifestPath ) > 1 ) { + #ifdef __linux__ + size_t actionManifestPathLength = strlen( settings.actionManifestPath ); + std::string actionManifestPath = settings.actionManifestPath; + std::replace( actionManifestPath.begin(), actionManifestPath.end(), '\\', '/' ); + char *updatedActionManifestPath = new char[ actionManifestPathLength ]; + std::copy( actionManifestPath.begin(), actionManifestPath.end(), updatedActionManifestPath ); + settings.actionManifestPath = updatedActionManifestPath; + #endif + if ( UserProjectSettings::FileExists( std::string( settings.actionManifestPath ) ) ) { size_t strLen = strlen( settings.actionManifestPath ) + 1; @@ -504,7 +513,12 @@ SetUserDefinedSettings( UserDefinedSettings settings ) { XR_TRACE( "[OpenVR] [path] %s\n", UserProjectSettings::GetCurrentWorkingPath().c_str() ); + #ifndef __linux__ std::string fullPath = UserProjectSettings::GetCurrentWorkingPath() + "\\Assets\\" + settings.actionManifestPath; + #else + std::string fullPath = UserProjectSettings::GetCurrentWorkingPath() + "/Assets/" + settings.actionManifestPath; + #endif + char *actionManifestPath = new char[fullPath.size() + 1]; std::copy( fullPath.begin(), fullPath.end(), actionManifestPath ); actionManifestPath[fullPath.size()] = '\0'; diff --git a/com.valve.openvr/CHANGELOG.md b/com.valve.openvr/CHANGELOG.md index 064a9cb..6657172 100644 --- a/com.valve.openvr/CHANGELOG.md +++ b/com.valve.openvr/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.2.0] - 2023-03-22 +### Added +- Added limited OpenGL support (multipass only) +### Changed +- Updated to SteamVR SDK 1.23.7 +- Fix for unity projects set to binary serialization +- Fix for unnecessary preinit #80 +- Fix for incorrect reporting of eye position #86 +- Fix for broken depth textures in some situations #110 + ## [1.1.5] - 2021-11-08 ### Changed - Fixed issue with unicode paths / project names not working #108 diff --git a/com.valve.openvr/README.md b/com.valve.openvr/README.md index c03c612..3abca08 100644 --- a/com.valve.openvr/README.md +++ b/com.valve.openvr/README.md @@ -18,6 +18,8 @@ For now, to get access to controllers and other forms of input you will need to * In some circumstances the unity console will show errors on start saying "screen position out of view frustrum". This should not impact visuals. * OpenVR Mirror View Mode (default) can cause black screens in the game view. Please send us bug reports if this happens. * OpenVR Mirror View Mode requires use of Linear Color Space (Project Settings > Player > Other Settings > (Rendering) Color Space) + * Linux - Vulkan - Multipass will crash. + * Linux - OpenGL - Single Pass Instanced will crash. diff --git a/com.valve.openvr/Runtime/OpenVRLoader.cs b/com.valve.openvr/Runtime/OpenVRLoader.cs index 182d11e..827d716 100644 --- a/com.valve.openvr/Runtime/OpenVRLoader.cs +++ b/com.valve.openvr/Runtime/OpenVRLoader.cs @@ -443,7 +443,7 @@ public static void TickCallback(int value) #if UNITY_EDITOR public string GetPreInitLibraryName(BuildTarget buildTarget, BuildTargetGroup buildTargetGroup) { - return "XRSDKOpenVR"; + return null; } private static void DisableTickOnReload() diff --git a/com.valve.openvr/Runtime/openvr_api.cs b/com.valve.openvr/Runtime/openvr_api.cs index e6ed42a..1d73c1c 100644 --- a/com.valve.openvr/Runtime/openvr_api.cs +++ b/com.valve.openvr/Runtime/openvr_api.cs @@ -731,7 +731,7 @@ public struct IVRCompositor internal _GetCurrentFadeColor GetCurrentFadeColor; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _FadeGrid(float fSeconds, bool bFadeIn); + internal delegate void _FadeGrid(float fSeconds, bool bFadeGridIn); [MarshalAs(UnmanagedType.FunctionPtr)] internal _FadeGrid FadeGrid; @@ -1045,6 +1045,16 @@ public struct IVROverlay [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetOverlayCurvature GetOverlayCurvature; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _SetOverlayPreCurvePitch(ulong ulOverlayHandle, float fRadians); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SetOverlayPreCurvePitch SetOverlayPreCurvePitch; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _GetOverlayPreCurvePitch(ulong ulOverlayHandle, ref float pfRadians); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetOverlayPreCurvePitch GetOverlayPreCurvePitch; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVROverlayError _SetOverlayTextureColorSpace(ulong ulOverlayHandle, EColorSpace eTextureColorSpace); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -1120,6 +1130,11 @@ public struct IVROverlay [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetOverlayTransformCursor GetOverlayTransformCursor; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _SetOverlayTransformProjection(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform, ref VROverlayProjection_t pProjection, EVREye eEye); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SetOverlayTransformProjection SetOverlayTransformProjection; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVROverlayError _ShowOverlay(ulong ulOverlayHandle); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -1140,6 +1155,11 @@ public struct IVROverlay [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetTransformForOverlayCoordinates GetTransformForOverlayCoordinates; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _WaitFrameSync(uint nTimeoutMs); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _WaitFrameSync WaitFrameSync; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate bool _PollNextOverlayEvent(ulong ulOverlayHandle, ref VREvent_t pEvent, uint uncbVREvent); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -1946,7 +1966,7 @@ public struct IVRPaths public struct IVRBlockQueue { [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EBlockQueueError _Create(ref ulong pulQueueHandle, IntPtr pchPath, uint unBlockDataSize, uint unBlockHeaderSize, uint unBlockCount); + internal delegate EBlockQueueError _Create(ref ulong pulQueueHandle, IntPtr pchPath, uint unBlockDataSize, uint unBlockHeaderSize, uint unBlockCount, uint unFlags); [MarshalAs(UnmanagedType.FunctionPtr)] internal _Create Create; @@ -2899,9 +2919,9 @@ public HmdColor_t GetCurrentFadeColor(bool bBackground) HmdColor_t result = FnTable.GetCurrentFadeColor(bBackground); return result; } - public void FadeGrid(float fSeconds,bool bFadeIn) + public void FadeGrid(float fSeconds,bool bFadeGridIn) { - FnTable.FadeGrid(fSeconds,bFadeIn); + FnTable.FadeGrid(fSeconds,bFadeGridIn); } public float GetCurrentGridAlpha() { @@ -3230,6 +3250,17 @@ public EVROverlayError GetOverlayCurvature(ulong ulOverlayHandle,ref float pfCur EVROverlayError result = FnTable.GetOverlayCurvature(ulOverlayHandle,ref pfCurvature); return result; } + public EVROverlayError SetOverlayPreCurvePitch(ulong ulOverlayHandle,float fRadians) + { + EVROverlayError result = FnTable.SetOverlayPreCurvePitch(ulOverlayHandle,fRadians); + return result; + } + public EVROverlayError GetOverlayPreCurvePitch(ulong ulOverlayHandle,ref float pfRadians) + { + pfRadians = 0; + EVROverlayError result = FnTable.GetOverlayPreCurvePitch(ulOverlayHandle,ref pfRadians); + return result; + } public EVROverlayError SetOverlayTextureColorSpace(ulong ulOverlayHandle,EColorSpace eTextureColorSpace) { EVROverlayError result = FnTable.SetOverlayTextureColorSpace(ulOverlayHandle,eTextureColorSpace); @@ -3310,6 +3341,11 @@ public EVROverlayError GetOverlayTransformCursor(ulong ulOverlayHandle,ref HmdVe EVROverlayError result = FnTable.GetOverlayTransformCursor(ulOverlayHandle,ref pvHotspot); return result; } + public EVROverlayError SetOverlayTransformProjection(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform,ref VROverlayProjection_t pProjection,EVREye eEye) + { + EVROverlayError result = FnTable.SetOverlayTransformProjection(ulOverlayHandle,eTrackingOrigin,ref pmatTrackingOriginToOverlayTransform,ref pProjection,eEye); + return result; + } public EVROverlayError ShowOverlay(ulong ulOverlayHandle) { EVROverlayError result = FnTable.ShowOverlay(ulOverlayHandle); @@ -3330,6 +3366,11 @@ public EVROverlayError GetTransformForOverlayCoordinates(ulong ulOverlayHandle,E EVROverlayError result = FnTable.GetTransformForOverlayCoordinates(ulOverlayHandle,eTrackingOrigin,coordinatesInOverlay,ref pmatTransform); return result; } + public EVROverlayError WaitFrameSync(uint nTimeoutMs) + { + EVROverlayError result = FnTable.WaitFrameSync(nTimeoutMs); + return result; + } // This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were // originally mis-compiled with the wrong packing for Linux and OSX. [UnmanagedFunctionPointer(CallingConvention.StdCall)] @@ -4415,11 +4456,11 @@ internal CVRBlockQueue(IntPtr pInterface) { FnTable = (IVRBlockQueue)Marshal.PtrToStructure(pInterface, typeof(IVRBlockQueue)); } - public EBlockQueueError Create(ref ulong pulQueueHandle,string pchPath,uint unBlockDataSize,uint unBlockHeaderSize,uint unBlockCount) + public EBlockQueueError Create(ref ulong pulQueueHandle,string pchPath,uint unBlockDataSize,uint unBlockHeaderSize,uint unBlockCount,uint unFlags) { pulQueueHandle = 0; IntPtr pchPathUtf8 = Utils.ToUtf8(pchPath); - EBlockQueueError result = FnTable.Create(ref pulQueueHandle,pchPathUtf8,unBlockDataSize,unBlockHeaderSize,unBlockCount); + EBlockQueueError result = FnTable.Create(ref pulQueueHandle,pchPathUtf8,unBlockDataSize,unBlockHeaderSize,unBlockCount,unFlags); Marshal.FreeHGlobal(pchPathUtf8); return result; } @@ -4619,6 +4660,8 @@ public enum ETrackedDeviceProperty Prop_ManufacturerSerialNumber_String = 1049, Prop_ComputedSerialNumber_String = 1050, Prop_EstimatedDeviceFirstUseTime_Int32 = 1051, + Prop_DevicePowerUsage_Float = 1052, + Prop_IgnoreMotionForStandby_Bool = 1053, Prop_ReportsTimeSinceVSync_Bool = 2000, Prop_SecondsFromVsyncToPhotons_Float = 2001, Prop_DisplayFrequency_Float = 2002, @@ -4704,9 +4747,17 @@ public enum ETrackedDeviceProperty Prop_DisplaySupportsAnalogGain_Bool = 2085, Prop_DisplayMinAnalogGain_Float = 2086, Prop_DisplayMaxAnalogGain_Float = 2087, + Prop_CameraExposureTime_Float = 2088, + Prop_CameraGlobalGain_Float = 2089, Prop_DashboardScale_Float = 2091, + Prop_PeerButtonInfo_String = 2092, Prop_IpdUIRangeMinMeters_Float = 2100, Prop_IpdUIRangeMaxMeters_Float = 2101, + Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102, + Prop_Hmd_SupportsMicMonitoring_Bool = 2103, + Prop_Hmd_SupportsDisplayPortTrainingMode_Bool = 2104, + Prop_SupportsRoomViewDirect_Bool = 2105, + Prop_SupportsAppThrottling_Bool = 2106, Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, @@ -4719,6 +4770,7 @@ public enum ETrackedDeviceProperty Prop_Audio_DefaultPlaybackDeviceId_String = 2300, Prop_Audio_DefaultRecordingDeviceId_String = 2301, Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, + Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303, Prop_AttachedDeviceId_String = 3000, Prop_SupportedButtons_Uint64 = 3001, Prop_Axis0Type_Int32 = 3002, @@ -4800,6 +4852,9 @@ public enum EVRSubmitFlags Submit_TextureWithDepth = 16, Submit_FrameDiscontinuty = 32, Submit_VulkanTextureWithArrayData = 64, + Submit_GlArrayTexture = 128, + Submit_Reserved2 = 32768, + Submit_Reserved3 = 65536, } public enum EVRState { @@ -4885,6 +4940,11 @@ public enum EVREventType VREvent_RoomViewHidden = 527, VREvent_ShowUI = 528, VREvent_ShowDevTools = 529, + VREvent_DesktopViewUpdating = 530, + VREvent_DesktopViewReady = 531, + VREvent_StartDashboard = 532, + VREvent_ElevatePrism = 533, + VREvent_OverlayClosed = 534, VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, VREvent_Notification_BeginInteraction = 602, @@ -4894,6 +4954,7 @@ public enum EVREventType VREvent_QuitAcknowledged = 703, VREvent_DriverRequestedQuit = 704, VREvent_RestartRequested = 705, + VREvent_InvalidateSwapTextureSets = 706, VREvent_ChaperoneDataHasChanged = 800, VREvent_ChaperoneUniverseHasChanged = 801, VREvent_ChaperoneTempDataHasChanged = 802, @@ -4948,6 +5009,7 @@ public enum EVREventType VREvent_Compositor_OutOfVideoMemory = 1417, VREvent_Compositor_DisplayModeNotSupported = 1418, VREvent_Compositor_StageOverrideReady = 1419, + VREvent_Compositor_RequestDisconnectReconnect = 1420, VREvent_TrackedCamera_StartVideoStream = 1500, VREvent_TrackedCamera_StopVideoStream = 1501, VREvent_TrackedCamera_PauseVideoStream = 1502, @@ -5138,6 +5200,7 @@ public enum EVROverlayError TextureAlreadyLocked = 31, TextureLockCapacityReached = 32, TextureNotLocked = 33, + TimedOut = 34, } public enum EVRApplicationType { @@ -5150,8 +5213,12 @@ public enum EVRApplicationType VRApplication_SteamWatchdog = 6, VRApplication_Bootstrapper = 7, VRApplication_WebHelper = 8, - VRApplication_OpenXR = 9, - VRApplication_Max = 10, + VRApplication_OpenXRInstance = 9, + VRApplication_OpenXRScene = 10, + VRApplication_OpenXROverlay = 11, + VRApplication_Prism = 12, + VRApplication_RoomView = 13, + VRApplication_Max = 14, } public enum EVRFirmwareError { @@ -5231,6 +5298,27 @@ public enum EVRInitError Init_FailedForVrMonitor = 144, Init_PropertyManagerInitFailed = 145, Init_WebServerFailed = 146, + Init_IllegalTypeTransition = 147, + Init_MismatchedRuntimes = 148, + Init_InvalidProcessId = 149, + Init_VRServiceStartupFailed = 150, + Init_PrismNeedsNewDrivers = 151, + Init_PrismStartupTimedOut = 152, + Init_CouldNotStartPrism = 153, + Init_PrismClientInitFailed = 154, + Init_PrismClientStartFailed = 155, + Init_PrismExitedUnexpectedly = 156, + Init_BadLuid = 157, + Init_NoServerForAppContainer = 158, + Init_DuplicateBootstrapper = 159, + Init_VRDashboardServicePending = 160, + Init_VRDashboardServiceTimeout = 161, + Init_VRDashboardServiceStopped = 162, + Init_VRDashboardAlreadyStarted = 163, + Init_VRDashboardCopyFailed = 164, + Init_VRDashboardTokenFailure = 165, + Init_VRDashboardEnvironmentFailure = 166, + Init_VRDashboardPathFailure = 167, Driver_Failed = 200, Driver_Unknown = 201, Driver_HmdUnknown = 202, @@ -5244,6 +5332,8 @@ public enum EVRInitError Driver_HmdDriverIdOutOfBounds = 211, Driver_HmdDisplayMirrored = 212, Driver_HmdDisplayNotFoundLaptop = 213, + Driver_PeerDriverNotInstalled = 214, + Driver_WirelessHmdNotConnected = 215, IPC_ServerInitFailed = 300, IPC_ConnectFailed = 301, IPC_SharedStateInitFailed = 302, @@ -5346,8 +5436,14 @@ public enum EVRInitError Compositor_CreateOverlayInvalidCall = 488, Compositor_CreateOverlayAlreadyInitialized = 489, Compositor_FailedToCreateMailbox = 490, + Compositor_WindowInterfaceIsNull = 491, + Compositor_SystemLayerCreateInstance = 492, + Compositor_SystemLayerCreateSession = 493, + Compositor_CreateInverseDistortUVs = 494, + Compositor_CreateBackbufferDepth = 495, VendorSpecific_UnableToConnectToOculusRuntime = 1000, VendorSpecific_WindowsNotInDevMode = 1001, + VendorSpecific_OculusLinkNotEnabled = 1002, VendorSpecific_HmdFound_CantOpenDevice = 1101, VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, VendorSpecific_HmdFound_NoStoredConfig = 1103, @@ -5362,6 +5458,7 @@ public enum EVRInitError VendorSpecific_HmdFound_UserDataError = 1112, VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, VendorSpecific_OculusRuntimeBadInstall = 1114, + VendorSpecific_HmdFound_UnexpectedConfiguration_1 = 1115, Steam_SteamInstallationNotFound = 2000, LastError = 2001, } @@ -5463,6 +5560,7 @@ public enum EVRApplicationError PropertyNotSet = 201, UnknownProperty = 202, InvalidParameter = 203, + NotImplemented = 300, } public enum EVRApplicationProperty { @@ -5553,6 +5651,7 @@ public enum VROverlayTransformType VROverlayTransform_DashboardTab = 5, VROverlayTransform_DashboardThumb = 6, VROverlayTransform_Mountable = 7, + VROverlayTransform_Projection = 8, } public enum VROverlayFlags { @@ -5573,6 +5672,7 @@ public enum VROverlayFlags HideLaserIntersection = 524288, WantsModalBehavior = 1048576, IsPremultiplied = 2097152, + IgnoreTextureAlpha = 4194304, } public enum VRMessageOverlayResponse { @@ -5640,6 +5740,7 @@ public enum EVRRenderModelTextureFormat BC4 = 2, BC7 = 3, BC7_SRGB = 4, + RGBA16_FLOAT = 5, } public enum EVRNotificationType { @@ -5766,6 +5867,10 @@ public enum EBlockQueueReadType BlockQueueRead_New = 1, BlockQueueRead_Next = 2, } +public enum EBlockQueueCreationFlag +{ + BlockQueueFlag_OwnerIsReader = 1, +} [StructLayout(LayoutKind.Explicit)] public struct VREvent_Data_t { @@ -5946,6 +6051,11 @@ private static void _copysign(ref float sizeval, float signval) public HmdVector2_t vTopLeft; public HmdVector2_t vBottomRight; } +[StructLayout(LayoutKind.Sequential)] public struct VRBoneTransform_t +{ + public HmdVector4_t position; + public HmdQuaternionf_t orientation; +} [StructLayout(LayoutKind.Sequential)] public struct DistortionCoordinates_t { public float rfRed0; //float[2] @@ -6076,6 +6186,7 @@ private static void _copysign(ref float sizeval, float signval) { public ulong overlayHandle; public ulong devicePath; + public ulong memoryBlockId; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Status_t { @@ -6298,11 +6409,6 @@ public void Unpack(ref VRControllerState_t unpacked) unpacked.rAxis4 = this.rAxis4; } } -[StructLayout(LayoutKind.Sequential)] public struct VRBoneTransform_t -{ - public HmdVector4_t position; - public HmdQuaternionf_t orientation; -} [StructLayout(LayoutKind.Sequential)] public struct CameraVideoStreamFrameHeader_t { public EVRTrackedCameraFrameType eFrameType; @@ -6430,6 +6536,13 @@ public void Unpack(ref VRControllerState_t unpacked) public EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; public VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; } +[StructLayout(LayoutKind.Sequential)] public struct VROverlayProjection_t +{ + public float fLeft; + public float fRight; + public float fTop; + public float fBottom; +} [StructLayout(LayoutKind.Sequential)] public struct VROverlayView_t { public ulong overlayHandle; @@ -6462,6 +6575,7 @@ public void Unpack(ref VRControllerState_t unpacked) public ushort unHeight; public IntPtr rubTextureMapData; // const uint8_t * public EVRRenderModelTextureFormat format; + public ushort unMipLevels; } // This structure is for backwards binary compatibility on Linux and OSX only [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct RenderModel_TextureMap_t_Packed @@ -6470,12 +6584,14 @@ public void Unpack(ref VRControllerState_t unpacked) public ushort unHeight; public IntPtr rubTextureMapData; // const uint8_t * public EVRRenderModelTextureFormat format; + public ushort unMipLevels; public RenderModel_TextureMap_t_Packed(RenderModel_TextureMap_t unpacked) { this.unWidth = unpacked.unWidth; this.unHeight = unpacked.unHeight; this.rubTextureMapData = unpacked.rubTextureMapData; this.format = unpacked.format; + this.unMipLevels = unpacked.unMipLevels; } public void Unpack(ref RenderModel_TextureMap_t unpacked) { @@ -6483,6 +6599,7 @@ public void Unpack(ref RenderModel_TextureMap_t unpacked) unpacked.unHeight = this.unHeight; unpacked.rubTextureMapData = this.rubTextureMapData; unpacked.format = this.format; + unpacked.unMipLevels = this.unMipLevels; } } [StructLayout(LayoutKind.Sequential)] public struct RenderModel_t @@ -7465,7 +7582,6 @@ public static uint GetInitToken() return OpenVRInterop.GetInitToken(); } - public const ulong k_ulSharedTextureIsNTHandle = 4294967296; public const uint k_nDriverNone = 4294967295; public const uint k_unMaxDriverDebugResponseSize = 32768; public const uint k_unTrackedDeviceIndex_Hmd = 0; @@ -7517,12 +7633,12 @@ public static uint GetInitToken() public const string IVRApplications_Version = "IVRApplications_007"; public const string IVRChaperone_Version = "IVRChaperone_004"; public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_006"; - public const string IVRCompositor_Version = "IVRCompositor_026"; + public const string IVRCompositor_Version = "IVRCompositor_027"; public const uint k_unVROverlayMaxKeyLength = 128; public const uint k_unVROverlayMaxNameLength = 128; public const uint k_unMaxOverlayCount = 128; public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; - public const string IVROverlay_Version = "IVROverlay_024"; + public const string IVROverlay_Version = "IVROverlay_026"; public const string IVROverlayView_Version = "IVROverlayView_003"; public const uint k_unHeadsetViewMaxWidth = 3840; public const uint k_unHeadsetViewMaxHeight = 2160; @@ -7557,6 +7673,7 @@ public static uint GetInitToken() public const string k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; public const string k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; public const string k_pch_SteamVR_ShowStage_Bool = "showStage"; + public const string k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences"; public const string k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; public const string k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; public const string k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; @@ -7567,6 +7684,10 @@ public static uint GetInitToken() public const string k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; public const string k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; public const string k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; + public const string k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle"; + public const string k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict"; + public const string k_pch_SteamVR_WorldScale_Float = "worldScale"; + public const string k_pch_SteamVR_FovScale_Int32 = "fovScale"; public const string k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; public const string k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; public const string k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; @@ -7609,6 +7730,9 @@ public static uint GetInitToken() public const string k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2"; public const string k_pch_SteamVR_BlockOculusSDKOnOpenVRLaunchOption_Bool = "blockOculusSDKOnOpenVRLaunchOption"; public const string k_pch_SteamVR_BlockOculusSDKOnAllLaunches_Bool = "blockOculusSDKOnAllLaunches"; + public const string k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility"; + public const string k_pch_SteamVR_DisplayPortTrainingMode_Int = "displayPortTrainingMode"; + public const string k_pch_SteamVR_UsePrism_Bool = "usePrism"; public const string k_pch_DirectMode_Section = "direct_mode"; public const string k_pch_DirectMode_Enable_Bool = "enable"; public const string k_pch_DirectMode_Count_Int32 = "count"; @@ -7700,6 +7824,8 @@ public static uint GetInitToken() public const string k_pch_audio_EnablePlaybackMirrorIndependentVolume_Bool = "enablePlaybackMirrorIndependentVolume"; public const string k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId"; public const string k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + public const string k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput"; + public const string k_pch_audio_MuteMicMonitor_Bool = "muteMicMonitor"; public const string k_pch_Power_Section = "power"; public const string k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; public const string k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; @@ -7713,6 +7839,8 @@ public static uint GetInitToken() public const string k_pch_Dashboard_Position = "position"; public const string k_pch_Dashboard_DesktopScale = "desktopScale"; public const string k_pch_Dashboard_DashboardScale = "dashboardScale"; + public const string k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer"; + public const string k_pch_Dashboard_StickyDashboard = "stickyDashboard"; public const string k_pch_modelskin_Section = "modelskins"; public const string k_pch_Driver_Enable_Bool = "enable"; public const string k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode"; @@ -7774,6 +7902,7 @@ public static uint GetInitToken() public const string k_pchPathBoundTrackerRole = "/bound_tracker_role"; public const string k_pchPathPoseRaw = "/pose/raw"; public const string k_pchPathPoseTip = "/pose/tip"; + public const string k_pchPathPoseGrip = "/pose/grip"; public const string k_pchPathSystemButtonClick = "/input/system/click"; public const string k_pchPathProximity = "/proximity"; public const string k_pchPathControllerTypePrefix = "/controller_type/"; @@ -7798,7 +7927,7 @@ public static uint GetInitToken() public const string k_pchPathClientAppKey = "/client_info/app_key"; public const ulong k_ulInvalidPathHandle = 0; public const string IVRPaths_Version = "IVRPaths_001"; - public const string IVRBlockQueue_Version = "IVRBlockQueue_004"; + public const string IVRBlockQueue_Version = "IVRBlockQueue_005"; static uint VRToken { get; set; } diff --git a/com.valve.openvr/Runtime/x64/XRSDKOpenVR.dll b/com.valve.openvr/Runtime/x64/XRSDKOpenVR.dll index 4b6f840..9582532 100644 Binary files a/com.valve.openvr/Runtime/x64/XRSDKOpenVR.dll and b/com.valve.openvr/Runtime/x64/XRSDKOpenVR.dll differ diff --git a/com.valve.openvr/Runtime/x64/XRSDKOpenVR.exp b/com.valve.openvr/Runtime/x64/XRSDKOpenVR.exp index 9d240c4..638c2a3 100644 Binary files a/com.valve.openvr/Runtime/x64/XRSDKOpenVR.exp and b/com.valve.openvr/Runtime/x64/XRSDKOpenVR.exp differ diff --git a/com.valve.openvr/Runtime/x64/XRSDKOpenVR.lib b/com.valve.openvr/Runtime/x64/XRSDKOpenVR.lib index 980d2ee..c6004f5 100644 Binary files a/com.valve.openvr/Runtime/x64/XRSDKOpenVR.lib and b/com.valve.openvr/Runtime/x64/XRSDKOpenVR.lib differ diff --git a/com.valve.openvr/Runtime/x64/libXRSDKOpenVR.so b/com.valve.openvr/Runtime/x64/libXRSDKOpenVR.so index ae614d1..7b4e8fc 100755 Binary files a/com.valve.openvr/Runtime/x64/libXRSDKOpenVR.so and b/com.valve.openvr/Runtime/x64/libXRSDKOpenVR.so differ diff --git a/com.valve.openvr/Runtime/x64/vc142.pdb b/com.valve.openvr/Runtime/x64/vc142.pdb index 8823743..0407762 100644 Binary files a/com.valve.openvr/Runtime/x64/vc142.pdb and b/com.valve.openvr/Runtime/x64/vc142.pdb differ diff --git a/com.valve.openvr/Runtime/x86/XRSDKOpenVR.dll b/com.valve.openvr/Runtime/x86/XRSDKOpenVR.dll index e9194f8..1e84493 100644 Binary files a/com.valve.openvr/Runtime/x86/XRSDKOpenVR.dll and b/com.valve.openvr/Runtime/x86/XRSDKOpenVR.dll differ diff --git a/com.valve.openvr/Runtime/x86/XRSDKOpenVR.exp b/com.valve.openvr/Runtime/x86/XRSDKOpenVR.exp index 70146e1..f1fe477 100644 Binary files a/com.valve.openvr/Runtime/x86/XRSDKOpenVR.exp and b/com.valve.openvr/Runtime/x86/XRSDKOpenVR.exp differ diff --git a/com.valve.openvr/Runtime/x86/XRSDKOpenVR.lib b/com.valve.openvr/Runtime/x86/XRSDKOpenVR.lib index 2b83093..f23511a 100644 Binary files a/com.valve.openvr/Runtime/x86/XRSDKOpenVR.lib and b/com.valve.openvr/Runtime/x86/XRSDKOpenVR.lib differ diff --git a/com.valve.openvr/Runtime/x86/vc142.pdb b/com.valve.openvr/Runtime/x86/vc142.pdb index 5d91f2a..f079bfa 100644 Binary files a/com.valve.openvr/Runtime/x86/vc142.pdb and b/com.valve.openvr/Runtime/x86/vc142.pdb differ diff --git a/com.valve.openvr/package.json b/com.valve.openvr/package.json index c80af03..c1f45c6 100644 --- a/com.valve.openvr/package.json +++ b/com.valve.openvr/package.json @@ -1,7 +1,7 @@ { "name": "com.valvesoftware.unity.openvr", "displayName": "OpenVR XR Plugin", - "version": "1.1.5", + "version": "1.2.0", "unity": "2019.4", "description": "Provides rendering support for OpenVR devices in Unity XR. For input please see: https://github.com/ValveSoftware/steamvr_unity_plugin", "keywords": [ @@ -26,4 +26,4 @@ "hideInEditor": false, "homepage": "https://github.com/ValveSoftware/unity-xr-plugin", "license": "BSD-3-Clause" -} \ No newline at end of file +}