diff options
author | Joe Ludwig <joe@valvesoftware.com> | 2018-02-15 22:32:26 +0300 |
---|---|---|
committer | Joe Ludwig <joe@valvesoftware.com> | 2018-02-15 22:32:26 +0300 |
commit | d35c04ca3d7ddb762afa4a1c6c4a9d5de992cda7 (patch) | |
tree | 6775a7ca40786f4fd4d79d133b445dfbf00ec27a | |
parent | 53c417bb16cee003cd949254a2aa00714046efbd (diff) |
**OpenVR SDK 1.0.13**v1.0.13
General
* Added VREvent_RoomViewShown and VREvent_RoomViewHidden. Indicates that the "room view" pass-through camera mode has been started or stopped by the user. An application or driver can use this to enable or disable other functionality.
IVROverlay
* Added TextureType_DXGISharedHandle. This is used to submit a shared texture handle directly and avoid an extra copy on the resource. This texture type is current only supported for overlays on Windows.
Driver Interface
* Added TrackedControllerRole_OptOut. Set a controller to this if you want that controller to be ignored for the purposes of right/left hand selection.
* Added Prop_NeverTracked_Bool. Set that property to true on a device if you want to inform the system that the device is never going to have a valid pose. For instance, you might use this for an untracked gamepad.
* Prop_DistortionMeshResolution_Int32. Set this property on an HMD device if you want the system to generate a distortion mesh with a different resolution than the default, which is an approximately 50x50 grid across the full texture which is then trimmed to the area within the hidden area mesh.
* Added Prop_MinimumIpdStepMeters_Float. Set this to the minimum IPD change in meters that should cause the IPD UI to be shown.
* IVRDriverDirectModeComponent.CreateSwapTextureSet added the ability to specify sample count.
* IVRDriverDirectModeComponent.SubmitLayer
[git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 4366099]
28 files changed, 188 insertions, 81 deletions
diff --git a/bin/linux32/libopenvr_api.so b/bin/linux32/libopenvr_api.so Binary files differindex 62b1e9a..01c0b24 100755 --- a/bin/linux32/libopenvr_api.so +++ b/bin/linux32/libopenvr_api.so diff --git a/bin/linux32/libopenvr_api.so.dbg b/bin/linux32/libopenvr_api.so.dbg Binary files differindex ea21013..b3885db 100755 --- a/bin/linux32/libopenvr_api.so.dbg +++ b/bin/linux32/libopenvr_api.so.dbg diff --git a/bin/linux64/libopenvr_api.so b/bin/linux64/libopenvr_api.so Binary files differindex bd4d32a..60ea805 100755 --- a/bin/linux64/libopenvr_api.so +++ b/bin/linux64/libopenvr_api.so diff --git a/bin/linux64/libopenvr_api.so.dbg b/bin/linux64/libopenvr_api.so.dbg Binary files differindex 55cdfe7..29aae11 100755 --- a/bin/linux64/libopenvr_api.so.dbg +++ b/bin/linux64/libopenvr_api.so.dbg diff --git a/bin/osx32/libopenvr_api.dylib b/bin/osx32/libopenvr_api.dylib Binary files differindex 0640d5b..9559c69 100755 --- a/bin/osx32/libopenvr_api.dylib +++ b/bin/osx32/libopenvr_api.dylib diff --git a/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib b/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib Binary files differindex 7c74b4c..b59626c 100644 --- a/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib +++ b/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib diff --git a/bin/win32/openvr_api.dll b/bin/win32/openvr_api.dll Binary files differindex f7f7df7..7f7f5eb 100644 --- a/bin/win32/openvr_api.dll +++ b/bin/win32/openvr_api.dll diff --git a/bin/win32/openvr_api.pdb b/bin/win32/openvr_api.pdb Binary files differindex 3af3437..397eba9 100644 --- a/bin/win32/openvr_api.pdb +++ b/bin/win32/openvr_api.pdb diff --git a/bin/win64/openvr_api.dll b/bin/win64/openvr_api.dll Binary files differindex c953923..6ae4795 100644 --- a/bin/win64/openvr_api.dll +++ b/bin/win64/openvr_api.dll diff --git a/bin/win64/openvr_api.pdb b/bin/win64/openvr_api.pdb Binary files differindex 2244c24..1b007cc 100644 --- a/bin/win64/openvr_api.pdb +++ b/bin/win64/openvr_api.pdb diff --git a/headers/openvr.h b/headers/openvr.h index 7f98acd..124636b 100644 --- a/headers/openvr.h +++ b/headers/openvr.h @@ -112,6 +112,8 @@ enum ETextureType TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure + TextureType_DXGISharedHandle = 5, // Handle is a HANDLE DXGI share handle, only supported for Overlay render targets. + // this texture is used directly by our renderer, so only perform atomic (copyresource or resolve) on it }; enum EColorSpace @@ -173,6 +175,7 @@ enum ETrackedControllerRole TrackedControllerRole_Invalid = 0, // Invalid value for controller type TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand + TrackedControllerRole_OptOut = 3, // Tracked device is opting out of left/right hand selection }; @@ -206,6 +209,9 @@ typedef uint32_t PropertyTypeTag_t; static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0; static const PropertyTypeTag_t k_unInvalidPropertyTag = 0; +typedef PropertyContainerHandle_t DriverHandle_t; +static const PropertyContainerHandle_t k_ulInvalidDriverHandle = 0; + // Use these tags to set/get common types as struct properties static const PropertyTypeTag_t k_unFloatPropertyTag = 1; static const PropertyTypeTag_t k_unInt32PropertyTag = 2; @@ -274,6 +280,7 @@ enum ETrackedDeviceProperty Prop_ResourceRoot_String = 1035, Prop_RegisteredDeviceType_String = 1036, Prop_InputProfilePath_String = 1037, // input profile to use for this device in the input system. Will default to tracking system name if this isn't provided + Prop_NeverTracked_Bool = 1038, // Used for devices that will never have a valid pose by design // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -330,9 +337,13 @@ enum ETrackedDeviceProperty Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded Prop_DoNotApplyPrediction_Bool = 2054, Prop_CameraToHeadTransforms_Matrix34_Array = 2055, + Prop_DistortionMeshResolution_Int32 = 2056, // custom resolution of compositor calls to IVRSystem::ComputeDistortion Prop_DriverIsDrawingControllers_Bool = 2057, Prop_DriverRequestsApplicationPause_Bool = 2058, Prop_DriverRequestsReducedRendering_Bool = 2059, + Prop_MinimumIpdStepMeters_Float = 2060, + Prop_AudioBridgeFirmwareVersion_Uint64 = 2061, + Prop_ImageBridgeFirmwareVersion_Uint64 = 2062, // Properties that are unique to TrackedDeviceClass_Controller Prop_AttachedDeviceId_String = 3000, @@ -554,6 +565,7 @@ enum EVREventType VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene VREvent_InputFocusChanged = 406, // data is process VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, // data is process VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility @@ -575,11 +587,12 @@ enum EVREventType VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else VREvent_OverlaySharedTextureChanged = 513, - VREvent_DashboardGuideButtonDown = 514, - VREvent_DashboardGuideButtonUp = 515, + //VREvent_DashboardGuideButtonDown = 514, // These are no longer sent + //VREvent_DashboardGuideButtonUp = 515, VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load VREvent_DashboardOverlayCreated = 518, + VREvent_SwitchGamepadFocus = 519, // Screenshot API VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot @@ -589,6 +602,8 @@ enum EVREventType VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted VREvent_PrimaryDashboardDeviceChanged = 525, + VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled + VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, @@ -823,6 +838,8 @@ struct VREvent_Reserved_t { uint64_t reserved0; uint64_t reserved1; + uint64_t reserved2; + uint64_t reserved3; }; struct VREvent_PerformanceTest_t @@ -1185,6 +1202,7 @@ enum EVRInitError VRInitError_Init_FirmwareUpdateBusy = 138, VRInitError_Init_FirmwareRecoveryBusy = 139, VRInitError_Init_USBServiceBusy = 140, + VRInitError_Init_VRWebHelperStartupFailed = 141, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1980,6 +1998,7 @@ namespace vr static const char * const k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; static const char * const k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; + static const char * const k_pch_SteamVR_DebugInput = "debugInput"; //----------------------------------------------------------------------------- // lighthouse keys @@ -1991,6 +2010,7 @@ namespace vr static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; + static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; //----------------------------------------------------------------------------- // null keys @@ -2092,6 +2112,7 @@ namespace vr static const char * const k_pch_Dashboard_Section = "dashboard"; static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + static const char * const k_pch_Dashboard_EnableWebUI = "webUI"; //----------------------------------------------------------------------------- // model skin keys @@ -2101,6 +2122,11 @@ namespace vr // driver keys - These could be checked in any driver_<name> section static const char * const k_pch_Driver_Enable_Bool = "enable"; + //----------------------------------------------------------------------------- + // web interface keys + static const char* const k_pch_WebInterface_Section = "WebInterface"; + static const char* const k_pch_WebInterface_WebPort_String = "WebPort"; + } // namespace vr // ivrchaperone.h @@ -3598,6 +3624,8 @@ public: /** Returns the length of the number of bytes necessary to hold this string including the trailing null. */ virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0; }; static const char * const IVRDriverManager_Version = "IVRDriverManager_001"; diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs index 201eafb..2c9fb4a 100644 --- a/headers/openvr_api.cs +++ b/headers/openvr_api.cs @@ -1525,6 +1525,11 @@ public struct IVRDriverManager [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetDriverName GetDriverName; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate ulong _GetDriverHandle(string pchDriverName); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetDriverHandle GetDriverHandle; + } @@ -3257,6 +3262,11 @@ public class CVRDriverManager uint result = FnTable.GetDriverName(nDriver,pchValue,unBufferSize); return result; } + public ulong GetDriverHandle(string pchDriverName) + { + ulong result = FnTable.GetDriverHandle(pchDriverName); + return result; + } } @@ -3293,6 +3303,7 @@ public enum ETextureType Vulkan = 2, IOSurface = 3, DirectX12 = 4, + DXGISharedHandle = 5, } public enum EColorSpace { @@ -3322,6 +3333,7 @@ public enum ETrackedControllerRole Invalid = 0, LeftHand = 1, RightHand = 2, + OptOut = 3, } public enum ETrackingUniverseOrigin { @@ -3370,6 +3382,7 @@ public enum ETrackedDeviceProperty Prop_ResourceRoot_String = 1035, Prop_RegisteredDeviceType_String = 1036, Prop_InputProfilePath_String = 1037, + Prop_NeverTracked_Bool = 1038, Prop_ReportsTimeSinceVSync_Bool = 2000, Prop_SecondsFromVsyncToPhotons_Float = 2001, Prop_DisplayFrequency_Float = 2002, @@ -3424,9 +3437,13 @@ public enum ETrackedDeviceProperty Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, Prop_DoNotApplyPrediction_Bool = 2054, Prop_CameraToHeadTransforms_Matrix34_Array = 2055, + Prop_DistortionMeshResolution_Int32 = 2056, Prop_DriverIsDrawingControllers_Bool = 2057, Prop_DriverRequestsApplicationPause_Bool = 2058, Prop_DriverRequestsReducedRendering_Bool = 2059, + Prop_MinimumIpdStepMeters_Float = 2060, + Prop_AudioBridgeFirmwareVersion_Uint64 = 2061, + Prop_ImageBridgeFirmwareVersion_Uint64 = 2062, Prop_AttachedDeviceId_String = 3000, Prop_SupportedButtons_Uint64 = 3001, Prop_Axis0Type_Int32 = 3002, @@ -3549,6 +3566,7 @@ public enum EVREventType VREvent_SceneFocusChanged = 405, VREvent_InputFocusChanged = 406, VREvent_SceneApplicationSecondaryRenderingStarted = 407, + VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, VREvent_HideRenderModels = 410, VREvent_ShowRenderModels = 411, VREvent_ConsoleOpened = 420, @@ -3567,17 +3585,18 @@ public enum EVREventType VREvent_OverlayGamepadFocusGained = 511, VREvent_OverlayGamepadFocusLost = 512, VREvent_OverlaySharedTextureChanged = 513, - VREvent_DashboardGuideButtonDown = 514, - VREvent_DashboardGuideButtonUp = 515, VREvent_ScreenshotTriggered = 516, VREvent_ImageFailed = 517, VREvent_DashboardOverlayCreated = 518, + VREvent_SwitchGamepadFocus = 519, VREvent_RequestScreenshot = 520, VREvent_ScreenshotTaken = 521, VREvent_ScreenshotFailed = 522, VREvent_SubmitScreenshotToDashboard = 523, VREvent_ScreenshotProgressToDashboard = 524, VREvent_PrimaryDashboardDeviceChanged = 525, + VREvent_RoomViewShown = 526, + VREvent_RoomViewHidden = 527, VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, VREvent_Notification_BeginInteraction = 602, @@ -3822,6 +3841,7 @@ public enum EVRInitError Init_FirmwareUpdateBusy = 138, Init_FirmwareRecoveryBusy = 139, Init_USBServiceBusy = 140, + Init_VRWebHelperStartupFailed = 141, Driver_Failed = 200, Driver_Unknown = 201, Driver_HmdUnknown = 202, @@ -4375,6 +4395,8 @@ public enum EVRScreenshotError { public ulong reserved0; public ulong reserved1; + public ulong reserved2; + public ulong reserved3; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_PerformanceTest_t { @@ -4781,6 +4803,7 @@ public class OpenVR public const uint k_unTrackedDeviceIndexInvalid = 4294967295; public const ulong k_ulInvalidPropertyContainer = 0; public const uint k_unInvalidPropertyTag = 0; + public const ulong k_ulInvalidDriverHandle = 0; public const uint k_unFloatPropertyTag = 1; public const uint k_unInt32PropertyTag = 2; public const uint k_unUint64PropertyTag = 3; @@ -4874,6 +4897,7 @@ public class OpenVR public const string k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; public const string k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; public const string k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; + public const string k_pch_SteamVR_DebugInput = "debugInput"; public const string k_pch_Lighthouse_Section = "driver_lighthouse"; public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; public const string k_pch_Lighthouse_DisableIMUExceptHMD_Bool = "disableimuexcepthmd"; @@ -4882,6 +4906,7 @@ public class OpenVR public const string k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; public const string k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; public const string k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; + public const string k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; public const string k_pch_Null_Section = "driver_null"; public const string k_pch_Null_SerialNumber_String = "serialNumber"; public const string k_pch_Null_ModelNumber_String = "modelNumber"; @@ -4953,8 +4978,11 @@ public class OpenVR public const string k_pch_Dashboard_Section = "dashboard"; public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + public const string k_pch_Dashboard_EnableWebUI = "webUI"; public const string k_pch_modelskin_Section = "modelskins"; public const string k_pch_Driver_Enable_Bool = "enable"; + public const string k_pch_WebInterface_Section = "WebInterface"; + public const string k_pch_WebInterface_WebPort_String = "WebPort"; public const string IVRScreenshots_Version = "IVRScreenshots_001"; public const string IVRResources_Version = "IVRResources_001"; public const string IVRDriverManager_Version = "IVRDriverManager_001"; diff --git a/headers/openvr_api.json b/headers/openvr_api.json index 86cc03a..05ea66a 100644 --- a/headers/openvr_api.json +++ b/headers/openvr_api.json @@ -6,6 +6,7 @@ ,{"typedef": "vr::TrackedDeviceIndex_t","type": "uint32_t"} ,{"typedef": "vr::PropertyContainerHandle_t","type": "uint64_t"} ,{"typedef": "vr::PropertyTypeTag_t","type": "uint32_t"} +,{"typedef": "vr::DriverHandle_t","type": "PropertyContainerHandle_t"} ,{"typedef": "vr::VREvent_Data_t","type": "union VREvent_Data_t"} ,{"typedef": "vr::VRControllerState_t","type": "struct vr::VRControllerState001_t"} ,{"typedef": "vr::VROverlayHandle_t","type": "uint64_t"} @@ -42,6 +43,7 @@ ,{"name": "TextureType_Vulkan","value": "2"} ,{"name": "TextureType_IOSurface","value": "3"} ,{"name": "TextureType_DirectX12","value": "4"} + ,{"name": "TextureType_DXGISharedHandle","value": "5"} ]} , {"enumname": "vr::EColorSpace","values": [ {"name": "ColorSpace_Auto","value": "0"} @@ -67,6 +69,7 @@ {"name": "TrackedControllerRole_Invalid","value": "0"} ,{"name": "TrackedControllerRole_LeftHand","value": "1"} ,{"name": "TrackedControllerRole_RightHand","value": "2"} + ,{"name": "TrackedControllerRole_OptOut","value": "3"} ]} , {"enumname": "vr::ETrackingUniverseOrigin","values": [ {"name": "TrackingUniverseSeated","value": "0"} @@ -113,6 +116,7 @@ ,{"name": "Prop_ResourceRoot_String","value": "1035"} ,{"name": "Prop_RegisteredDeviceType_String","value": "1036"} ,{"name": "Prop_InputProfilePath_String","value": "1037"} + ,{"name": "Prop_NeverTracked_Bool","value": "1038"} ,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"} ,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"} ,{"name": "Prop_DisplayFrequency_Float","value": "2002"} @@ -167,9 +171,13 @@ ,{"name": "Prop_NamedIconPathTrackingReferenceDeviceOff_String","value": "2053"} ,{"name": "Prop_DoNotApplyPrediction_Bool","value": "2054"} ,{"name": "Prop_CameraToHeadTransforms_Matrix34_Array","value": "2055"} + ,{"name": "Prop_DistortionMeshResolution_Int32","value": "2056"} ,{"name": "Prop_DriverIsDrawingControllers_Bool","value": "2057"} ,{"name": "Prop_DriverRequestsApplicationPause_Bool","value": "2058"} ,{"name": "Prop_DriverRequestsReducedRendering_Bool","value": "2059"} + ,{"name": "Prop_MinimumIpdStepMeters_Float","value": "2060"} + ,{"name": "Prop_AudioBridgeFirmwareVersion_Uint64","value": "2061"} + ,{"name": "Prop_ImageBridgeFirmwareVersion_Uint64","value": "2062"} ,{"name": "Prop_AttachedDeviceId_String","value": "3000"} ,{"name": "Prop_SupportedButtons_Uint64","value": "3001"} ,{"name": "Prop_Axis0Type_Int32","value": "3002"} @@ -288,6 +296,7 @@ ,{"name": "VREvent_SceneFocusChanged","value": "405"} ,{"name": "VREvent_InputFocusChanged","value": "406"} ,{"name": "VREvent_SceneApplicationSecondaryRenderingStarted","value": "407"} + ,{"name": "VREvent_SceneApplicationUsingWrongGraphicsAdapter","value": "408"} ,{"name": "VREvent_HideRenderModels","value": "410"} ,{"name": "VREvent_ShowRenderModels","value": "411"} ,{"name": "VREvent_ConsoleOpened","value": "420"} @@ -306,17 +315,18 @@ ,{"name": "VREvent_OverlayGamepadFocusGained","value": "511"} ,{"name": "VREvent_OverlayGamepadFocusLost","value": "512"} ,{"name": "VREvent_OverlaySharedTextureChanged","value": "513"} - ,{"name": "VREvent_DashboardGuideButtonDown","value": "514"} - ,{"name": "VREvent_DashboardGuideButtonUp","value": "515"} ,{"name": "VREvent_ScreenshotTriggered","value": "516"} ,{"name": "VREvent_ImageFailed","value": "517"} ,{"name": "VREvent_DashboardOverlayCreated","value": "518"} + ,{"name": "VREvent_SwitchGamepadFocus","value": "519"} ,{"name": "VREvent_RequestScreenshot","value": "520"} ,{"name": "VREvent_ScreenshotTaken","value": "521"} ,{"name": "VREvent_ScreenshotFailed","value": "522"} ,{"name": "VREvent_SubmitScreenshotToDashboard","value": "523"} ,{"name": "VREvent_ScreenshotProgressToDashboard","value": "524"} ,{"name": "VREvent_PrimaryDashboardDeviceChanged","value": "525"} + ,{"name": "VREvent_RoomViewShown","value": "526"} + ,{"name": "VREvent_RoomViewHidden","value": "527"} ,{"name": "VREvent_Notification_Shown","value": "600"} ,{"name": "VREvent_Notification_Hidden","value": "601"} ,{"name": "VREvent_Notification_BeginInteraction","value": "602"} @@ -547,6 +557,7 @@ ,{"name": "VRInitError_Init_FirmwareUpdateBusy","value": "138"} ,{"name": "VRInitError_Init_FirmwareRecoveryBusy","value": "139"} ,{"name": "VRInitError_Init_USBServiceBusy","value": "140"} + ,{"name": "VRInitError_Init_VRWebHelperStartupFailed","value": "141"} ,{"name": "VRInitError_Driver_Failed","value": "200"} ,{"name": "VRInitError_Driver_Unknown","value": "201"} ,{"name": "VRInitError_Driver_HmdUnknown","value": "202"} @@ -840,6 +851,8 @@ ,{ "constname": "k_unInvalidPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "0"} ,{ + "constname": "k_ulInvalidDriverHandle","consttype": "const PropertyContainerHandle_t", "constval": "0"} +,{ "constname": "k_unFloatPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "1"} ,{ "constname": "k_unInt32PropertyTag","consttype": "const PropertyTypeTag_t", "constval": "2"} @@ -1026,6 +1039,8 @@ ,{ "constname": "k_pch_SteamVR_ForceWindows32bitVRMonitor","consttype": "const char *const", "constval": "forceWindows32BitVRMonitor"} ,{ + "constname": "k_pch_SteamVR_DebugInput","consttype": "const char *const", "constval": "debugInput"} +,{ "constname": "k_pch_Lighthouse_Section","consttype": "const char *const", "constval": "driver_lighthouse"} ,{ "constname": "k_pch_Lighthouse_DisableIMU_Bool","consttype": "const char *const", "constval": "disableimu"} @@ -1042,6 +1057,8 @@ ,{ "constname": "k_pch_Lighthouse_EnableBluetooth_Bool","consttype": "const char *const", "constval": "enableBluetooth"} ,{ + "constname": "k_pch_Lighthouse_PowerManagedBaseStations_String","consttype": "const char *const", "constval": "PowerManagedBaseStations"} +,{ "constname": "k_pch_Null_Section","consttype": "const char *const", "constval": "driver_null"} ,{ "constname": "k_pch_Null_SerialNumber_String","consttype": "const char *const", "constval": "serialNumber"} @@ -1184,10 +1201,16 @@ ,{ "constname": "k_pch_Dashboard_ArcadeMode_Bool","consttype": "const char *const", "constval": "arcadeMode"} ,{ + "constname": "k_pch_Dashboard_EnableWebUI","consttype": "const char *const", "constval": "webUI"} +,{ "constname": "k_pch_modelskin_Section","consttype": "const char *const", "constval": "modelskins"} ,{ "constname": "k_pch_Driver_Enable_Bool","consttype": "const char *const", "constval": "enable"} ,{ + "constname": "k_pch_WebInterface_Section","consttype": "const char *const", "constval": "WebInterface"} +,{ + "constname": "k_pch_WebInterface_WebPort_String","consttype": "const char *const", "constval": "WebPort"} +,{ "constname": "IVRScreenshots_Version","consttype": "const char *const", "constval": "IVRScreenshots_001"} ,{ "constname": "IVRResources_Version","consttype": "const char *const", "constval": "IVRResources_001"} @@ -1304,7 +1327,9 @@ { "fieldname": "m_nCurrentUniverse", "fieldtype": "uint64_t"}]} ,{"struct": "vr::VREvent_Reserved_t","fields": [ { "fieldname": "reserved0", "fieldtype": "uint64_t"}, -{ "fieldname": "reserved1", "fieldtype": "uint64_t"}]} +{ "fieldname": "reserved1", "fieldtype": "uint64_t"}, +{ "fieldname": "reserved2", "fieldtype": "uint64_t"}, +{ "fieldname": "reserved3", "fieldtype": "uint64_t"}]} ,{"struct": "vr::VREvent_PerformanceTest_t","fields": [ { "fieldname": "m_nFidelityLevel", "fieldtype": "uint32_t"}]} ,{"struct": "vr::VREvent_SeatedZeroPoseReset_t","fields": [ @@ -4065,5 +4090,13 @@ { "paramname": "unBufferSize" ,"paramtype": "uint32_t"} ] } +,{ + "classname": "vr::IVRDriverManager", + "methodname": "GetDriverHandle", + "returntype": "DriverHandle_t", + "params": [ +{ "paramname": "pchDriverName" ,"paramtype": "const char *"} + ] +} ] }
\ No newline at end of file diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h index e32fb64..533ac80 100644 --- a/headers/openvr_capi.h +++ b/headers/openvr_capi.h @@ -71,6 +71,7 @@ static const unsigned int k_unTrackedDeviceIndexOther = 4294967294; static const unsigned int k_unTrackedDeviceIndexInvalid = 4294967295; static const unsigned long k_ulInvalidPropertyContainer = 0; static const unsigned int k_unInvalidPropertyTag = 0; +static const unsigned long k_ulInvalidDriverHandle = 0; static const unsigned int k_unFloatPropertyTag = 1; static const unsigned int k_unInt32PropertyTag = 2; static const unsigned int k_unUint64PropertyTag = 3; @@ -164,6 +165,7 @@ static const char * k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulk static const char * k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; static const char * k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; static const char * k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; +static const char * k_pch_SteamVR_DebugInput = "debugInput"; static const char * k_pch_Lighthouse_Section = "driver_lighthouse"; static const char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; static const char * k_pch_Lighthouse_DisableIMUExceptHMD_Bool = "disableimuexcepthmd"; @@ -172,6 +174,7 @@ static const char * k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguation static const char * k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; static const char * k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; static const char * k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; +static const char * k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; static const char * k_pch_Null_Section = "driver_null"; static const char * k_pch_Null_SerialNumber_String = "serialNumber"; static const char * k_pch_Null_ModelNumber_String = "modelNumber"; @@ -243,8 +246,11 @@ static const char * k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositor static const char * k_pch_Dashboard_Section = "dashboard"; static const char * k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; static const char * k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; +static const char * k_pch_Dashboard_EnableWebUI = "webUI"; static const char * k_pch_modelskin_Section = "modelskins"; static const char * k_pch_Driver_Enable_Bool = "enable"; +static const char * k_pch_WebInterface_Section = "WebInterface"; +static const char * k_pch_WebInterface_WebPort_String = "WebPort"; static const char * IVRScreenshots_Version = "IVRScreenshots_001"; static const char * IVRResources_Version = "IVRResources_001"; static const char * IVRDriverManager_Version = "IVRDriverManager_001"; @@ -264,6 +270,7 @@ typedef enum ETextureType ETextureType_TextureType_Vulkan = 2, ETextureType_TextureType_IOSurface = 3, ETextureType_TextureType_DirectX12 = 4, + ETextureType_TextureType_DXGISharedHandle = 5, } ETextureType; typedef enum EColorSpace @@ -297,6 +304,7 @@ typedef enum ETrackedControllerRole ETrackedControllerRole_TrackedControllerRole_Invalid = 0, ETrackedControllerRole_TrackedControllerRole_LeftHand = 1, ETrackedControllerRole_TrackedControllerRole_RightHand = 2, + ETrackedControllerRole_TrackedControllerRole_OptOut = 3, } ETrackedControllerRole; typedef enum ETrackingUniverseOrigin @@ -347,6 +355,7 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_ResourceRoot_String = 1035, ETrackedDeviceProperty_Prop_RegisteredDeviceType_String = 1036, ETrackedDeviceProperty_Prop_InputProfilePath_String = 1037, + ETrackedDeviceProperty_Prop_NeverTracked_Bool = 1038, ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000, ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001, ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002, @@ -401,9 +410,13 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, ETrackedDeviceProperty_Prop_DoNotApplyPrediction_Bool = 2054, ETrackedDeviceProperty_Prop_CameraToHeadTransforms_Matrix34_Array = 2055, + ETrackedDeviceProperty_Prop_DistortionMeshResolution_Int32 = 2056, ETrackedDeviceProperty_Prop_DriverIsDrawingControllers_Bool = 2057, ETrackedDeviceProperty_Prop_DriverRequestsApplicationPause_Bool = 2058, ETrackedDeviceProperty_Prop_DriverRequestsReducedRendering_Bool = 2059, + ETrackedDeviceProperty_Prop_MinimumIpdStepMeters_Float = 2060, + ETrackedDeviceProperty_Prop_AudioBridgeFirmwareVersion_Uint64 = 2061, + ETrackedDeviceProperty_Prop_ImageBridgeFirmwareVersion_Uint64 = 2062, ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000, ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001, ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002, @@ -530,6 +543,7 @@ typedef enum EVREventType EVREventType_VREvent_SceneFocusChanged = 405, EVREventType_VREvent_InputFocusChanged = 406, EVREventType_VREvent_SceneApplicationSecondaryRenderingStarted = 407, + EVREventType_VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, EVREventType_VREvent_HideRenderModels = 410, EVREventType_VREvent_ShowRenderModels = 411, EVREventType_VREvent_ConsoleOpened = 420, @@ -548,17 +562,18 @@ typedef enum EVREventType EVREventType_VREvent_OverlayGamepadFocusGained = 511, EVREventType_VREvent_OverlayGamepadFocusLost = 512, EVREventType_VREvent_OverlaySharedTextureChanged = 513, - EVREventType_VREvent_DashboardGuideButtonDown = 514, - EVREventType_VREvent_DashboardGuideButtonUp = 515, EVREventType_VREvent_ScreenshotTriggered = 516, EVREventType_VREvent_ImageFailed = 517, EVREventType_VREvent_DashboardOverlayCreated = 518, + EVREventType_VREvent_SwitchGamepadFocus = 519, EVREventType_VREvent_RequestScreenshot = 520, EVREventType_VREvent_ScreenshotTaken = 521, EVREventType_VREvent_ScreenshotFailed = 522, EVREventType_VREvent_SubmitScreenshotToDashboard = 523, EVREventType_VREvent_ScreenshotProgressToDashboard = 524, EVREventType_VREvent_PrimaryDashboardDeviceChanged = 525, + EVREventType_VREvent_RoomViewShown = 526, + EVREventType_VREvent_RoomViewHidden = 527, EVREventType_VREvent_Notification_Shown = 600, EVREventType_VREvent_Notification_Hidden = 601, EVREventType_VREvent_Notification_BeginInteraction = 602, @@ -817,6 +832,7 @@ typedef enum EVRInitError EVRInitError_VRInitError_Init_FirmwareUpdateBusy = 138, EVRInitError_VRInitError_Init_FirmwareRecoveryBusy = 139, EVRInitError_VRInitError_Init_USBServiceBusy = 140, + EVRInitError_VRInitError_Init_VRWebHelperStartupFailed = 141, EVRInitError_VRInitError_Driver_Failed = 200, EVRInitError_VRInitError_Driver_Unknown = 201, EVRInitError_VRInitError_Driver_HmdUnknown = 202, @@ -1160,6 +1176,7 @@ typedef uint32_t DriverId_t; typedef uint32_t TrackedDeviceIndex_t; typedef uint64_t PropertyContainerHandle_t; typedef uint32_t PropertyTypeTag_t; +typedef PropertyContainerHandle_t DriverHandle_t; typedef uint64_t VROverlayHandle_t; typedef uint64_t TrackedCameraHandle_t; typedef uint32_t ScreenshotHandle_t; @@ -1389,6 +1406,8 @@ typedef struct VREvent_Reserved_t { uint64_t reserved0; uint64_t reserved1; + uint64_t reserved2; + uint64_t reserved3; } VREvent_Reserved_t; typedef struct VREvent_PerformanceTest_t @@ -2053,6 +2072,7 @@ struct VR_IVRDriverManager_FnTable { uint32_t (OPENVR_FNTABLE_CALLTYPE *GetDriverCount)(); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetDriverName)(DriverId_t nDriver, char * pchValue, uint32_t unBufferSize); + DriverHandle_t (OPENVR_FNTABLE_CALLTYPE *GetDriverHandle)(char * pchDriverName); }; diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h index 301cd37..590619f 100644 --- a/headers/openvr_driver.h +++ b/headers/openvr_driver.h @@ -112,6 +112,8 @@ enum ETextureType TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure + TextureType_DXGISharedHandle = 5, // Handle is a HANDLE DXGI share handle, only supported for Overlay render targets. + // this texture is used directly by our renderer, so only perform atomic (copyresource or resolve) on it }; enum EColorSpace @@ -173,6 +175,7 @@ enum ETrackedControllerRole TrackedControllerRole_Invalid = 0, // Invalid value for controller type TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand + TrackedControllerRole_OptOut = 3, // Tracked device is opting out of left/right hand selection }; @@ -206,6 +209,9 @@ typedef uint32_t PropertyTypeTag_t; static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0; static const PropertyTypeTag_t k_unInvalidPropertyTag = 0; +typedef PropertyContainerHandle_t DriverHandle_t; +static const PropertyContainerHandle_t k_ulInvalidDriverHandle = 0; + // Use these tags to set/get common types as struct properties static const PropertyTypeTag_t k_unFloatPropertyTag = 1; static const PropertyTypeTag_t k_unInt32PropertyTag = 2; @@ -274,6 +280,7 @@ enum ETrackedDeviceProperty Prop_ResourceRoot_String = 1035, Prop_RegisteredDeviceType_String = 1036, Prop_InputProfilePath_String = 1037, // input profile to use for this device in the input system. Will default to tracking system name if this isn't provided + Prop_NeverTracked_Bool = 1038, // Used for devices that will never have a valid pose by design // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -330,9 +337,13 @@ enum ETrackedDeviceProperty Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded Prop_DoNotApplyPrediction_Bool = 2054, Prop_CameraToHeadTransforms_Matrix34_Array = 2055, + Prop_DistortionMeshResolution_Int32 = 2056, // custom resolution of compositor calls to IVRSystem::ComputeDistortion Prop_DriverIsDrawingControllers_Bool = 2057, Prop_DriverRequestsApplicationPause_Bool = 2058, Prop_DriverRequestsReducedRendering_Bool = 2059, + Prop_MinimumIpdStepMeters_Float = 2060, + Prop_AudioBridgeFirmwareVersion_Uint64 = 2061, + Prop_ImageBridgeFirmwareVersion_Uint64 = 2062, // Properties that are unique to TrackedDeviceClass_Controller Prop_AttachedDeviceId_String = 3000, @@ -554,6 +565,7 @@ enum EVREventType VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene VREvent_InputFocusChanged = 406, // data is process VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, // data is process VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility @@ -575,11 +587,12 @@ enum EVREventType VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else VREvent_OverlaySharedTextureChanged = 513, - VREvent_DashboardGuideButtonDown = 514, - VREvent_DashboardGuideButtonUp = 515, + //VREvent_DashboardGuideButtonDown = 514, // These are no longer sent + //VREvent_DashboardGuideButtonUp = 515, VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load VREvent_DashboardOverlayCreated = 518, + VREvent_SwitchGamepadFocus = 519, // Screenshot API VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot @@ -589,6 +602,8 @@ enum EVREventType VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted VREvent_PrimaryDashboardDeviceChanged = 525, + VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled + VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, @@ -823,6 +838,8 @@ struct VREvent_Reserved_t { uint64_t reserved0; uint64_t reserved1; + uint64_t reserved2; + uint64_t reserved3; }; struct VREvent_PerformanceTest_t @@ -1185,6 +1202,7 @@ enum EVRInitError VRInitError_Init_FirmwareUpdateBusy = 138, VRInitError_Init_FirmwareRecoveryBusy = 139, VRInitError_Init_USBServiceBusy = 140, + VRInitError_Init_VRWebHelperStartupFailed = 141, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1549,6 +1567,7 @@ namespace vr static const char * const k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; static const char * const k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; + static const char * const k_pch_SteamVR_DebugInput = "debugInput"; //----------------------------------------------------------------------------- // lighthouse keys @@ -1560,6 +1579,7 @@ namespace vr static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; + static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; //----------------------------------------------------------------------------- // null keys @@ -1661,6 +1681,7 @@ namespace vr static const char * const k_pch_Dashboard_Section = "dashboard"; static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + static const char * const k_pch_Dashboard_EnableWebUI = "webUI"; //----------------------------------------------------------------------------- // model skin keys @@ -1670,6 +1691,11 @@ namespace vr // driver keys - These could be checked in any driver_<name> section static const char * const k_pch_Driver_Enable_Bool = "enable"; + //----------------------------------------------------------------------------- + // web interface keys + static const char* const k_pch_WebInterface_Section = "WebInterface"; + static const char* const k_pch_WebInterface_WebPort_String = "WebPort"; + } // namespace vr // iservertrackeddevicedriver.h @@ -1858,7 +1884,14 @@ namespace vr // ----------------------------------- /** Specific to Oculus compositor support, textures supplied must be created using this method. */ - virtual void CreateSwapTextureSet( uint32_t unPid, uint32_t unFormat, uint32_t unWidth, uint32_t unHeight, vr::SharedTextureHandle_t( *pSharedTextureHandles )[ 3 ] ) {} + struct SwapTextureSetDesc_t + { + uint32_t nWidth; + uint32_t nHeight; + uint32_t nFormat; + uint32_t nSampleCount; + }; + virtual void CreateSwapTextureSet( uint32_t unPid, const SwapTextureSetDesc_t *pSwapTextureSetDesc, vr::SharedTextureHandle_t( *pSharedTextureHandles )[ 3 ] ) {} /** Used to textures created using CreateSwapTextureSet. Only one of the set's handles needs to be used to destroy the entire set. */ virtual void DestroySwapTextureSet( vr::SharedTextureHandle_t sharedTextureHandle ) {} @@ -1871,7 +1904,18 @@ namespace vr /** Call once per layer to draw for this frame. One shared texture handle per eye. Textures must be created * using CreateSwapTextureSet and should be alternated per frame. Call Present once all layers have been submitted. */ - virtual void SubmitLayer( vr::SharedTextureHandle_t sharedTextureHandles[ 2 ], const vr::VRTextureBounds_t( &bounds )[ 2 ], const vr::HmdMatrix34_t *pPose ) {} + struct SubmitLayerPerEye_t + { + // Shared texture handles (depth not always provided). + vr::SharedTextureHandle_t hTexture, hDepthTexture; + + // Valid region of provided texture (and depth). + vr::VRTextureBounds_t bounds; + + // Projection matrix used to render the depth buffer. + vr::HmdMatrix44_t mProjection; + }; + virtual void SubmitLayer( const SubmitLayerPerEye_t( &perEye )[ 2 ], const vr::HmdMatrix34_t *pPose ) {} /** Submits queued layers for display. */ virtual void Present( vr::SharedTextureHandle_t syncTexture ) {} @@ -1883,7 +1927,7 @@ namespace vr virtual void GetFrameTiming( DriverDirectMode_FrameTiming *pFrameTiming ) {} }; - static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_004"; + static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_005"; } @@ -1939,7 +1983,6 @@ namespace vr class ITrackedDeviceServerDriver; struct TrackedDeviceDriverInfo_t; struct DriverPose_t; -typedef PropertyContainerHandle_t DriverHandle_t; /** This interface is provided by vrserver to allow the driver to notify * the system when something changes about a device. These changes must @@ -2646,6 +2689,8 @@ public: /** Returns the length of the number of bytes necessary to hold this string including the trailing null. */ virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0; }; static const char * const IVRDriverManager_Version = "IVRDriverManager_001"; diff --git a/lib/linux32/libopenvr_api.so b/lib/linux32/libopenvr_api.so Binary files differindex 3707af1..65d7c0f 100755 --- a/lib/linux32/libopenvr_api.so +++ b/lib/linux32/libopenvr_api.so diff --git a/lib/linux64/libopenvr_api.so b/lib/linux64/libopenvr_api.so Binary files differindex 9501b7c..58ed73c 100755 --- a/lib/linux64/libopenvr_api.so +++ b/lib/linux64/libopenvr_api.so diff --git a/samples/bin/linux64/libopenvr_api.so b/samples/bin/linux64/libopenvr_api.so Binary files differindex bd4d32a..60ea805 100644 --- a/samples/bin/linux64/libopenvr_api.so +++ b/samples/bin/linux64/libopenvr_api.so diff --git a/samples/bin/osx32/libopenvr_api.dylib b/samples/bin/osx32/libopenvr_api.dylib Binary files differindex 0640d5b..9559c69 100644 --- a/samples/bin/osx32/libopenvr_api.dylib +++ b/samples/bin/osx32/libopenvr_api.dylib diff --git a/samples/bin/win32/openvr_api.dll b/samples/bin/win32/openvr_api.dll Binary files differindex f7f7df7..7f7f5eb 100644 --- a/samples/bin/win32/openvr_api.dll +++ b/samples/bin/win32/openvr_api.dll diff --git a/samples/bin/win64/openvr_api.dll b/samples/bin/win64/openvr_api.dll Binary files differindex c953923..6ae4795 100644 --- a/samples/bin/win64/openvr_api.dll +++ b/samples/bin/win64/openvr_api.dll diff --git a/samples/driver_sample/driverlog.cpp b/samples/driver_sample/driverlog.cpp index a635aac..08a1510 100644 --- a/samples/driver_sample/driverlog.cpp +++ b/samples/driver_sample/driverlog.cpp @@ -7,6 +7,9 @@ static vr::IVRDriverLog * s_pLogFile = NULL; +#if !defined( WIN32) +#define vsnprintf_s vsnprintf +#endif bool InitDriverLog( vr::IVRDriverLog *pDriverLog ) { @@ -24,11 +27,7 @@ void CleanupDriverLog() static void DriverLogVarArgs( const char *pMsgFormat, va_list args ) { char buf[1024]; -#if defined( WIN32 ) - vsprintf_s( buf, pMsgFormat, args ); -#else - vsnprintf( buf, sizeof(buf), pMsgFormat, args ); -#endif + vsnprintf_s( buf, sizeof(buf), pMsgFormat, args ); if( s_pLogFile ) s_pLogFile->Log( buf ); diff --git a/samples/hellovr_dx12/hellovr_dx12_main.cpp b/samples/hellovr_dx12/hellovr_dx12_main.cpp index 6e067a0..64dc99e 100644 --- a/samples/hellovr_dx12/hellovr_dx12_main.cpp +++ b/samples/hellovr_dx12/hellovr_dx12_main.cpp @@ -45,54 +45,12 @@ enum CBVSRVIndex_t SRV_TEXTURE_MAP, // Slot for texture in each possible render model SRV_TEXTURE_RENDER_MODEL0, - SRV_TEXTURE_RENDER_MODEL1, - SRV_TEXTURE_RENDER_MODEL2, - SRV_TEXTURE_RENDER_MODEL3, - SRV_TEXTURE_RENDER_MODEL4, - SRV_TEXTURE_RENDER_MODEL5, - SRV_TEXTURE_RENDER_MODEL6, - SRV_TEXTURE_RENDER_MODEL7, - SRV_TEXTURE_RENDER_MODEL8, - SRV_TEXTURE_RENDER_MODEL9, - SRV_TEXTURE_RENDER_MODEL10, - SRV_TEXTURE_RENDER_MODEL11, - SRV_TEXTURE_RENDER_MODEL12, - SRV_TEXTURE_RENDER_MODEL13, - SRV_TEXTURE_RENDER_MODEL14, - SRV_TEXTURE_RENDER_MODEL15, + SRV_TEXTURE_RENDER_MODEL_MAX = SRV_TEXTURE_RENDER_MODEL0 + vr::k_unMaxTrackedDeviceCount, // Slot for transform in each possible rendermodel CBV_LEFT_EYE_RENDER_MODEL0, - CBV_LEFT_EYE_RENDER_MODEL1, - CBV_LEFT_EYE_RENDER_MODEL2, - CBV_LEFT_EYE_RENDER_MODEL3, - CBV_LEFT_EYE_RENDER_MODEL4, - CBV_LEFT_EYE_RENDER_MODEL5, - CBV_LEFT_EYE_RENDER_MODEL6, - CBV_LEFT_EYE_RENDER_MODEL7, - CBV_LEFT_EYE_RENDER_MODEL8, - CBV_LEFT_EYE_RENDER_MODEL9, - CBV_LEFT_EYE_RENDER_MODEL10, - CBV_LEFT_EYE_RENDER_MODEL11, - CBV_LEFT_EYE_RENDER_MODEL12, - CBV_LEFT_EYE_RENDER_MODEL13, - CBV_LEFT_EYE_RENDER_MODEL14, - CBV_LEFT_EYE_RENDER_MODEL15, + CBV_LEFT_EYE_RENDER_MODEL_MAX = CBV_LEFT_EYE_RENDER_MODEL0 + vr::k_unMaxTrackedDeviceCount, CBV_RIGHT_EYE_RENDER_MODEL0, - CBV_RIGHT_EYE_RENDER_MODEL1, - CBV_RIGHT_EYE_RENDER_MODEL2, - CBV_RIGHT_EYE_RENDER_MODEL3, - CBV_RIGHT_EYE_RENDER_MODEL4, - CBV_RIGHT_EYE_RENDER_MODEL5, - CBV_RIGHT_EYE_RENDER_MODEL6, - CBV_RIGHT_EYE_RENDER_MODEL7, - CBV_RIGHT_EYE_RENDER_MODEL8, - CBV_RIGHT_EYE_RENDER_MODEL9, - CBV_RIGHT_EYE_RENDER_MODEL10, - CBV_RIGHT_EYE_RENDER_MODEL11, - CBV_RIGHT_EYE_RENDER_MODEL12, - CBV_RIGHT_EYE_RENDER_MODEL13, - CBV_RIGHT_EYE_RENDER_MODEL14, - CBV_RIGHT_EYE_RENDER_MODEL15, + CBV_RIGHT_EYE_RENDER_MODEL_MAX = CBV_RIGHT_EYE_RENDER_MODEL0 + vr::k_unMaxTrackedDeviceCount, NUM_SRV_CBVS }; @@ -1529,7 +1487,7 @@ void CMainApplication::UpdateControllerAxes() } // Update the VB data - if ( m_pControllerAxisVertexBuffer ) + if ( m_pControllerAxisVertexBuffer && vertdataarray.size() > 0 ) { UINT8 *pMappedBuffer; CD3DX12_RANGE readRange( 0, 0 ); @@ -2283,5 +2241,7 @@ int main(int argc, char *argv[]) pMainApplication->Shutdown(); + delete pMainApplication; + return 0; } diff --git a/samples/shared/pathtools.cpp b/samples/shared/pathtools.cpp index da2e8ce..89db4e0 100644 --- a/samples/shared/pathtools.cpp +++ b/samples/shared/pathtools.cpp @@ -189,11 +189,8 @@ bool Path_IsAbsolute( const std::string & sPath ) /** Makes an absolute path from a relative path and a base path */ -std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath, char slash ) +std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath ) { - if( slash == 0 ) - slash = Path_GetSlash(); - if( Path_IsAbsolute( sRelativePath ) ) return sRelativePath; else @@ -201,7 +198,7 @@ std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::str if( !Path_IsAbsolute( sBasePath ) ) return ""; - std::string sCompacted = Path_Compact( Path_Join( sBasePath, sRelativePath, slash ), slash ); + std::string sCompacted = Path_Compact( Path_Join( sBasePath, sRelativePath ) ); if( Path_IsAbsolute( sCompacted ) ) return sCompacted; else diff --git a/samples/shared/pathtools.h b/samples/shared/pathtools.h index 7c34a71..e2b688f 100644 --- a/samples/shared/pathtools.h +++ b/samples/shared/pathtools.h @@ -35,7 +35,7 @@ std::string Path_GetExtension( const std::string & sPath ); bool Path_IsAbsolute( const std::string & sPath ); /** Makes an absolute path from a relative path and a base path */ -std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath, char slash = 0 ); +std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath ); /** Fixes the directory separators for the current platform. * If slash is unspecified the native path separator of the current platform diff --git a/src/vrcommon/hmderrors_public.cpp b/src/vrcommon/hmderrors_public.cpp index cac9b90..5a21742 100644 --- a/src/vrcommon/hmderrors_public.cpp +++ b/src/vrcommon/hmderrors_public.cpp @@ -147,6 +147,8 @@ const char *GetIDForVRInitError( vr::EVRInitError eError ) RETURN_ENUM_AS_STRING( VRInitError_Init_NotSupportedWithCompositor ); RETURN_ENUM_AS_STRING( VRInitError_Init_NotAvailableToUtilityApps ); RETURN_ENUM_AS_STRING( VRInitError_Init_Internal ); + RETURN_ENUM_AS_STRING( VRInitError_Init_HmdDriverIdIsNone ); + RETURN_ENUM_AS_STRING( VRInitError_Init_HmdNotFoundPresenceFailed ); RETURN_ENUM_AS_STRING( VRInitError_Init_VRMonitorNotFound ); RETURN_ENUM_AS_STRING( VRInitError_Init_VRMonitorStartupFailed ); RETURN_ENUM_AS_STRING( VRInitError_Init_LowPowerWatchdogNotSupported ); @@ -161,9 +163,7 @@ const char *GetIDForVRInitError( vr::EVRInitError eError ) RETURN_ENUM_AS_STRING( VRInitError_Init_FirmwareUpdateBusy ); RETURN_ENUM_AS_STRING( VRInitError_Init_FirmwareRecoveryBusy ); RETURN_ENUM_AS_STRING( VRInitError_Init_USBServiceBusy ); - - RETURN_ENUM_AS_STRING( VRInitError_Init_HmdDriverIdIsNone ); - RETURN_ENUM_AS_STRING( VRInitError_Init_HmdNotFoundPresenceFailed ); + RETURN_ENUM_AS_STRING( VRInitError_Init_VRWebHelperStartupFailed ); RETURN_ENUM_AS_STRING( VRInitError_Driver_Failed ); RETURN_ENUM_AS_STRING( VRInitError_Driver_Unknown ); diff --git a/src/vrcommon/pathtools_public.cpp b/src/vrcommon/pathtools_public.cpp index 885b204..67d2f4e 100644 --- a/src/vrcommon/pathtools_public.cpp +++ b/src/vrcommon/pathtools_public.cpp @@ -188,11 +188,8 @@ bool Path_IsAbsolute( const std::string & sPath ) /** Makes an absolute path from a relative path and a base path */ -std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath, char slash ) +std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath ) { - if( slash == 0 ) - slash = Path_GetSlash(); - if( Path_IsAbsolute( sRelativePath ) ) return sRelativePath; else @@ -200,7 +197,7 @@ std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::str if( !Path_IsAbsolute( sBasePath ) ) return ""; - std::string sCompacted = Path_Compact( Path_Join( sBasePath, sRelativePath, slash ), slash ); + std::string sCompacted = Path_Compact( Path_Join( sBasePath, sRelativePath ) ); if( Path_IsAbsolute( sCompacted ) ) return sCompacted; else diff --git a/src/vrcommon/pathtools_public.h b/src/vrcommon/pathtools_public.h index 13cb0d1..c13e4d7 100644 --- a/src/vrcommon/pathtools_public.h +++ b/src/vrcommon/pathtools_public.h @@ -35,7 +35,7 @@ std::string Path_GetExtension( const std::string & sPath ); bool Path_IsAbsolute( const std::string & sPath ); /** Makes an absolute path from a relative path and a base path */ -std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath, char slash = 0 ); +std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath ); /** Fixes the directory separators for the current platform. * If slash is unspecified the native path separator of the current platform |