diff --git a/src/tabcontrollers/SteamVRTabController.cpp b/src/tabcontrollers/SteamVRTabController.cpp index d13e198..8da4f27 100644 --- a/src/tabcontrollers/SteamVRTabController.cpp +++ b/src/tabcontrollers/SteamVRTabController.cpp @@ -7,6 +7,16 @@ namespace vr // this was removed from openvr_api.h in 1.0.8 static const char* const k_pch_SteamVR_RenderTargetMultiplier_Float = "renderTargetMultiplier"; + +// This was removed when updating from an unknown version to OpenVR +// version 1.1.3. This should probably be removed along with any features +// connected to it. Valve probably removed it for a reason. +static const char* const k_pch_SteamVR_AllowAsyncReprojection_Bool + = "allowAsyncReprojection"; +static const char* const k_pch_SteamVR_AllowReprojection_Bool + = "allowInterleavedReprojection"; +static const char* const k_pch_SteamVR_ForceReprojection_Bool + = "forceReprojection"; } // namespace vr // application namespace diff --git a/third-party/openvr/bin/linux32/libopenvr_api.so b/third-party/openvr/bin/linux32/libopenvr_api.so index 01c0b24..3c0d73c 100644 Binary files a/third-party/openvr/bin/linux32/libopenvr_api.so and b/third-party/openvr/bin/linux32/libopenvr_api.so differ diff --git a/third-party/openvr/bin/linux32/libopenvr_api.so.dbg b/third-party/openvr/bin/linux32/libopenvr_api.so.dbg index b3885db..530371e 100644 Binary files a/third-party/openvr/bin/linux32/libopenvr_api.so.dbg and b/third-party/openvr/bin/linux32/libopenvr_api.so.dbg differ diff --git a/third-party/openvr/bin/linux64/libopenvr_api.so b/third-party/openvr/bin/linux64/libopenvr_api.so index 60ea805..46dac9e 100644 Binary files a/third-party/openvr/bin/linux64/libopenvr_api.so and b/third-party/openvr/bin/linux64/libopenvr_api.so differ diff --git a/third-party/openvr/bin/linux64/libopenvr_api.so.dbg b/third-party/openvr/bin/linux64/libopenvr_api.so.dbg index 29aae11..e9407f1 100644 Binary files a/third-party/openvr/bin/linux64/libopenvr_api.so.dbg and b/third-party/openvr/bin/linux64/libopenvr_api.so.dbg differ diff --git a/third-party/openvr/bin/osx32/libopenvr_api.dylib b/third-party/openvr/bin/osx32/libopenvr_api.dylib index 9559c69..2e59051 100644 Binary files a/third-party/openvr/bin/osx32/libopenvr_api.dylib and b/third-party/openvr/bin/osx32/libopenvr_api.dylib differ diff --git a/third-party/openvr/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib b/third-party/openvr/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib index b59626c..98a4503 100644 Binary files a/third-party/openvr/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib and b/third-party/openvr/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib differ diff --git a/third-party/openvr/bin/win32/openvr_api.dll b/third-party/openvr/bin/win32/openvr_api.dll index 7f7f5eb..c440068 100644 Binary files a/third-party/openvr/bin/win32/openvr_api.dll and b/third-party/openvr/bin/win32/openvr_api.dll differ diff --git a/third-party/openvr/bin/win32/openvr_api.pdb b/third-party/openvr/bin/win32/openvr_api.pdb index 397eba9..6edb41d 100644 Binary files a/third-party/openvr/bin/win32/openvr_api.pdb and b/third-party/openvr/bin/win32/openvr_api.pdb differ diff --git a/third-party/openvr/bin/win64/openvr_api.dll b/third-party/openvr/bin/win64/openvr_api.dll index 6ae4795..f4ddebd 100644 Binary files a/third-party/openvr/bin/win64/openvr_api.dll and b/third-party/openvr/bin/win64/openvr_api.dll differ diff --git a/third-party/openvr/bin/win64/openvr_api.pdb b/third-party/openvr/bin/win64/openvr_api.pdb index 1b007cc..168480c 100644 Binary files a/third-party/openvr/bin/win64/openvr_api.pdb and b/third-party/openvr/bin/win64/openvr_api.pdb differ diff --git a/third-party/openvr/headers/openvr.h b/third-party/openvr/headers/openvr.h index 124636b..c5ffe72 100644 --- a/third-party/openvr/headers/openvr.h +++ b/third-party/openvr/headers/openvr.h @@ -11,6 +11,14 @@ +// version.h +namespace vr +{ + static const uint32_t k_nSteamVRVersionMajor = 1; + static const uint32_t k_nSteamVRVersionMinor = 1; + static const uint32_t k_nSteamVRVersionBuild = 3; +} // namespace vr + // vrtypes.h #ifndef _INCLUDE_VRTYPES_H #define _INCLUDE_VRTYPES_H @@ -29,6 +37,10 @@ namespace vr { #pragma pack( push, 8 ) +/** A handle for a spatial anchor. This handle is only valid during the session it was created in. +* Anchors that live beyond one session should be saved by their string descriptors. */ +typedef uint32_t SpatialAnchorHandle_t; + typedef void* glSharedTextureHandle_t; typedef int32_t glInt_t; typedef uint32_t glUInt_t; @@ -43,6 +55,11 @@ struct HmdMatrix34_t float m[3][4]; }; +struct HmdMatrix33_t +{ + float m[3][3]; +}; + struct HmdMatrix44_t { float m[4][4]; @@ -73,6 +90,11 @@ struct HmdQuaternion_t double w, x, y, z; }; +struct HmdQuaternionf_t +{ + float w, x, y, z; +}; + struct HmdColor_t { float r, g, b, a; @@ -107,13 +129,17 @@ enum EVREye enum ETextureType { + TextureType_Invalid = -1, // Handle has been invalidated TextureType_DirectX = 0, // Handle is an ID3D11Texture TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure - TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef + TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef, deprecated in favor of TextureType_Metal on supported platforms 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 + TextureType_Metal = 6, // Handle is a MTLTexture conforming to the MTLSharedTexture protocol. Textures submitted to IVRCompositor::Submit which + // are of type MTLTextureType2DArray assume layer 0 is the left eye texture (vr::EVREye::Eye_left), layer 1 is the right + // eye texture (vr::EVREye::Eye_Right) }; enum EColorSpace @@ -143,6 +169,8 @@ enum ETrackingResult TrackingResult_Running_OK = 200, TrackingResult_Running_OutOfRange = 201, + + TrackingResult_Fallback_RotationOnly = 300, }; typedef uint32_t DriverId_t; @@ -166,6 +194,8 @@ enum ETrackedDeviceClass TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points TrackedDeviceClass_DisplayRedirect = 5, // Accessories that aren't necessarily tracked themselves, but may redirect video output from other tracked devices + + TrackedDeviceClass_Max }; @@ -176,9 +206,26 @@ enum ETrackedControllerRole 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 + TrackedControllerRole_Treadmill = 4, // Tracked device is a treadmill + TrackedControllerRole_Max = 4 }; +/** Returns true if the tracked controller role is allowed to be a hand */ +inline bool IsRoleAllowedAsHand( ETrackedControllerRole eRole ) +{ + switch ( eRole ) + { + case TrackedControllerRole_Invalid: + case TrackedControllerRole_LeftHand: + case TrackedControllerRole_RightHand: + return true; + default: + return false; + } +} + + /** describes a single pose for a tracked object */ struct TrackedDevicePose_t { @@ -202,6 +249,9 @@ enum ETrackingUniverseOrigin TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. }; +typedef uint64_t WebConsoleHandle_t; +#define INVALID_WEB_CONSOLE_HANDLE ((vr::WebConsoleHandle_t)0) + // Refers to a single container of properties typedef uint64_t PropertyContainerHandle_t; typedef uint32_t PropertyTypeTag_t; @@ -223,6 +273,8 @@ static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20; static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21; static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; +static const PropertyTypeTag_t k_unHmdVector2PropertyTag = 24; +static const PropertyTypeTag_t k_unHmdQuadPropertyTag = 25; static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; static const PropertyTypeTag_t k_unPathHandleInfoTag = 31; @@ -230,6 +282,10 @@ static const PropertyTypeTag_t k_unActionPropertyTag = 32; static const PropertyTypeTag_t k_unInputValuePropertyTag = 33; static const PropertyTypeTag_t k_unWildcardPropertyTag = 34; static const PropertyTypeTag_t k_unHapticVibrationPropertyTag = 35; +static const PropertyTypeTag_t k_unSkeletonPropertyTag = 36; + +static const PropertyTypeTag_t k_unSpatialAnchorPosePropertyTag = 40; +static const PropertyTypeTag_t k_unJsonPropertyTag = 41; static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; @@ -281,6 +337,11 @@ enum ETrackedDeviceProperty 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 + Prop_NumCameras_Int32 = 1039, + Prop_CameraFrameLayout_Int32 = 1040, // EVRTrackedCameraFrameLayout value + Prop_CameraStreamFormat_Int32 = 1041, // ECameraVideoStreamFormat value + Prop_AdditionalDeviceSettingsPath_String = 1042, // driver-relative path to additional device and global configuration settings + Prop_Identifiable_Bool = 1043, // Whether device supports being identified from vrmonitor (e.g. blink LED, vibrate haptics, etc) // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -344,6 +405,24 @@ enum ETrackedDeviceProperty Prop_MinimumIpdStepMeters_Float = 2060, Prop_AudioBridgeFirmwareVersion_Uint64 = 2061, Prop_ImageBridgeFirmwareVersion_Uint64 = 2062, + Prop_ImuToHeadTransform_Matrix34 = 2063, + Prop_ImuFactoryGyroBias_Vector3 = 2064, + Prop_ImuFactoryGyroScale_Vector3 = 2065, + Prop_ImuFactoryAccelerometerBias_Vector3 = 2066, + Prop_ImuFactoryAccelerometerScale_Vector3 = 2067, + // reserved 2068 + Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069, + + // Driver requested mura correction properties + Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, + Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, + Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, + Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203, + Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204, + Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205, + Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206, + Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, + Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, // Properties that are unique to TrackedDeviceClass_Controller Prop_AttachedDeviceId_String = 3000, @@ -388,10 +467,12 @@ enum ETrackedDeviceProperty Prop_HasCameraComponent_Bool = 6004, Prop_HasDriverDirectModeComponent_Bool = 6005, Prop_HasVirtualDisplayComponent_Bool = 6006, + Prop_HasSpatialAnchorsSupport_Bool = 6007, // Properties that are set internally based on other information provided by drivers Prop_ControllerType_String = 7000, Prop_LegacyInputProfile_String = 7001, + Prop_ControllerHandSelectionPriority_Int32 = 7002, // Allows hand assignments to prefer some controllers over others. High numbers are selected over low numbers // Vendors are free to expose private debug data in this reserved region Prop_VendorSpecific_Reserved_Start = 10000, @@ -419,8 +500,19 @@ enum ETrackedPropertyError TrackedProp_PermissionDenied = 10, TrackedProp_InvalidOperation = 11, TrackedProp_CannotWriteToWildcards = 12, + TrackedProp_IPCReadFailure = 13, }; + +typedef uint64_t VRActionHandle_t; +typedef uint64_t VRActionSetHandle_t; +typedef uint64_t VRInputValueHandle_t; + +static const VRActionHandle_t k_ulInvalidActionHandle = 0; +static const VRActionSetHandle_t k_ulInvalidActionSetHandle = 0; +static const VRInputValueHandle_t k_ulInvalidInputValueHandle = 0; + + /** Allows the application to control what part of the provided texture will be used in the * frame buffer. */ struct VRTextureBounds_t @@ -479,7 +571,8 @@ enum EVRSubmitFlags }; /** Data required for passing Vulkan textures to IVRCompositor::Submit. -* Be sure to call OpenVR_Shutdown before destroying these resources. */ +* Be sure to call OpenVR_Shutdown before destroying these resources. +* Please see https://github.com/ValveSoftware/openvr/wiki/Vulkan for Vulkan-specific documentation */ struct VRVulkanTextureData_t { uint64_t m_nImage; // VkImage @@ -556,6 +649,7 @@ enum EVREventType VREvent_Scroll = 305, // data is mouse VREvent_TouchPadMove = 306, // data is mouse VREvent_OverlayFocusChanged = 307, // data is overlay, global event + VREvent_ReloadOverlays = 308, VREvent_InputFocusCaptured = 400, // data is process DEPRECATED VREvent_InputFocusReleased = 401, // data is process DEPRECATED @@ -566,6 +660,7 @@ enum EVREventType VREvent_InputFocusChanged = 406, // data is process VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, // data is process + VREvent_ActionBindingReloaded = 409, // data is process - The App that action binds reloaded for 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 @@ -604,6 +699,7 @@ enum EVREventType 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_ShowUI = 528, // data is showUi VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, @@ -616,11 +712,12 @@ enum EVREventType VREvent_QuitAcknowledged = 703, // data is process VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down - VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneDataHasChanged = 800, // Sent when the process needs to call VRChaperone()->ReloadInfo() VREvent_ChaperoneUniverseHasChanged = 801, VREvent_ChaperoneTempDataHasChanged = 802, VREvent_ChaperoneSettingsHaveChanged = 803, VREvent_SeatedZeroPoseReset = 804, + VREvent_ChaperoneFlushCache = 805, // Sent when the process needs to reload any cached data it retrieved from VRChaperone() VREvent_AudioSettingsHaveChanged = 820, @@ -640,6 +737,8 @@ enum EVREventType VREvent_PerfSectionSettingChanged = 863, VREvent_DashboardSectionSettingChanged = 864, VREvent_WebInterfaceSectionSettingChanged = 865, + VREvent_TrackersSectionSettingChanged = 866, + VREvent_LastKnownSectionSettingChanged = 867, VREvent_StatusUpdate = 900, @@ -682,6 +781,17 @@ enum EVREventType VREvent_MessageOverlayCloseRequested = 1651, VREvent_Input_HapticVibration = 1700, // data is hapticVibration + VREvent_Input_BindingLoadFailed = 1701, // data is inputBinding + VREvent_Input_BindingLoadSuccessful = 1702, // data is inputBinding + VREvent_Input_ActionManifestReloaded = 1703, // no data + VREvent_Input_ActionManifestLoadFailed = 1704, // data is actionManifest + VREvent_Input_ProgressUpdate = 1705, // data is progressUpdate + VREvent_Input_TrackerActivated = 1706, + + VREvent_SpatialAnchors_PoseUpdated = 1800, // data is spatialAnchor. broadcast + VREvent_SpatialAnchors_DescriptorUpdated = 1801, // data is spatialAnchor. broadcast + VREvent_SpatialAnchors_RequestPoseUpdate = 1802, // data is spatialAnchor. sent to specific driver + VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, // data is spatialAnchor. sent to specific driver // Vendors are free to expose private events in this reserved region VREvent_VendorSpecific_Reserved_Start = 10000, @@ -730,6 +840,10 @@ enum EVRButtonId k_EButton_Dashboard_Back = k_EButton_Grip, + k_EButton_Knuckles_A = k_EButton_Grip, + k_EButton_Knuckles_B = k_EButton_ApplicationMenu, + k_EButton_Knuckles_JoyStick = k_EButton_Axis3, + k_EButton_Max = 64 }; @@ -806,6 +920,7 @@ struct VREvent_Process_t struct VREvent_Overlay_t { uint64_t overlayHandle; + uint64_t devicePath; }; @@ -840,6 +955,8 @@ struct VREvent_Reserved_t uint64_t reserved1; uint64_t reserved2; uint64_t reserved3; + uint64_t reserved4; + uint64_t reserved5; }; struct VREvent_PerformanceTest_t @@ -908,8 +1025,54 @@ struct VREvent_HapticVibration_t float fAmplitude; }; +struct VREvent_WebConsole_t +{ + WebConsoleHandle_t webConsoleHandle; +}; + +struct VREvent_InputBindingLoad_t +{ + vr::PropertyContainerHandle_t ulAppContainer; + uint64_t pathMessage; + uint64_t pathUrl; + uint64_t pathControllerType; +}; + +struct VREvent_InputActionManifestLoad_t +{ + uint64_t pathAppKey; + uint64_t pathMessage; + uint64_t pathMessageParam; + uint64_t pathManifestPath; +}; + +struct VREvent_SpatialAnchor_t +{ + SpatialAnchorHandle_t unHandle; +}; + +struct VREvent_ProgressUpdate_t +{ + uint64_t ulApplicationPropertyContainer; + uint64_t pathDevice; + uint64_t pathInputSource; + uint64_t pathProgressAction; + uint64_t pathIcon; + float fProgress; +}; + +enum EShowUIType +{ + ShowUI_ControllerBinding = 0, + ShowUI_ManageTrackers = 1, + ShowUI_QuickStart = 2, +}; + +struct VREvent_ShowUI_t +{ + EShowUIType eType; +}; -/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ typedef union { VREvent_Reserved_t reserved; @@ -934,6 +1097,13 @@ typedef union VREvent_Property_t property; VREvent_DualAnalog_t dualAnalog; VREvent_HapticVibration_t hapticVibration; + VREvent_WebConsole_t webConsole; + VREvent_InputBindingLoad_t inputBinding; + VREvent_InputActionManifestLoad_t actionManifest; + VREvent_SpatialAnchor_t spatialAnchor; + VREvent_ProgressUpdate_t progressUpdate; + VREvent_ShowUI_t showUi; + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ } VREvent_Data_t; @@ -969,8 +1139,33 @@ enum EVRInputError VRInputError_IPCError = 7, VRInputError_NoActiveActionSet = 8, VRInputError_InvalidDevice = 9, + VRInputError_InvalidSkeleton = 10, + VRInputError_InvalidBoneCount = 11, + VRInputError_InvalidCompressedData = 12, + VRInputError_NoData = 13, + VRInputError_BufferTooSmall = 14, + VRInputError_MismatchedActionManifest = 15, + VRInputError_MissingSkeletonData = 16, + VRInputError_InvalidBoneIndex = 17, }; +enum EVRSpatialAnchorError +{ + VRSpatialAnchorError_Success = 0, + VRSpatialAnchorError_Internal = 1, + VRSpatialAnchorError_UnknownHandle = 2, + VRSpatialAnchorError_ArrayTooSmall = 3, + VRSpatialAnchorError_InvalidDescriptorChar = 4, + VRSpatialAnchorError_NotYetAvailable = 5, + VRSpatialAnchorError_NotAvailableInThisUniverse = 6, + VRSpatialAnchorError_PermanentlyUnavailable = 7, + VRSpatialAnchorError_WrongDriver = 8, + VRSpatialAnchorError_DescriptorTooLong = 9, + VRSpatialAnchorError_Unknown = 10, + VRSpatialAnchorError_NoRoomCalibration = 11, + VRSpatialAnchorError_InvalidArgument = 12, + VRSpatialAnchorError_UnknownDriver = 13, +}; /** The mesh to draw into the stencil (or depth) buffer to perform * early stencil (or depth) kills of pixels that will never appear on the HMD. @@ -1127,7 +1322,8 @@ enum EVRApplicationType // interfaces (like IVRSettings and IVRApplications) but not hardware. VRApplication_VRMonitor = 5, // Reserved for vrmonitor VRApplication_SteamWatchdog = 6,// Reserved for Steam - VRApplication_Bootstrapper = 7, // Start up SteamVR + VRApplication_Bootstrapper = 7, // reserved for vrstartup + VRApplication_WebHelper = 8, // reserved for vrwebhelper VRApplication_Max }; @@ -1153,6 +1349,53 @@ enum EVRNotificationError }; +enum EVRSkeletalMotionRange +{ + // The range of motion of the skeleton takes into account any physical limits imposed by + // the controller itself. This will tend to be the most accurate pose compared to the user's + // actual hand pose, but might not allow a closed fist for example + VRSkeletalMotionRange_WithController = 0, + + // Retarget the range of motion provided by the input device to make the hand appear to move + // as if it was not holding a controller. eg: map "hand grasping controller" to "closed fist" + VRSkeletalMotionRange_WithoutController = 1, +}; + +enum EVRSkeletalTrackingLevel +{ + // body part location can’t be directly determined by the device. Any skeletal pose provided by + // the device is estimated by assuming the position required to active buttons, triggers, joysticks, + // or other input sensors. + // E.g. Vive Controller, Gamepad + VRSkeletalTracking_Estimated = 0, + + // body part location can be measured directly but with fewer degrees of freedom than the actual body + // part. Certain body part positions may be unmeasured by the device and estimated from other input data. + // E.g. Knuckles, gloves that only measure finger curl + VRSkeletalTracking_Partial, + + // Body part location can be measured directly throughout the entire range of motion of the body part. + // E.g. Mocap suit for the full body, gloves that measure rotation of each finger segment + VRSkeletalTracking_Full, + + VRSkeletalTrackingLevel_Count, + VRSkeletalTrackingLevel_Max = VRSkeletalTrackingLevel_Count - 1 +}; + + + +/** Holds the transform for a single bone */ +struct VRBoneTransform_t +{ + HmdVector4_t position; + HmdQuaternionf_t orientation; +}; + +/** Type used for referring to bones by their index */ +typedef int32_t BoneIndex_t; +const BoneIndex_t k_unInvalidBoneIndex = -1; + + /** error codes returned by Vr_Init */ // Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp @@ -1203,6 +1446,7 @@ enum EVRInitError VRInitError_Init_FirmwareRecoveryBusy = 139, VRInitError_Init_USBServiceBusy = 140, VRInitError_Init_VRWebHelperStartupFailed = 141, + VRInitError_Init_TrackerManagerInitFailed = 142, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1292,6 +1536,14 @@ enum EVRTrackedCameraError VRTrackedCameraError_InvalidFrameBufferSize = 115, }; +enum EVRTrackedCameraFrameLayout +{ + EVRTrackedCameraFrameLayout_Mono = 0x0001, + EVRTrackedCameraFrameLayout_Stereo = 0x0002, + EVRTrackedCameraFrameLayout_VerticalLayout = 0x0010, // Stereo frames are Top/Bottom (left/right) + EVRTrackedCameraFrameLayout_HorizontalLayout = 0x0020, // Stereo frames are Left/Right +}; + enum EVRTrackedCameraFrameType { VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. @@ -1300,6 +1552,16 @@ enum EVRTrackedCameraFrameType MAX_CAMERA_FRAME_TYPES }; +enum EVRDistortionFunctionType +{ + VRDistortionFunctionType_None, + VRDistortionFunctionType_FTheta, + VRDistortionFucntionType_Extended_FTheta, + MAX_DISTORTION_FUNCTION_TYPES, +}; + +static const uint32_t k_unMaxDistortionFunctionParameters = 8; + typedef uint64_t TrackedCameraHandle_t; #define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) @@ -1314,6 +1576,8 @@ struct CameraVideoStreamFrameHeader_t uint32_t nFrameSequence; TrackedDevicePose_t standingTrackedDevicePose; + + uint64_t ulFrameExposureTime; // mid-point of the exposure of the image in host system ticks }; // Screenshot types @@ -1331,6 +1595,38 @@ struct DriverDirectMode_FrameTiming uint32_t m_nReprojectionFlags; }; +enum EVSync +{ + VSync_None, + VSync_WaitRender, // block following render work until vsync + VSync_NoWaitRender, // do not block following render work (allow to get started early) +}; + +enum EVRMuraCorrectionMode +{ + EVRMuraCorrectionMode_Default = 0, + EVRMuraCorrectionMode_NoCorrection +}; + +/** raw IMU data provided by IVRIOBuffer from paths to tracked devices with IMUs */ +enum Imu_OffScaleFlags +{ + OffScale_AccelX = 0x01, + OffScale_AccelY = 0x02, + OffScale_AccelZ = 0x04, + OffScale_GyroX = 0x08, + OffScale_GyroY = 0x10, + OffScale_GyroZ = 0x20, +}; + +struct ImuSample_t +{ + double fSampleTime; + HmdVector3d_t vAccel; + HmdVector3d_t vGyro; + uint32_t unOffScaleFlags; +}; + #pragma pack( pop ) // figure out how to import from the VR API dll @@ -1530,10 +1826,10 @@ public: */ virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; - /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + /** Returns the device index associated with a specific role, for example the left hand or the right hand. This function is deprecated in favor of the new IVRInput system. */ virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; - /** Returns the controller type associated with a device index. */ + /** Returns the controller type associated with a device index. This function is deprecated in favor of the new IVRInput system. */ virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; // ------------------------------------ @@ -1617,22 +1913,22 @@ public: // ------------------------------------ /** Fills the supplied struct with the current state of the controller. Returns false if the controller index - * is invalid. */ + * is invalid. This function is deprecated in favor of the new IVRInput system. */ virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0; /** fills the supplied struct with the current state of the controller and the provided pose with the pose of * the controller when the controller state was updated most recently. Use this form if you need a precise controller - * pose as input to your application when the user presses or releases a button. */ + * pose as input to your application when the user presses or releases a button. This function is deprecated in favor of the new IVRInput system. */ virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0; /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller - * and axis combination for 5ms. */ + * and axis combination for 5ms. This function is deprecated in favor of the new IVRInput system. */ virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; - /** returns the name of an EVRButtonId enum value */ + /** returns the name of an EVRButtonId enum value. This function is deprecated in favor of the new IVRInput system. */ virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; - /** returns the name of an EVRControllerAxisType enum value */ + /** returns the name of an EVRControllerAxisType enum value. This function is deprecated in favor of the new IVRInput system. */ virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; /** Returns true if this application is receiving input from the system. This would return false if @@ -1907,6 +2203,8 @@ namespace vr } // namespace vr // ivrsettings.h +#include + namespace vr { enum EVRSettingsError @@ -1949,6 +2247,88 @@ namespace vr //----------------------------------------------------------------------------- static const char * const IVRSettings_Version = "IVRSettings_002"; + class CVRSettingHelper + { + IVRSettings *m_pSettings; + public: + CVRSettingHelper( IVRSettings *pSettings ) + { + m_pSettings = pSettings; + } + + const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) + { + return m_pSettings->GetSettingsErrorNameFromEnum( eError ); + } + + // Returns true if file sync occurred (force or settings dirty) + bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->Sync( bForce, peError ); + } + + void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetBool( pchSection, pchSettingsKey, bValue, peError ); + } + + void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetInt32( pchSection, pchSettingsKey, nValue, peError ); + } + void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetFloat( pchSection, pchSettingsKey, flValue, peError ); + } + void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetString( pchSection, pchSettingsKey, pchValue, peError ); + } + void SetString( const std::string & sSection, const std::string & sSettingsKey, const std::string & sValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetString( sSection.c_str(), sSettingsKey.c_str(), sValue.c_str(), peError ); + } + + bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetBool( pchSection, pchSettingsKey, peError ); + } + int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetInt32( pchSection, pchSettingsKey, peError ); + } + float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetFloat( pchSection, pchSettingsKey, peError ); + } + void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) + { + m_pSettings->GetString( pchSection, pchSettingsKey, pchValue, unValueLen, peError ); + } + std::string GetString( const std::string & sSection, const std::string & sSettingsKey, EVRSettingsError *peError = nullptr ) + { + char buf[4096]; + vr::EVRSettingsError eError; + m_pSettings->GetString( sSection.c_str(), sSettingsKey.c_str(), buf, sizeof( buf ), &eError ); + if ( peError ) + *peError = eError; + if ( eError == vr::VRSettingsError_None ) + return buf; + else + return ""; + } + + void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) + { + m_pSettings->RemoveSection( pchSection, peError ); + } + void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + m_pSettings->RemoveKeyInSection( pchSection, pchSettingsKey, peError ); + } + }; + + //----------------------------------------------------------------------------- // steamvr keys static const char * const k_pch_SteamVR_Section = "steamvr"; @@ -1970,21 +2350,19 @@ namespace vr static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; - static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; - static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; - static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; - static const char * const k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection"; - static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection"; - static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; + static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; + static const char * const k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; + static const char * const k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; - static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized"; static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; @@ -1994,11 +2372,27 @@ namespace vr static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; static const char * const k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; + static const char * const k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleManualOverride"; static const char * const k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; 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"; + static const char * const k_pch_SteamVR_LegacyInputRebinding = "legacyInputRebinding"; + static const char * const k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; + static const char * const k_pch_SteamVR_InputBindingUIBlock = "inputBindingUI"; + static const char * const k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; + static const char * const k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; + static const char * const k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; + static const char * const k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; + + //----------------------------------------------------------------------------- + // direct mode keys + static const char * const k_pch_DirectMode_Section = "direct_mode"; + static const char * const k_pch_DirectMode_Enable_Bool = "enable"; + static const char * const k_pch_DirectMode_Count_Int32 = "count"; + static const char * const k_pch_DirectMode_EdidVid_Int32 = "edidVid"; + static const char * const k_pch_DirectMode_EdidPid_Int32 = "edidPid"; //----------------------------------------------------------------------------- // lighthouse keys @@ -2011,6 +2405,8 @@ namespace vr 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"; + static const char * const k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; + static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; //----------------------------------------------------------------------------- // null keys @@ -2031,6 +2427,7 @@ namespace vr static const char * const k_pch_UserInterface_Section = "userinterface"; static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized"; static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; @@ -2053,9 +2450,7 @@ namespace vr //----------------------------------------------------------------------------- // perf keys static const char * const k_pch_Perf_Section = "perfcheck"; - static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; - static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; - static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + static const char * const k_pch_Perf_PerfGraphInHMD_Bool = "perfGraphInHMD"; static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; static const char * const k_pch_Perf_TestData_Float = "perfTestData"; @@ -2086,6 +2481,7 @@ namespace vr static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + static const char * const k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode"; //----------------------------------------------------------------------------- // audio keys @@ -2113,6 +2509,8 @@ namespace vr 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"; + static const char * const k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools"; + static const char * const k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard"; //----------------------------------------------------------------------------- // model skin keys @@ -2125,8 +2523,41 @@ namespace vr //----------------------------------------------------------------------------- // web interface keys static const char* const k_pch_WebInterface_Section = "WebInterface"; + static const char* const k_pch_WebInterface_WebEnable_Bool = "WebEnable"; static const char* const k_pch_WebInterface_WebPort_String = "WebPort"; + //----------------------------------------------------------------------------- + // vrwebhelper keys + static const char* const k_pch_VRWebHelper_Section = "VRWebHelper"; + static const char* const k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled"; + static const char* const k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort"; + + //----------------------------------------------------------------------------- + // tracking overrides - keys are device paths, values are the device paths their + // tracking/pose information overrides + static const char* const k_pch_TrackingOverride_Section = "TrackingOverrides"; + + //----------------------------------------------------------------------------- + // per-app keys - the section name for these is the app key itself. Some of these are prefixed by the controller type + static const char* const k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; + static const char* const k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL"; + static const char* const k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; + static const char* const k_pch_App_ActionManifestURL_String = "ActionManifestURL"; + + //----------------------------------------------------------------------------- + // configuration for trackers + static const char * const k_pch_Trackers_Section = "trackers"; + + //----------------------------------------------------------------------------- + // configuration for desktop UI windows + static const char * const k_pch_DesktopUI_Section = "DesktopUI"; + + //----------------------------------------------------------------------------- + // Last known keys for righting recovery + static const char * const k_pch_LastKnown_Section = "LastKnown"; + static const char* const k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; + static const char* const k_pch_LastKnown_HMDModel_String = "HMDModel"; + } // namespace vr // ivrchaperone.h @@ -2263,6 +2694,9 @@ public: /** Sets the Collision Bounds in the working copy. */ virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingPerimeter( VR_ARRAY_COUNT( unPointCount ) HmdVector2_t *pPointBuffer, uint32_t unPointCount ) = 0; + /** Sets the preferred seated position in the working copy. */ virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; @@ -2275,17 +2709,17 @@ public: /** Returns the preferred seated position. */ virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; - virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; - virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; - - virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; - virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; - virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; + + /** Shows the chaperone data in the working set to preview in the compositor.*/ + virtual void ShowWorkingSetPreview() = 0; + + /** Hides the chaperone data in the working set to preview in the compositor (if it was visible).*/ + virtual void HideWorkingSetPreview() = 0; }; -static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_006"; } @@ -2330,6 +2764,21 @@ const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicate // NumFramePresents > 1 also indicates the scene texture was reused, // and also the number of times that it was presented in total. +const uint32_t VRCompositor_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame + +const uint32_t VRCompositor_PredictionMask = 0x30; // The runtime may predict more than one frame (up to four) ahead if + // it detects the application is taking too long to render. These two + // bits will contain the count of additional frames (normally zero). + // Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from + // the latest frame timing entry. + +const uint32_t VRCompositor_ThrottleMask = 0xC0; // Number of frames the compositor is throttling the application. + // Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from + // the latest frame timing entry. + +#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 ) +#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 6 ) + /** Provides a single frame's timing information to the app */ struct Compositor_FrameTiming { @@ -2369,6 +2818,9 @@ struct Compositor_FrameTiming float m_flCompositorRenderStartMs; vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + + uint32_t m_nNumVSyncsReadyForUse; + uint32_t m_nNumVSyncsToFirstView; }; /** Cumulative stats for current application. These are not cleared until a new app connects, @@ -2531,7 +2983,7 @@ public: /** Returns true if the mirror window is shown. */ virtual bool IsMirrorWindowVisible() = 0; - /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + /** Writes back buffer and stereo left/right pair from the application to a 'screenshots' folder in the SteamVR runtime root. */ virtual void CompositorDumpImages() = 0; /** Let an app know it should be rendering with low resources. */ @@ -2594,6 +3046,11 @@ public: * will perform a vkQueueSubmit on Vulkan so must not be done simultaneously with VkQueue operations on another thread. * Returns VRCompositorError_RequestFailed if SetExplicitTimingMode is not enabled. */ virtual EVRCompositorError SubmitExplicitTimingData() = 0; + + /** Indicates whether or not motion smoothing is enabled by the user settings. + * If you want to know if motion smoothing actually triggered due to a late frame, check Compositor_FrameTiming + * m_nReprojectionFlags & VRCompositor_ReprojectionMotion instead. */ + virtual bool IsMotionSmoothingEnabled() = 0; }; static const char * const IVRCompositor_Version = "IVRCompositor_022"; @@ -2767,6 +3224,10 @@ namespace vr // If set, the overlay will be shown in the dashboard, otherwise it will be hidden. VROverlayFlags_VisibleInDashboard = 15, + + // If this is set and the overlay's input method is not none, the system-wide laser mouse + // mode will be activated whenever this overlay is visible. + VROverlayFlags_MakeOverlaysInteractiveIfVisible = 16, }; enum VRMessageOverlayResponse @@ -3072,7 +3533,7 @@ namespace vr virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; /** Sets the analog input to Dual Analog coordinate scale for the specified overlay. */ - virtual EVROverlayError SetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, const HmdVector2_t & vCenter, float fRadius ) = 0; + virtual EVROverlayError SetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, const HmdVector2_t *pvCenter, float fRadius ) = 0; /** Gets the analog input to Dual Analog coordinate scale for the specified overlay. */ virtual EVROverlayError GetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t *pvCenter, float *pfRadius ) = 0; @@ -3186,7 +3647,7 @@ namespace vr virtual void CloseMessageOverlay() = 0; }; - static const char * const IVROverlay_Version = "IVROverlay_018"; + static const char * const IVROverlay_Version = "IVROverlay_019"; } // namespace vr @@ -3374,6 +3835,9 @@ public: * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). * Otherwise, return true * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentStateForDevicePath( const char *pchRenderModelName, const char *pchComponentName, vr::VRInputValueHandle_t devicePath, const vr::RenderModel_ControllerMode_State_t *pState, vr::RenderModel_ComponentState_t *pComponentState ) = 0; + + /** This version of GetComponentState takes a controller state block instead of an action origin. This function is deprecated. You should use the new input system and GetComponentStateForDevicePath instead. */ virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; /** Returns true if the render model has a component with the specified name */ @@ -3391,7 +3855,7 @@ public: virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; }; -static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; +static const char * const IVRRenderModels_Version = "IVRRenderModels_006"; } @@ -3441,9 +3905,9 @@ public: /** Gets size of the image frame. */ virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; - virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, uint32_t nCameraIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; - virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, uint32_t nCameraIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. @@ -3475,7 +3939,7 @@ public: virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; }; -static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003"; +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_005"; } // namespace vr @@ -3633,6 +4097,368 @@ static const char * const IVRDriverManager_Version = "IVRDriverManager_001"; } // namespace vr + +// ivrinput.h +namespace vr +{ + static const uint32_t k_unMaxActionNameLength = 64; + static const uint32_t k_unMaxActionSetNameLength = 64; + static const uint32_t k_unMaxActionOriginCount = 16; + static const uint32_t k_unMaxBoneNameLength = 32; + + enum EVRSkeletalTransformSpace + { + VRSkeletalTransformSpace_Model = 0, + VRSkeletalTransformSpace_Parent = 1 + }; + + enum EVRSkeletalReferencePose + { + VRSkeletalReferencePose_BindPose = 0, + VRSkeletalReferencePose_OpenHand, + VRSkeletalReferencePose_Fist, + VRSkeletalReferencePose_GripLimit + }; + + enum EVRFinger + { + VRFinger_Thumb = 0, + VRFinger_Index, + VRFinger_Middle, + VRFinger_Ring, + VRFinger_Pinky, + VRFinger_Count + }; + + enum EVRFingerSplay + { + VRFingerSplay_Thumb_Index = 0, + VRFingerSplay_Index_Middle, + VRFingerSplay_Middle_Ring, + VRFingerSplay_Ring_Pinky, + VRFingerSplay_Count + }; + + enum EVRInputFilterCancelType + { + VRInputFilterCancel_Timers = 0, + VRInputFilterCancel_Momentum = 1, + }; + + enum EVRInputStringBits + { + VRInputString_Hand = 0x01, + VRInputString_ControllerType = 0x02, + VRInputString_InputSource = 0x04, + + VRInputString_All = 0xFFFFFFFF + }; + + struct InputAnalogActionData_t + { + /** Whether or not this action is currently available to be bound in the active action set */ + bool bActive; + + /** The origin that caused this action's current state */ + VRInputValueHandle_t activeOrigin; + + /** The current state of this action; will be delta updates for mouse actions */ + float x, y, z; + + /** Deltas since the previous call to UpdateActionState() */ + float deltaX, deltaY, deltaZ; + + /** Time relative to now when this event happened. Will be negative to indicate a past time. */ + float fUpdateTime; + }; + + struct InputDigitalActionData_t + { + /** Whether or not this action is currently available to be bound in the active action set */ + bool bActive; + + /** The origin that caused this action's current state */ + VRInputValueHandle_t activeOrigin; + + /** The current state of this action; will be true if currently pressed */ + bool bState; + + /** This is true if the state has changed since the last frame */ + bool bChanged; + + /** Time relative to now when this event happened. Will be negative to indicate a past time. */ + float fUpdateTime; + }; + + struct InputPoseActionData_t + { + /** Whether or not this action is currently available to be bound in the active action set */ + bool bActive; + + /** The origin that caused this action's current state */ + VRInputValueHandle_t activeOrigin; + + /** The current state of this action */ + TrackedDevicePose_t pose; + }; + + struct InputSkeletalActionData_t + { + /** Whether or not this action is currently available to be bound in the active action set */ + bool bActive; + + /** The origin that caused this action's current state */ + VRInputValueHandle_t activeOrigin; + }; + + struct InputOriginInfo_t + { + VRInputValueHandle_t devicePath; + TrackedDeviceIndex_t trackedDeviceIndex; + char rchRenderModelComponentName[128]; + }; + + struct VRActiveActionSet_t + { + /** This is the handle of the action set to activate for this frame. */ + VRActionSetHandle_t ulActionSet; + + /** This is the handle of a device path that this action set should be active for. To + * activate for all devices, set this to k_ulInvalidInputValueHandle. */ + VRInputValueHandle_t ulRestrictedToDevice; + + /** The action set to activate for all devices other than ulRestrictedDevice. If + * ulRestrictedToDevice is set to k_ulInvalidInputValueHandle, this parameter is + * ignored. */ + VRActionSetHandle_t ulSecondaryActionSet; + + // This field is ignored + uint32_t unPadding; + + /** The priority of this action set relative to other action sets. Any inputs + * bound to a source (e.g. trackpad, joystick, trigger) will disable bindings in + * other active action sets with a smaller priority. */ + int32_t nPriority; + }; + + /** Contains summary information about the current skeletal pose */ + struct VRSkeletalSummaryData_t + { + /** The amount that each finger is 'curled' inwards towards the palm. In the case of the thumb, + * this represents how much the thumb is wrapped around the fist. + * 0 means straight, 1 means fully curled */ + float flFingerCurl[ VRFinger_Count ]; + + /** The amount that each pair of adjacent fingers are separated. + * 0 means the digits are touching, 1 means they are fully separated. + */ + float flFingerSplay[ VRFingerSplay_Count ]; + }; + + + class IVRInput + { + public: + + // --------------- Handle management --------------- // + + /** Sets the path to the action manifest JSON file that is used by this application. If this information + * was set on the Steam partner site, calls to this function are ignored. If the Steam partner site + * setting and the path provided by this call are different, VRInputError_MismatchedActionManifest is returned. + * This call must be made before the first call to UpdateActionState or IVRSystem::PollNextEvent. */ + virtual EVRInputError SetActionManifestPath( const char *pchActionManifestPath ) = 0; + + /** Returns a handle for an action set. This handle is used for all performance-sensitive calls. */ + virtual EVRInputError GetActionSetHandle( const char *pchActionSetName, VRActionSetHandle_t *pHandle ) = 0; + + /** Returns a handle for an action. This handle is used for all performance-sensitive calls. */ + virtual EVRInputError GetActionHandle( const char *pchActionName, VRActionHandle_t *pHandle ) = 0; + + /** Returns a handle for any path in the input system. E.g. /user/hand/right */ + virtual EVRInputError GetInputSourceHandle( const char *pchInputSourcePath, VRInputValueHandle_t *pHandle ) = 0; + + // --------------- Reading action state ------------------- // + + /** Reads the current state into all actions. After this call, the results of Get*Action calls + * will be the same until the next call to UpdateActionState. */ + virtual EVRInputError UpdateActionState( VR_ARRAY_COUNT( unSetCount ) VRActiveActionSet_t *pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount ) = 0; + + /** Reads the state of a digital action given its handle. This will return VRInputError_WrongType if the type of + * action is something other than digital */ + virtual EVRInputError GetDigitalActionData( VRActionHandle_t action, InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + /** Reads the state of an analog action given its handle. This will return VRInputError_WrongType if the type of + * action is something other than analog */ + virtual EVRInputError GetAnalogActionData( VRActionHandle_t action, InputAnalogActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + /** Reads the state of a pose action given its handle. */ + virtual EVRInputError GetPoseActionData( VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + /** Reads the state of a skeletal action given its handle. */ + virtual EVRInputError GetSkeletalActionData( VRActionHandle_t action, InputSkeletalActionData_t *pActionData, uint32_t unActionDataSize ) = 0; + + // --------------- Static Skeletal Data ------------------- // + + /** Reads the number of bones in skeleton associated with the given action */ + virtual EVRInputError GetBoneCount( VRActionHandle_t action, uint32_t* pBoneCount ) = 0; + + /** Fills the given array with the index of each bone's parent in the skeleton associated with the given action */ + virtual EVRInputError GetBoneHierarchy( VRActionHandle_t action, VR_ARRAY_COUNT( unIndexArayCount ) BoneIndex_t* pParentIndices, uint32_t unIndexArayCount ) = 0; + + /** Fills the given buffer with the name of the bone at the given index in the skeleton associated with the given action */ + virtual EVRInputError GetBoneName( VRActionHandle_t action, BoneIndex_t nBoneIndex, VR_OUT_STRING() char* pchBoneName, uint32_t unNameBufferSize ) = 0; + + /** Fills the given buffer with the transforms for a specific static skeletal reference pose */ + virtual EVRInputError GetSkeletalReferenceTransforms( VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VR_ARRAY_COUNT( unTransformArrayCount ) VRBoneTransform_t *pTransformArray, uint32_t unTransformArrayCount ) = 0; + + /** Reads the level of accuracy to which the controller is able to track the user to recreate a skeletal pose */ + virtual EVRInputError GetSkeletalTrackingLevel( VRActionHandle_t action, EVRSkeletalTrackingLevel* pSkeletalTrackingLevel ) = 0; + + // --------------- Dynamic Skeletal Data ------------------- // + + /** Reads the state of the skeletal bone data associated with this action and copies it into the given buffer. */ + virtual EVRInputError GetSkeletalBoneData( VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VR_ARRAY_COUNT( unTransformArrayCount ) VRBoneTransform_t *pTransformArray, uint32_t unTransformArrayCount ) = 0; + + /** Reads summary information about the current pose of the skeleton associated with the given action. */ + virtual EVRInputError GetSkeletalSummaryData( VRActionHandle_t action, VRSkeletalSummaryData_t * pSkeletalSummaryData ) = 0; + + /** Reads the state of the skeletal bone data in a compressed form that is suitable for + * sending over the network. The required buffer size will never exceed ( sizeof(VR_BoneTransform_t)*boneCount + 2). + * Usually the size will be much smaller. */ + virtual EVRInputError GetSkeletalBoneDataCompressed( VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, VR_OUT_BUFFER_COUNT( unCompressedSize ) void *pvCompressedData, uint32_t unCompressedSize, uint32_t *punRequiredCompressedSize ) = 0; + + /** Turns a compressed buffer from GetSkeletalBoneDataCompressed and turns it back into a bone transform array. */ + virtual EVRInputError DecompressSkeletalBoneData( const void *pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VR_ARRAY_COUNT( unTransformArrayCount ) VRBoneTransform_t *pTransformArray, uint32_t unTransformArrayCount ) = 0; + + // --------------- Haptics ------------------- // + + /** Triggers a haptic event as described by the specified action */ + virtual EVRInputError TriggerHapticVibrationAction( VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + // --------------- Action Origins ---------------- // + + /** Retrieve origin handles for an action */ + virtual EVRInputError GetActionOrigins( VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VR_ARRAY_COUNT( originOutCount ) VRInputValueHandle_t *originsOut, uint32_t originOutCount ) = 0; + + /** Retrieves the name of the origin in the current language. unStringSectionsToInclude is a bitfield of values in EVRInputStringBits that allows the + application to specify which parts of the origin's information it wants a string for. */ + virtual EVRInputError GetOriginLocalizedName( VRInputValueHandle_t origin, VR_OUT_STRING() char *pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude ) = 0; + + /** Retrieves useful information for the origin of this action */ + virtual EVRInputError GetOriginTrackedDeviceInfo( VRInputValueHandle_t origin, InputOriginInfo_t *pOriginInfo, uint32_t unOriginInfoSize ) = 0; + + /** Shows the current binding for the action in-headset */ + virtual EVRInputError ShowActionOrigins( VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle ) = 0; + + /** Shows the current binding all the actions in the specified action sets */ + virtual EVRInputError ShowBindingsForActionSet( VR_ARRAY_COUNT( unSetCount ) VRActiveActionSet_t *pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight ) = 0; + }; + + static const char * const IVRInput_Version = "IVRInput_005"; + +} // namespace vr + +// ivriobuffer.h +namespace vr +{ + +typedef uint64_t IOBufferHandle_t; +static const uint64_t k_ulInvalidIOBufferHandle = 0; + + enum EIOBufferError + { + IOBuffer_Success = 0, + IOBuffer_OperationFailed = 100, + IOBuffer_InvalidHandle = 101, + IOBuffer_InvalidArgument = 102, + IOBuffer_PathExists = 103, + IOBuffer_PathDoesNotExist = 104, + IOBuffer_Permission = 105, + }; + + enum EIOBufferMode + { + IOBufferMode_Read = 0x0001, + IOBufferMode_Write = 0x0002, + IOBufferMode_Create = 0x0200, + }; + + // ---------------------------------------------------------------------------------------------- + // Purpose: + // ---------------------------------------------------------------------------------------------- + class IVRIOBuffer + { + public: + /** opens an existing or creates a new IOBuffer of unSize bytes */ + virtual vr::EIOBufferError Open( const char *pchPath, vr::EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, vr::IOBufferHandle_t *pulBuffer ) = 0; + + /** closes a previously opened or created buffer */ + virtual vr::EIOBufferError Close( vr::IOBufferHandle_t ulBuffer ) = 0; + + /** reads up to unBytes from buffer into *pDst, returning number of bytes read in *punRead */ + virtual vr::EIOBufferError Read( vr::IOBufferHandle_t ulBuffer, void *pDst, uint32_t unBytes, uint32_t *punRead ) = 0; + + /** writes unBytes of data from *pSrc into a buffer. */ + virtual vr::EIOBufferError Write( vr::IOBufferHandle_t ulBuffer, void *pSrc, uint32_t unBytes ) = 0; + + /** retrieves the property container of an buffer. */ + virtual vr::PropertyContainerHandle_t PropertyContainer( vr::IOBufferHandle_t ulBuffer ) = 0; + }; + + static const char *IVRIOBuffer_Version = "IVRIOBuffer_001"; +} + +// ivrspatialanchors.h +namespace vr +{ + static const SpatialAnchorHandle_t k_ulInvalidSpatialAnchorHandle = 0; + + struct SpatialAnchorPose_t + { + HmdMatrix34_t mAnchorToAbsoluteTracking; + }; + + class IVRSpatialAnchors + { + public: + + /** Returns a handle for an spatial anchor described by "descriptor". On success, pHandle + * will contain a handle valid for this session. Caller can wait for an event or occasionally + * poll GetSpatialAnchorPose() to find the virtual coordinate associated with this anchor. */ + virtual EVRSpatialAnchorError CreateSpatialAnchorFromDescriptor( const char *pchDescriptor, SpatialAnchorHandle_t *pHandleOut ) = 0; + + /** Returns a handle for an new spatial anchor at pPose. On success, pHandle + * will contain a handle valid for this session. Caller can wait for an event or occasionally + * poll GetSpatialAnchorDescriptor() to find the permanent descriptor for this pose. + * The result of GetSpatialAnchorPose() may evolve from this initial position if the driver chooses + * to update it. + * The anchor will be associated with the driver that provides unDeviceIndex, and the driver may use that specific + * device as a hint for how to best create the anchor. + * The eOrigin must match whatever tracking origin you are working in (seated/standing/raw). + * This should be called when the user is close to (and ideally looking at/interacting with) the target physical + * location. At that moment, the driver will have the most information about how to recover that physical point + * in the future, and the quality of the anchor (when the descriptor is re-used) will be highest. + * The caller may decide to apply offsets from this initial pose, but is advised to stay relatively close to the + * original pose location for highest fidelity. */ + virtual EVRSpatialAnchorError CreateSpatialAnchorFromPose( TrackedDeviceIndex_t unDeviceIndex, ETrackingUniverseOrigin eOrigin, SpatialAnchorPose_t *pPose, SpatialAnchorHandle_t *pHandleOut ) = 0; + + /** Get the pose for a given handle. This is intended to be cheap enough to call every frame (or fairly often) + * so that the driver can refine this position when it has more information available. */ + virtual EVRSpatialAnchorError GetSpatialAnchorPose( SpatialAnchorHandle_t unHandle, ETrackingUniverseOrigin eOrigin, SpatialAnchorPose_t *pPoseOut ) = 0; + + /** Get the descriptor for a given handle. This will be empty for handles where the driver has not + * yet built a descriptor. It will be the application-supplied descriptor for previously saved anchors + * that the application is requesting poses for. If the driver has called UpdateSpatialAnchorDescriptor() + * already in this session, it will be the descriptor provided by the driver. + * Returns true if the descriptor fits into the buffer, else false. Buffer size should be at least + * k_unMaxSpatialAnchorDescriptorSize. */ + virtual EVRSpatialAnchorError GetSpatialAnchorDescriptor( SpatialAnchorHandle_t unHandle, VR_OUT_STRING() char *pchDescriptorOut, uint32_t *punDescriptorBufferLenInOut ) = 0; + + }; + + static const char * const IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; + +} // namespace vr // End #endif // _OPENVR_API @@ -3640,6 +4466,8 @@ static const char * const IVRDriverManager_Version = "IVRDriverManager_001"; namespace vr { +#if !defined( OPENVR_INTERFACE_INTERNAL ) + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute * or relative to the current working directory. These are the local install versions of the equivalent * functions in steamvr.h and will work without a local Steam install. @@ -3867,6 +4695,38 @@ namespace vr return m_pVRDriverManager; } + IVRInput *VRInput() + { + CheckClear(); + if ( !m_pVRInput ) + { + EVRInitError eError; + m_pVRInput = (IVRInput *)VR_GetGenericInterface( IVRInput_Version, &eError ); + } + return m_pVRInput; + } + + IVRSpatialAnchors *VRSpatialAnchors() + { + CheckClear(); + if ( !m_pVRSpatialAnchors ) + { + EVRInitError eError; + m_pVRSpatialAnchors = (IVRSpatialAnchors *)VR_GetGenericInterface( IVRSpatialAnchors_Version, &eError ); + } + return m_pVRSpatialAnchors; + } + + IVRIOBuffer *VRIOBuffer() + { + if ( !m_pVRIOBuffer ) + { + EVRInitError eError; + m_pVRIOBuffer = ( IVRIOBuffer * )VR_GetGenericInterface( IVRIOBuffer_Version, &eError ); + } + return m_pVRIOBuffer; + } + private: IVRSystem *m_pVRSystem; IVRChaperone *m_pVRChaperone; @@ -3881,6 +4741,9 @@ namespace vr IVRTrackedCamera *m_pVRTrackedCamera; IVRScreenshots *m_pVRScreenshots; IVRDriverManager *m_pVRDriverManager; + IVRInput *m_pVRInput; + IVRIOBuffer *m_pVRIOBuffer; + IVRSpatialAnchors *m_pVRSpatialAnchors; }; inline COpenVRContext &OpenVRInternal_ModuleContext() @@ -3902,6 +4765,9 @@ namespace vr inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); } inline IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera() { return OpenVRInternal_ModuleContext().VRTrackedCamera(); } inline IVRDriverManager *VR_CALLTYPE VRDriverManager() { return OpenVRInternal_ModuleContext().VRDriverManager(); } + inline IVRInput *VR_CALLTYPE VRInput() { return OpenVRInternal_ModuleContext().VRInput(); } + inline IVRIOBuffer *VR_CALLTYPE VRIOBuffer() { return OpenVRInternal_ModuleContext().VRIOBuffer(); } + inline IVRSpatialAnchors *VR_CALLTYPE VRSpatialAnchors() { return OpenVRInternal_ModuleContext().VRSpatialAnchors(); } inline void COpenVRContext::Clear() { @@ -3918,6 +4784,9 @@ namespace vr m_pVRResources = nullptr; m_pVRScreenshots = nullptr; m_pVRDriverManager = nullptr; + m_pVRInput = nullptr; + m_pVRIOBuffer = nullptr; + m_pVRSpatialAnchors = nullptr; } VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal2( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo ); @@ -3957,4 +4826,6 @@ namespace vr { VR_ShutdownInternal(); } + +#endif // OPENVR_INTERFACE_INTERNAL } diff --git a/third-party/openvr/headers/openvr_api.cs b/third-party/openvr/headers/openvr_api.cs index 2c9fb4a..37ee80a 100644 --- a/third-party/openvr/headers/openvr_api.cs +++ b/third-party/openvr/headers/openvr_api.cs @@ -196,7 +196,7 @@ public struct IVRSystem internal _GetControllerStateWithPose GetControllerStateWithPose; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _TriggerHapticPulse(uint unControllerDeviceIndex, uint unAxisId, char usDurationMicroSec); + internal delegate void _TriggerHapticPulse(uint unControllerDeviceIndex, uint unAxisId, ushort usDurationMicroSec); [MarshalAs(UnmanagedType.FunctionPtr)] internal _TriggerHapticPulse TriggerHapticPulse; @@ -291,12 +291,12 @@ public struct IVRTrackedCamera internal _GetCameraFrameSize GetCameraFrameSize; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _GetCameraIntrinsics(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter); + internal delegate EVRTrackedCameraError _GetCameraIntrinsics(uint nDeviceIndex, uint nCameraIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetCameraIntrinsics GetCameraIntrinsics; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _GetCameraProjection(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ref HmdMatrix44_t pProjection); + internal delegate EVRTrackedCameraError _GetCameraProjection(uint nDeviceIndex, uint nCameraIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ref HmdMatrix44_t pProjection); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetCameraProjection GetCameraProjection; @@ -595,6 +595,11 @@ public struct IVRChaperoneSetup [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetWorkingCollisionBoundsInfo SetWorkingCollisionBoundsInfo; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate void _SetWorkingPerimeter([In, Out] HmdVector2_t[] pPointBuffer, uint unPointCount); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SetWorkingPerimeter SetWorkingPerimeter; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate void _SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -615,26 +620,6 @@ public struct IVRChaperoneSetup [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetLiveSeatedZeroPoseToRawTrackingPose GetLiveSeatedZeroPoseToRawTrackingPose; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetWorkingCollisionBoundsTagsInfo([In, Out] byte[] pTagsBuffer, uint unTagCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetWorkingCollisionBoundsTagsInfo SetWorkingCollisionBoundsTagsInfo; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetLiveCollisionBoundsTagsInfo([In, Out] byte[] pTagsBuffer, ref uint punTagCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetLiveCollisionBoundsTagsInfo GetLiveCollisionBoundsTagsInfo; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _SetWorkingPhysicalBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, uint unQuadsCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetWorkingPhysicalBoundsInfo SetWorkingPhysicalBoundsInfo; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetLivePhysicalBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetLivePhysicalBoundsInfo GetLivePhysicalBoundsInfo; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate bool _ExportLiveToBuffer(System.Text.StringBuilder pBuffer, ref uint pnBufferLength); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -645,6 +630,16 @@ public struct IVRChaperoneSetup [MarshalAs(UnmanagedType.FunctionPtr)] internal _ImportFromBufferToWorking ImportFromBufferToWorking; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate void _ShowWorkingSetPreview(); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _ShowWorkingSetPreview ShowWorkingSetPreview; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate void _HideWorkingSetPreview(); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _HideWorkingSetPreview HideWorkingSetPreview; + } [StructLayout(LayoutKind.Sequential)] @@ -865,6 +860,11 @@ public struct IVRCompositor [MarshalAs(UnmanagedType.FunctionPtr)] internal _SubmitExplicitTimingData SubmitExplicitTimingData; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate bool _IsMotionSmoothingEnabled(); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _IsMotionSmoothingEnabled IsMotionSmoothingEnabled; + } [StructLayout(LayoutKind.Sequential)] @@ -1151,7 +1151,7 @@ public struct IVROverlay internal _MoveGamepadFocusToNeighbor MoveGamepadFocusToNeighbor; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayDualAnalogTransform(ulong ulOverlay, EDualAnalogWhich eWhich, IntPtr vCenter, float fRadius); + internal delegate EVROverlayError _SetOverlayDualAnalogTransform(ulong ulOverlay, EDualAnalogWhich eWhich, ref HmdVector2_t pvCenter, float fRadius); [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetOverlayDualAnalogTransform SetOverlayDualAnalogTransform; @@ -1350,6 +1350,11 @@ public struct IVRRenderModels [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetComponentRenderModelName GetComponentRenderModelName; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate bool _GetComponentStateForDevicePath(string pchRenderModelName, string pchComponentName, ulong devicePath, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetComponentStateForDevicePath GetComponentStateForDevicePath; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate bool _GetComponentState(string pchRenderModelName, string pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -1532,6 +1537,186 @@ public struct IVRDriverManager } +[StructLayout(LayoutKind.Sequential)] +public struct IVRInput +{ + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _SetActionManifestPath(string pchActionManifestPath); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SetActionManifestPath SetActionManifestPath; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetActionSetHandle(string pchActionSetName, ref ulong pHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetActionSetHandle GetActionSetHandle; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetActionHandle(string pchActionName, ref ulong pHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetActionHandle GetActionHandle; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetInputSourceHandle(string pchInputSourcePath, ref ulong pHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetInputSourceHandle GetInputSourceHandle; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _UpdateActionState([In, Out] VRActiveActionSet_t[] pSets, uint unSizeOfVRSelectedActionSet_t, uint unSetCount); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _UpdateActionState UpdateActionState; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetDigitalActionData(ulong action, ref InputDigitalActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetDigitalActionData GetDigitalActionData; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetAnalogActionData(ulong action, ref InputAnalogActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetAnalogActionData GetAnalogActionData; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetPoseActionData(ulong action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, ref InputPoseActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetPoseActionData GetPoseActionData; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetSkeletalActionData(ulong action, ref InputSkeletalActionData_t pActionData, uint unActionDataSize); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetSkeletalActionData GetSkeletalActionData; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetBoneCount(ulong action, ref uint pBoneCount); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetBoneCount GetBoneCount; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetBoneHierarchy(ulong action, [In, Out] int[] pParentIndices, uint unIndexArayCount); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetBoneHierarchy GetBoneHierarchy; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetBoneName(ulong action, int nBoneIndex, System.Text.StringBuilder pchBoneName, uint unNameBufferSize); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetBoneName GetBoneName; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetSkeletalReferenceTransforms(ulong action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, [In, Out] VRBoneTransform_t[] pTransformArray, uint unTransformArrayCount); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetSkeletalReferenceTransforms GetSkeletalReferenceTransforms; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetSkeletalTrackingLevel(ulong action, ref EVRSkeletalTrackingLevel pSkeletalTrackingLevel); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetSkeletalTrackingLevel GetSkeletalTrackingLevel; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetSkeletalBoneData(ulong action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, [In, Out] VRBoneTransform_t[] pTransformArray, uint unTransformArrayCount); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetSkeletalBoneData GetSkeletalBoneData; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetSkeletalSummaryData(ulong action, ref VRSkeletalSummaryData_t pSkeletalSummaryData); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetSkeletalSummaryData GetSkeletalSummaryData; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetSkeletalBoneDataCompressed(ulong action, EVRSkeletalMotionRange eMotionRange, IntPtr pvCompressedData, uint unCompressedSize, ref uint punRequiredCompressedSize); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetSkeletalBoneDataCompressed GetSkeletalBoneDataCompressed; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _DecompressSkeletalBoneData(IntPtr pvCompressedBuffer, uint unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, [In, Out] VRBoneTransform_t[] pTransformArray, uint unTransformArrayCount); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _DecompressSkeletalBoneData DecompressSkeletalBoneData; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _TriggerHapticVibrationAction(ulong action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, ulong ulRestrictToDevice); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _TriggerHapticVibrationAction TriggerHapticVibrationAction; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetActionOrigins(ulong actionSetHandle, ulong digitalActionHandle, [In, Out] ulong[] originsOut, uint originOutCount); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetActionOrigins GetActionOrigins; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetOriginLocalizedName(ulong origin, System.Text.StringBuilder pchNameArray, uint unNameArraySize, int unStringSectionsToInclude); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetOriginLocalizedName GetOriginLocalizedName; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetOriginTrackedDeviceInfo(ulong origin, ref InputOriginInfo_t pOriginInfo, uint unOriginInfoSize); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetOriginTrackedDeviceInfo GetOriginTrackedDeviceInfo; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _ShowActionOrigins(ulong actionSetHandle, ulong ulActionHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _ShowActionOrigins ShowActionOrigins; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _ShowBindingsForActionSet([In, Out] VRActiveActionSet_t[] pSets, uint unSizeOfVRSelectedActionSet_t, uint unSetCount, ulong originToHighlight); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _ShowBindingsForActionSet ShowBindingsForActionSet; + +} + +[StructLayout(LayoutKind.Sequential)] +public struct IVRIOBuffer +{ + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EIOBufferError _Open(string pchPath, EIOBufferMode mode, uint unElementSize, uint unElements, ref ulong pulBuffer); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _Open Open; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EIOBufferError _Close(ulong ulBuffer); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _Close Close; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EIOBufferError _Read(ulong ulBuffer, IntPtr pDst, uint unBytes, ref uint punRead); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _Read Read; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EIOBufferError _Write(ulong ulBuffer, IntPtr pSrc, uint unBytes); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _Write Write; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate ulong _PropertyContainer(ulong ulBuffer); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _PropertyContainer PropertyContainer; + +} + +[StructLayout(LayoutKind.Sequential)] +public struct IVRSpatialAnchors +{ + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRSpatialAnchorError _CreateSpatialAnchorFromDescriptor(string pchDescriptor, ref uint pHandleOut); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _CreateSpatialAnchorFromDescriptor CreateSpatialAnchorFromDescriptor; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRSpatialAnchorError _CreateSpatialAnchorFromPose(uint unDeviceIndex, ETrackingUniverseOrigin eOrigin, ref SpatialAnchorPose_t pPose, ref uint pHandleOut); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _CreateSpatialAnchorFromPose CreateSpatialAnchorFromPose; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRSpatialAnchorError _GetSpatialAnchorPose(uint unHandle, ETrackingUniverseOrigin eOrigin, ref SpatialAnchorPose_t pPoseOut); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetSpatialAnchorPose GetSpatialAnchorPose; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRSpatialAnchorError _GetSpatialAnchorDescriptor(uint unHandle, System.Text.StringBuilder pchDescriptorOut, ref uint punDescriptorBufferLenInOut); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetSpatialAnchorDescriptor GetSpatialAnchorDescriptor; + +} + public class CVRSystem { @@ -1801,7 +1986,7 @@ public class CVRSystem bool result = FnTable.GetControllerStateWithPose(eOrigin,unControllerDeviceIndex,ref pControllerState,unControllerStateSize,ref pTrackedDevicePose); return result; } - public void TriggerHapticPulse(uint unControllerDeviceIndex,uint unAxisId,char usDurationMicroSec) + public void TriggerHapticPulse(uint unControllerDeviceIndex,uint unAxisId,ushort usDurationMicroSec) { FnTable.TriggerHapticPulse(unControllerDeviceIndex,unAxisId,usDurationMicroSec); } @@ -1914,14 +2099,14 @@ public class CVRTrackedCamera EVRTrackedCameraError result = FnTable.GetCameraFrameSize(nDeviceIndex,eFrameType,ref pnWidth,ref pnHeight,ref pnFrameBufferSize); return result; } - public EVRTrackedCameraError GetCameraIntrinsics(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref HmdVector2_t pFocalLength,ref HmdVector2_t pCenter) + public EVRTrackedCameraError GetCameraIntrinsics(uint nDeviceIndex,uint nCameraIndex,EVRTrackedCameraFrameType eFrameType,ref HmdVector2_t pFocalLength,ref HmdVector2_t pCenter) { - EVRTrackedCameraError result = FnTable.GetCameraIntrinsics(nDeviceIndex,eFrameType,ref pFocalLength,ref pCenter); + EVRTrackedCameraError result = FnTable.GetCameraIntrinsics(nDeviceIndex,nCameraIndex,eFrameType,ref pFocalLength,ref pCenter); return result; } - public EVRTrackedCameraError GetCameraProjection(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,float flZNear,float flZFar,ref HmdMatrix44_t pProjection) + public EVRTrackedCameraError GetCameraProjection(uint nDeviceIndex,uint nCameraIndex,EVRTrackedCameraFrameType eFrameType,float flZNear,float flZFar,ref HmdMatrix44_t pProjection) { - EVRTrackedCameraError result = FnTable.GetCameraProjection(nDeviceIndex,eFrameType,flZNear,flZFar,ref pProjection); + EVRTrackedCameraError result = FnTable.GetCameraProjection(nDeviceIndex,nCameraIndex,eFrameType,flZNear,flZFar,ref pProjection); return result; } public EVRTrackedCameraError AcquireVideoStreamingService(uint nDeviceIndex,ref ulong pHandle) @@ -2241,6 +2426,10 @@ public class CVRChaperoneSetup { FnTable.SetWorkingCollisionBoundsInfo(pQuadsBuffer,(uint) pQuadsBuffer.Length); } + public void SetWorkingPerimeter(HmdVector2_t [] pPointBuffer) + { + FnTable.SetWorkingPerimeter(pPointBuffer,(uint) pPointBuffer.Length); + } public void SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose) { FnTable.SetWorkingSeatedZeroPoseToRawTrackingPose(ref pMatSeatedZeroPoseToRawTrackingPose); @@ -2258,31 +2447,6 @@ public class CVRChaperoneSetup bool result = FnTable.GetLiveSeatedZeroPoseToRawTrackingPose(ref pmatSeatedZeroPoseToRawTrackingPose); return result; } - public void SetWorkingCollisionBoundsTagsInfo(byte [] pTagsBuffer) - { - FnTable.SetWorkingCollisionBoundsTagsInfo(pTagsBuffer,(uint) pTagsBuffer.Length); - } - public bool GetLiveCollisionBoundsTagsInfo(out byte [] pTagsBuffer) - { - uint punTagCount = 0; - bool result = FnTable.GetLiveCollisionBoundsTagsInfo(null,ref punTagCount); - pTagsBuffer= new byte[punTagCount]; - result = FnTable.GetLiveCollisionBoundsTagsInfo(pTagsBuffer,ref punTagCount); - return result; - } - public bool SetWorkingPhysicalBoundsInfo(HmdQuad_t [] pQuadsBuffer) - { - bool result = FnTable.SetWorkingPhysicalBoundsInfo(pQuadsBuffer,(uint) pQuadsBuffer.Length); - return result; - } - public bool GetLivePhysicalBoundsInfo(out HmdQuad_t [] pQuadsBuffer) - { - uint punQuadsCount = 0; - bool result = FnTable.GetLivePhysicalBoundsInfo(null,ref punQuadsCount); - pQuadsBuffer= new HmdQuad_t[punQuadsCount]; - result = FnTable.GetLivePhysicalBoundsInfo(pQuadsBuffer,ref punQuadsCount); - return result; - } public bool ExportLiveToBuffer(System.Text.StringBuilder pBuffer,ref uint pnBufferLength) { pnBufferLength = 0; @@ -2294,6 +2458,14 @@ public class CVRChaperoneSetup bool result = FnTable.ImportFromBufferToWorking(pBuffer,nImportFlags); return result; } + public void ShowWorkingSetPreview() + { + FnTable.ShowWorkingSetPreview(); + } + public void HideWorkingSetPreview() + { + FnTable.HideWorkingSetPreview(); + } } @@ -2500,6 +2672,11 @@ public class CVRCompositor EVRCompositorError result = FnTable.SubmitExplicitTimingData(); return result; } + public bool IsMotionSmoothingEnabled() + { + bool result = FnTable.IsMotionSmoothingEnabled(); + return result; + } } @@ -2833,9 +3010,9 @@ public class CVROverlay EVROverlayError result = FnTable.MoveGamepadFocusToNeighbor(eDirection,ulFrom); return result; } - public EVROverlayError SetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,IntPtr vCenter,float fRadius) + public EVROverlayError SetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,ref HmdVector2_t pvCenter,float fRadius) { - EVROverlayError result = FnTable.SetOverlayDualAnalogTransform(ulOverlay,eWhich,vCenter,fRadius); + EVROverlayError result = FnTable.SetOverlayDualAnalogTransform(ulOverlay,eWhich,ref pvCenter,fRadius); return result; } public EVROverlayError GetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,ref HmdVector2_t pvCenter,ref float pfRadius) @@ -3040,6 +3217,11 @@ public class CVRRenderModels uint result = FnTable.GetComponentRenderModelName(pchRenderModelName,pchComponentName,pchComponentRenderModelName,unComponentRenderModelNameLen); return result; } + public bool GetComponentStateForDevicePath(string pchRenderModelName,string pchComponentName,ulong devicePath,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState) + { + bool result = FnTable.GetComponentStateForDevicePath(pchRenderModelName,pchComponentName,devicePath,ref pState,ref pComponentState); + 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)] @@ -3270,16 +3452,225 @@ public class CVRDriverManager } +public class CVRInput +{ + IVRInput FnTable; + internal CVRInput(IntPtr pInterface) + { + FnTable = (IVRInput)Marshal.PtrToStructure(pInterface, typeof(IVRInput)); + } + public EVRInputError SetActionManifestPath(string pchActionManifestPath) + { + EVRInputError result = FnTable.SetActionManifestPath(pchActionManifestPath); + return result; + } + public EVRInputError GetActionSetHandle(string pchActionSetName,ref ulong pHandle) + { + pHandle = 0; + EVRInputError result = FnTable.GetActionSetHandle(pchActionSetName,ref pHandle); + return result; + } + public EVRInputError GetActionHandle(string pchActionName,ref ulong pHandle) + { + pHandle = 0; + EVRInputError result = FnTable.GetActionHandle(pchActionName,ref pHandle); + return result; + } + public EVRInputError GetInputSourceHandle(string pchInputSourcePath,ref ulong pHandle) + { + pHandle = 0; + EVRInputError result = FnTable.GetInputSourceHandle(pchInputSourcePath,ref pHandle); + return result; + } + public EVRInputError UpdateActionState(VRActiveActionSet_t [] pSets,uint unSizeOfVRSelectedActionSet_t) + { + EVRInputError result = FnTable.UpdateActionState(pSets,unSizeOfVRSelectedActionSet_t,(uint) pSets.Length); + return result; + } + public EVRInputError GetDigitalActionData(ulong action,ref InputDigitalActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice) + { + EVRInputError result = FnTable.GetDigitalActionData(action,ref pActionData,unActionDataSize,ulRestrictToDevice); + return result; + } + public EVRInputError GetAnalogActionData(ulong action,ref InputAnalogActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice) + { + EVRInputError result = FnTable.GetAnalogActionData(action,ref pActionData,unActionDataSize,ulRestrictToDevice); + return result; + } + public EVRInputError GetPoseActionData(ulong action,ETrackingUniverseOrigin eOrigin,float fPredictedSecondsFromNow,ref InputPoseActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice) + { + EVRInputError result = FnTable.GetPoseActionData(action,eOrigin,fPredictedSecondsFromNow,ref pActionData,unActionDataSize,ulRestrictToDevice); + return result; + } + public EVRInputError GetSkeletalActionData(ulong action,ref InputSkeletalActionData_t pActionData,uint unActionDataSize) + { + EVRInputError result = FnTable.GetSkeletalActionData(action,ref pActionData,unActionDataSize); + return result; + } + public EVRInputError GetBoneCount(ulong action,ref uint pBoneCount) + { + pBoneCount = 0; + EVRInputError result = FnTable.GetBoneCount(action,ref pBoneCount); + return result; + } + public EVRInputError GetBoneHierarchy(ulong action,int [] pParentIndices) + { + EVRInputError result = FnTable.GetBoneHierarchy(action,pParentIndices,(uint) pParentIndices.Length); + return result; + } + public EVRInputError GetBoneName(ulong action,int nBoneIndex,System.Text.StringBuilder pchBoneName,uint unNameBufferSize) + { + EVRInputError result = FnTable.GetBoneName(action,nBoneIndex,pchBoneName,unNameBufferSize); + return result; + } + public EVRInputError GetSkeletalReferenceTransforms(ulong action,EVRSkeletalTransformSpace eTransformSpace,EVRSkeletalReferencePose eReferencePose,VRBoneTransform_t [] pTransformArray) + { + EVRInputError result = FnTable.GetSkeletalReferenceTransforms(action,eTransformSpace,eReferencePose,pTransformArray,(uint) pTransformArray.Length); + return result; + } + public EVRInputError GetSkeletalTrackingLevel(ulong action,ref EVRSkeletalTrackingLevel pSkeletalTrackingLevel) + { + EVRInputError result = FnTable.GetSkeletalTrackingLevel(action,ref pSkeletalTrackingLevel); + return result; + } + public EVRInputError GetSkeletalBoneData(ulong action,EVRSkeletalTransformSpace eTransformSpace,EVRSkeletalMotionRange eMotionRange,VRBoneTransform_t [] pTransformArray) + { + EVRInputError result = FnTable.GetSkeletalBoneData(action,eTransformSpace,eMotionRange,pTransformArray,(uint) pTransformArray.Length); + return result; + } + public EVRInputError GetSkeletalSummaryData(ulong action,ref VRSkeletalSummaryData_t pSkeletalSummaryData) + { + EVRInputError result = FnTable.GetSkeletalSummaryData(action,ref pSkeletalSummaryData); + return result; + } + public EVRInputError GetSkeletalBoneDataCompressed(ulong action,EVRSkeletalMotionRange eMotionRange,IntPtr pvCompressedData,uint unCompressedSize,ref uint punRequiredCompressedSize) + { + punRequiredCompressedSize = 0; + EVRInputError result = FnTable.GetSkeletalBoneDataCompressed(action,eMotionRange,pvCompressedData,unCompressedSize,ref punRequiredCompressedSize); + return result; + } + public EVRInputError DecompressSkeletalBoneData(IntPtr pvCompressedBuffer,uint unCompressedBufferSize,EVRSkeletalTransformSpace eTransformSpace,VRBoneTransform_t [] pTransformArray) + { + EVRInputError result = FnTable.DecompressSkeletalBoneData(pvCompressedBuffer,unCompressedBufferSize,eTransformSpace,pTransformArray,(uint) pTransformArray.Length); + return result; + } + public EVRInputError TriggerHapticVibrationAction(ulong action,float fStartSecondsFromNow,float fDurationSeconds,float fFrequency,float fAmplitude,ulong ulRestrictToDevice) + { + EVRInputError result = FnTable.TriggerHapticVibrationAction(action,fStartSecondsFromNow,fDurationSeconds,fFrequency,fAmplitude,ulRestrictToDevice); + return result; + } + public EVRInputError GetActionOrigins(ulong actionSetHandle,ulong digitalActionHandle,ulong [] originsOut) + { + EVRInputError result = FnTable.GetActionOrigins(actionSetHandle,digitalActionHandle,originsOut,(uint) originsOut.Length); + return result; + } + public EVRInputError GetOriginLocalizedName(ulong origin,System.Text.StringBuilder pchNameArray,uint unNameArraySize,int unStringSectionsToInclude) + { + EVRInputError result = FnTable.GetOriginLocalizedName(origin,pchNameArray,unNameArraySize,unStringSectionsToInclude); + return result; + } + public EVRInputError GetOriginTrackedDeviceInfo(ulong origin,ref InputOriginInfo_t pOriginInfo,uint unOriginInfoSize) + { + EVRInputError result = FnTable.GetOriginTrackedDeviceInfo(origin,ref pOriginInfo,unOriginInfoSize); + return result; + } + public EVRInputError ShowActionOrigins(ulong actionSetHandle,ulong ulActionHandle) + { + EVRInputError result = FnTable.ShowActionOrigins(actionSetHandle,ulActionHandle); + return result; + } + public EVRInputError ShowBindingsForActionSet(VRActiveActionSet_t [] pSets,uint unSizeOfVRSelectedActionSet_t,ulong originToHighlight) + { + EVRInputError result = FnTable.ShowBindingsForActionSet(pSets,unSizeOfVRSelectedActionSet_t,(uint) pSets.Length,originToHighlight); + return result; + } +} + + +public class CVRIOBuffer +{ + IVRIOBuffer FnTable; + internal CVRIOBuffer(IntPtr pInterface) + { + FnTable = (IVRIOBuffer)Marshal.PtrToStructure(pInterface, typeof(IVRIOBuffer)); + } + public EIOBufferError Open(string pchPath,EIOBufferMode mode,uint unElementSize,uint unElements,ref ulong pulBuffer) + { + pulBuffer = 0; + EIOBufferError result = FnTable.Open(pchPath,mode,unElementSize,unElements,ref pulBuffer); + return result; + } + public EIOBufferError Close(ulong ulBuffer) + { + EIOBufferError result = FnTable.Close(ulBuffer); + return result; + } + public EIOBufferError Read(ulong ulBuffer,IntPtr pDst,uint unBytes,ref uint punRead) + { + punRead = 0; + EIOBufferError result = FnTable.Read(ulBuffer,pDst,unBytes,ref punRead); + return result; + } + public EIOBufferError Write(ulong ulBuffer,IntPtr pSrc,uint unBytes) + { + EIOBufferError result = FnTable.Write(ulBuffer,pSrc,unBytes); + return result; + } + public ulong PropertyContainer(ulong ulBuffer) + { + ulong result = FnTable.PropertyContainer(ulBuffer); + return result; + } +} + + +public class CVRSpatialAnchors +{ + IVRSpatialAnchors FnTable; + internal CVRSpatialAnchors(IntPtr pInterface) + { + FnTable = (IVRSpatialAnchors)Marshal.PtrToStructure(pInterface, typeof(IVRSpatialAnchors)); + } + public EVRSpatialAnchorError CreateSpatialAnchorFromDescriptor(string pchDescriptor,ref uint pHandleOut) + { + pHandleOut = 0; + EVRSpatialAnchorError result = FnTable.CreateSpatialAnchorFromDescriptor(pchDescriptor,ref pHandleOut); + return result; + } + public EVRSpatialAnchorError CreateSpatialAnchorFromPose(uint unDeviceIndex,ETrackingUniverseOrigin eOrigin,ref SpatialAnchorPose_t pPose,ref uint pHandleOut) + { + pHandleOut = 0; + EVRSpatialAnchorError result = FnTable.CreateSpatialAnchorFromPose(unDeviceIndex,eOrigin,ref pPose,ref pHandleOut); + return result; + } + public EVRSpatialAnchorError GetSpatialAnchorPose(uint unHandle,ETrackingUniverseOrigin eOrigin,ref SpatialAnchorPose_t pPoseOut) + { + EVRSpatialAnchorError result = FnTable.GetSpatialAnchorPose(unHandle,eOrigin,ref pPoseOut); + return result; + } + public EVRSpatialAnchorError GetSpatialAnchorDescriptor(uint unHandle,System.Text.StringBuilder pchDescriptorOut,ref uint punDescriptorBufferLenInOut) + { + punDescriptorBufferLenInOut = 0; + EVRSpatialAnchorError result = FnTable.GetSpatialAnchorDescriptor(unHandle,pchDescriptorOut,ref punDescriptorBufferLenInOut); + return result; + } +} + + public class OpenVRInterop { [DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal", CallingConvention = CallingConvention.Cdecl)] internal static extern uint InitInternal(ref EVRInitError peError, EVRApplicationType eApplicationType); + [DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal2", CallingConvention = CallingConvention.Cdecl)] + internal static extern uint InitInternal2(ref EVRInitError peError, EVRApplicationType eApplicationType,[In, MarshalAs(UnmanagedType.LPStr)] string pStartupInfo); [DllImportAttribute("openvr_api", EntryPoint = "VR_ShutdownInternal", CallingConvention = CallingConvention.Cdecl)] internal static extern void ShutdownInternal(); [DllImportAttribute("openvr_api", EntryPoint = "VR_IsHmdPresent", CallingConvention = CallingConvention.Cdecl)] internal static extern bool IsHmdPresent(); [DllImportAttribute("openvr_api", EntryPoint = "VR_IsRuntimeInstalled", CallingConvention = CallingConvention.Cdecl)] internal static extern bool IsRuntimeInstalled(); + [DllImportAttribute("openvr_api", EntryPoint = "VR_RuntimePath", CallingConvention = CallingConvention.Cdecl)] + internal static extern string RuntimePath(); [DllImportAttribute("openvr_api", EntryPoint = "VR_GetStringForHmdError", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr GetStringForHmdError(EVRInitError error); [DllImportAttribute("openvr_api", EntryPoint = "VR_GetGenericInterface", CallingConvention = CallingConvention.Cdecl)] @@ -3298,12 +3689,14 @@ public enum EVREye } public enum ETextureType { + Invalid = -1, DirectX = 0, OpenGL = 1, Vulkan = 2, IOSurface = 3, DirectX12 = 4, DXGISharedHandle = 5, + Metal = 6, } public enum EColorSpace { @@ -3318,6 +3711,7 @@ public enum ETrackingResult Calibrating_OutOfRange = 101, Running_OK = 200, Running_OutOfRange = 201, + Fallback_RotationOnly = 300, } public enum ETrackedDeviceClass { @@ -3327,6 +3721,7 @@ public enum ETrackedDeviceClass GenericTracker = 3, TrackingReference = 4, DisplayRedirect = 5, + Max = 6, } public enum ETrackedControllerRole { @@ -3334,6 +3729,8 @@ public enum ETrackedControllerRole LeftHand = 1, RightHand = 2, OptOut = 3, + Treadmill = 4, + Max = 4, } public enum ETrackingUniverseOrigin { @@ -3383,6 +3780,11 @@ public enum ETrackedDeviceProperty Prop_RegisteredDeviceType_String = 1036, Prop_InputProfilePath_String = 1037, Prop_NeverTracked_Bool = 1038, + Prop_NumCameras_Int32 = 1039, + Prop_CameraFrameLayout_Int32 = 1040, + Prop_CameraStreamFormat_Int32 = 1041, + Prop_AdditionalDeviceSettingsPath_String = 1042, + Prop_Identifiable_Bool = 1043, Prop_ReportsTimeSinceVSync_Bool = 2000, Prop_SecondsFromVsyncToPhotons_Float = 2001, Prop_DisplayFrequency_Float = 2002, @@ -3444,6 +3846,21 @@ public enum ETrackedDeviceProperty Prop_MinimumIpdStepMeters_Float = 2060, Prop_AudioBridgeFirmwareVersion_Uint64 = 2061, Prop_ImageBridgeFirmwareVersion_Uint64 = 2062, + Prop_ImuToHeadTransform_Matrix34 = 2063, + Prop_ImuFactoryGyroBias_Vector3 = 2064, + Prop_ImuFactoryGyroScale_Vector3 = 2065, + Prop_ImuFactoryAccelerometerBias_Vector3 = 2066, + Prop_ImuFactoryAccelerometerScale_Vector3 = 2067, + Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069, + Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, + Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, + Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, + Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203, + Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204, + Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205, + Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206, + Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, + Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, Prop_AttachedDeviceId_String = 3000, Prop_SupportedButtons_Uint64 = 3001, Prop_Axis0Type_Int32 = 3002, @@ -3478,8 +3895,10 @@ public enum ETrackedDeviceProperty Prop_HasCameraComponent_Bool = 6004, Prop_HasDriverDirectModeComponent_Bool = 6005, Prop_HasVirtualDisplayComponent_Bool = 6006, + Prop_HasSpatialAnchorsSupport_Bool = 6007, Prop_ControllerType_String = 7000, Prop_LegacyInputProfile_String = 7001, + Prop_ControllerHandSelectionPriority_Int32 = 7002, Prop_VendorSpecific_Reserved_Start = 10000, Prop_VendorSpecific_Reserved_End = 10999, Prop_TrackedDeviceProperty_Max = 1000000, @@ -3499,6 +3918,7 @@ public enum ETrackedPropertyError TrackedProp_PermissionDenied = 10, TrackedProp_InvalidOperation = 11, TrackedProp_CannotWriteToWildcards = 12, + TrackedProp_IPCReadFailure = 13, } public enum EVRSubmitFlags { @@ -3558,6 +3978,7 @@ public enum EVREventType VREvent_Scroll = 305, VREvent_TouchPadMove = 306, VREvent_OverlayFocusChanged = 307, + VREvent_ReloadOverlays = 308, VREvent_InputFocusCaptured = 400, VREvent_InputFocusReleased = 401, VREvent_SceneFocusLost = 402, @@ -3567,6 +3988,7 @@ public enum EVREventType VREvent_InputFocusChanged = 406, VREvent_SceneApplicationSecondaryRenderingStarted = 407, VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, + VREvent_ActionBindingReloaded = 409, VREvent_HideRenderModels = 410, VREvent_ShowRenderModels = 411, VREvent_ConsoleOpened = 420, @@ -3597,6 +4019,7 @@ public enum EVREventType VREvent_PrimaryDashboardDeviceChanged = 525, VREvent_RoomViewShown = 526, VREvent_RoomViewHidden = 527, + VREvent_ShowUI = 528, VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, VREvent_Notification_BeginInteraction = 602, @@ -3611,6 +4034,7 @@ public enum EVREventType VREvent_ChaperoneTempDataHasChanged = 802, VREvent_ChaperoneSettingsHaveChanged = 803, VREvent_SeatedZeroPoseReset = 804, + VREvent_ChaperoneFlushCache = 805, VREvent_AudioSettingsHaveChanged = 820, VREvent_BackgroundSettingHasChanged = 850, VREvent_CameraSettingsHaveChanged = 851, @@ -3628,6 +4052,8 @@ public enum EVREventType VREvent_PerfSectionSettingChanged = 863, VREvent_DashboardSectionSettingChanged = 864, VREvent_WebInterfaceSectionSettingChanged = 865, + VREvent_TrackersSectionSettingChanged = 866, + VREvent_LastKnownSectionSettingChanged = 867, VREvent_StatusUpdate = 900, VREvent_WebInterface_InstallDriverCompleted = 950, VREvent_MCImageUpdated = 1000, @@ -3659,6 +4085,16 @@ public enum EVREventType VREvent_MessageOverlay_Closed = 1650, VREvent_MessageOverlayCloseRequested = 1651, VREvent_Input_HapticVibration = 1700, + VREvent_Input_BindingLoadFailed = 1701, + VREvent_Input_BindingLoadSuccessful = 1702, + VREvent_Input_ActionManifestReloaded = 1703, + VREvent_Input_ActionManifestLoadFailed = 1704, + VREvent_Input_ProgressUpdate = 1705, + VREvent_Input_TrackerActivated = 1706, + VREvent_SpatialAnchors_PoseUpdated = 1800, + VREvent_SpatialAnchors_DescriptorUpdated = 1801, + VREvent_SpatialAnchors_RequestPoseUpdate = 1802, + VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, VREvent_VendorSpecific_Reserved_Start = 10000, VREvent_VendorSpecific_Reserved_End = 19999, } @@ -3689,6 +4125,9 @@ public enum EVRButtonId k_EButton_SteamVR_Touchpad = 32, k_EButton_SteamVR_Trigger = 33, k_EButton_Dashboard_Back = 2, + k_EButton_Knuckles_A = 2, + k_EButton_Knuckles_B = 1, + k_EButton_Knuckles_JoyStick = 35, k_EButton_Max = 64, } public enum EVRMouseButton @@ -3702,6 +4141,12 @@ public enum EDualAnalogWhich k_EDualAnalog_Left = 0, k_EDualAnalog_Right = 1, } +public enum EShowUIType +{ + ShowUI_ControllerBinding = 0, + ShowUI_ManageTrackers = 1, + ShowUI_QuickStart = 2, +} public enum EVRInputError { None = 0, @@ -3714,6 +4159,31 @@ public enum EVRInputError IPCError = 7, NoActiveActionSet = 8, InvalidDevice = 9, + InvalidSkeleton = 10, + InvalidBoneCount = 11, + InvalidCompressedData = 12, + NoData = 13, + BufferTooSmall = 14, + MismatchedActionManifest = 15, + MissingSkeletonData = 16, + InvalidBoneIndex = 17, +} +public enum EVRSpatialAnchorError +{ + Success = 0, + Internal = 1, + UnknownHandle = 2, + ArrayTooSmall = 3, + InvalidDescriptorChar = 4, + NotYetAvailable = 5, + NotAvailableInThisUniverse = 6, + PermanentlyUnavailable = 7, + WrongDriver = 8, + DescriptorTooLong = 9, + Unknown = 10, + NoRoomCalibration = 11, + InvalidArgument = 12, + UnknownDriver = 13, } public enum EHiddenAreaMeshType { @@ -3780,7 +4250,8 @@ public enum EVRApplicationType VRApplication_VRMonitor = 5, VRApplication_SteamWatchdog = 6, VRApplication_Bootstrapper = 7, - VRApplication_Max = 8, + VRApplication_WebHelper = 8, + VRApplication_Max = 9, } public enum EVRFirmwareError { @@ -3796,6 +4267,19 @@ public enum EVRNotificationError InvalidOverlayHandle = 102, SystemWithUserValueAlreadyExists = 103, } +public enum EVRSkeletalMotionRange +{ + WithController = 0, + WithoutController = 1, +} +public enum EVRSkeletalTrackingLevel +{ + VRSkeletalTracking_Estimated = 0, + VRSkeletalTracking_Partial = 1, + VRSkeletalTracking_Full = 2, + Count = 3, + Max = 2, +} public enum EVRInitError { None = 0, @@ -3842,6 +4326,7 @@ public enum EVRInitError Init_FirmwareRecoveryBusy = 139, Init_USBServiceBusy = 140, Init_VRWebHelperStartupFailed = 141, + Init_TrackerManagerInitFailed = 142, Driver_Failed = 200, Driver_Unknown = 201, Driver_HmdUnknown = 202, @@ -3920,6 +4405,13 @@ public enum EVRTrackedCameraError InvalidArgument = 114, InvalidFrameBufferSize = 115, } +public enum EVRTrackedCameraFrameLayout +{ + Mono = 1, + Stereo = 2, + VerticalLayout = 16, + HorizontalLayout = 32, +} public enum EVRTrackedCameraFrameType { Distorted = 0, @@ -3927,6 +4419,33 @@ public enum EVRTrackedCameraFrameType MaximumUndistorted = 2, MAX_CAMERA_FRAME_TYPES = 3, } +public enum EVRDistortionFunctionType +{ + None = 0, + FTheta = 1, + VRDistortionFucntionType_Extended_FTheta = 2, + MAX_DISTORTION_FUNCTION_TYPES = 3, +} +public enum EVSync +{ + None = 0, + WaitRender = 1, + NoWaitRender = 2, +} +public enum EVRMuraCorrectionMode +{ + Default = 0, + NoCorrection = 1, +} +public enum Imu_OffScaleFlags +{ + OffScale_AccelX = 1, + OffScale_AccelY = 2, + OffScale_AccelZ = 4, + OffScale_GyroX = 8, + OffScale_GyroY = 16, + OffScale_GyroZ = 32, +} public enum EVRApplicationError { None = 0, @@ -4052,6 +4571,7 @@ public enum VROverlayFlags StereoPanorama = 13, SortWithNonSceneOverlays = 14, VisibleInDashboard = 15, + MakeOverlaysInteractiveIfVisible = 16, } public enum VRMessageOverlayResponse { @@ -4143,6 +4663,63 @@ public enum EVRScreenshotError BufferTooSmall = 102, ScreenshotAlreadyInProgress = 108, } +public enum EVRSkeletalTransformSpace +{ + Model = 0, + Parent = 1, +} +public enum EVRSkeletalReferencePose +{ + BindPose = 0, + OpenHand = 1, + Fist = 2, + GripLimit = 3, +} +public enum EVRFinger +{ + Thumb = 0, + Index = 1, + Middle = 2, + Ring = 3, + Pinky = 4, + Count = 5, +} +public enum EVRFingerSplay +{ + Thumb_Index = 0, + Index_Middle = 1, + Middle_Ring = 2, + Ring_Pinky = 3, + Count = 4, +} +public enum EVRInputFilterCancelType +{ + VRInputFilterCancel_Timers = 0, + VRInputFilterCancel_Momentum = 1, +} +public enum EVRInputStringBits +{ + VRInputString_Hand = 1, + VRInputString_ControllerType = 2, + VRInputString_InputSource = 4, + VRInputString_All = -1, +} +public enum EIOBufferError +{ + IOBuffer_Success = 0, + IOBuffer_OperationFailed = 100, + IOBuffer_InvalidHandle = 101, + IOBuffer_InvalidArgument = 102, + IOBuffer_PathExists = 103, + IOBuffer_PathDoesNotExist = 104, + IOBuffer_Permission = 105, +} +public enum EIOBufferMode +{ + Read = 1, + Write = 2, + Create = 512, +} [StructLayout(LayoutKind.Explicit)] public struct VREvent_Data_t { @@ -4167,6 +4744,12 @@ public enum EVRScreenshotError [FieldOffset(0)] public VREvent_Property_t property; [FieldOffset(0)] public VREvent_DualAnalog_t dualAnalog; [FieldOffset(0)] public VREvent_HapticVibration_t hapticVibration; + [FieldOffset(0)] public VREvent_WebConsole_t webConsole; + [FieldOffset(0)] public VREvent_InputBindingLoad_t inputBinding; + [FieldOffset(0)] public VREvent_SpatialAnchor_t spatialAnchor; + [FieldOffset(0)] public VREvent_InputActionManifestLoad_t actionManifest; + [FieldOffset(0)] public VREvent_ProgressUpdate_t progressUpdate; + [FieldOffset(0)] public VREvent_ShowUI_t showUi; [FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be at the end due to a mono bug } @@ -4192,6 +4775,18 @@ public enum EVRScreenshotError public float m10; public float m11; } +[StructLayout(LayoutKind.Sequential)] public struct HmdMatrix33_t +{ + public float m0; //float[3][3] + public float m1; + public float m2; + public float m3; + public float m4; + public float m5; + public float m6; + public float m7; + public float m8; +} [StructLayout(LayoutKind.Sequential)] public struct HmdMatrix44_t { public float m0; //float[4][4] @@ -4242,6 +4837,13 @@ public enum EVRScreenshotError public double y; public double z; } +[StructLayout(LayoutKind.Sequential)] public struct HmdQuaternionf_t +{ + public float w; + public float x; + public float y; + public float z; +} [StructLayout(LayoutKind.Sequential)] public struct HmdColor_t { public float r; @@ -4372,6 +4974,7 @@ public enum EVRScreenshotError [StructLayout(LayoutKind.Sequential)] public struct VREvent_Overlay_t { public ulong overlayHandle; + public ulong devicePath; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Status_t { @@ -4380,6 +4983,22 @@ public enum EVRScreenshotError [StructLayout(LayoutKind.Sequential)] public struct VREvent_Keyboard_t { public byte cNewInput0,cNewInput1,cNewInput2,cNewInput3,cNewInput4,cNewInput5,cNewInput6,cNewInput7; + public string cNewInput + { + get + { + return new string(new char[] { + (char)cNewInput0, + (char)cNewInput1, + (char)cNewInput2, + (char)cNewInput3, + (char)cNewInput4, + (char)cNewInput5, + (char)cNewInput6, + (char)cNewInput7 + }).TrimEnd('\0'); + } + } public ulong uUserValue; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Ipd_t @@ -4397,6 +5016,8 @@ public enum EVRScreenshotError public ulong reserved1; public ulong reserved2; public ulong reserved3; + public ulong reserved4; + public ulong reserved5; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_PerformanceTest_t { @@ -4451,6 +5072,41 @@ public enum EVRScreenshotError public float fFrequency; public float fAmplitude; } +[StructLayout(LayoutKind.Sequential)] public struct VREvent_WebConsole_t +{ + public ulong webConsoleHandle; +} +[StructLayout(LayoutKind.Sequential)] public struct VREvent_InputBindingLoad_t +{ + public ulong ulAppContainer; + public ulong pathMessage; + public ulong pathUrl; + public ulong pathControllerType; +} +[StructLayout(LayoutKind.Sequential)] public struct VREvent_InputActionManifestLoad_t +{ + public ulong pathAppKey; + public ulong pathMessage; + public ulong pathMessageParam; + public ulong pathManifestPath; +} +[StructLayout(LayoutKind.Sequential)] public struct VREvent_SpatialAnchor_t +{ + public uint unHandle; +} +[StructLayout(LayoutKind.Sequential)] public struct VREvent_ProgressUpdate_t +{ + public ulong ulApplicationPropertyContainer; + public ulong pathDevice; + public ulong pathInputSource; + public ulong pathProgressAction; + public ulong pathIcon; + public float fProgress; +} +[StructLayout(LayoutKind.Sequential)] public struct VREvent_ShowUI_t +{ + public EShowUIType eType; +} [StructLayout(LayoutKind.Sequential)] public struct VREvent_t { public uint eventType; @@ -4554,6 +5210,11 @@ public enum EVRScreenshotError public float gridScale; public HmdMatrix44_t transform; } +[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; @@ -4562,6 +5223,7 @@ public enum EVRScreenshotError public uint nBytesPerPixel; public uint nFrameSequence; public TrackedDevicePose_t standingTrackedDevicePose; + public ulong ulFrameExposureTime; } [StructLayout(LayoutKind.Sequential)] public struct DriverDirectMode_FrameTiming { @@ -4571,6 +5233,13 @@ public enum EVRScreenshotError public uint m_nNumDroppedFrames; public uint m_nReprojectionFlags; } +[StructLayout(LayoutKind.Sequential)] public struct ImuSample_t +{ + public double fSampleTime; + public HmdVector3d_t vAccel; + public HmdVector3d_t vGyro; + public uint unOffScaleFlags; +} [StructLayout(LayoutKind.Sequential)] public struct AppOverrideKeys_t { public IntPtr pchKey; // const char * @@ -4602,6 +5271,8 @@ public enum EVRScreenshotError public float m_flCompositorUpdateEndMs; public float m_flCompositorRenderStartMs; public TrackedDevicePose_t m_HmdPose; + public uint m_nNumVSyncsReadyForUse; + public uint m_nNumVSyncsToFirstView; } [StructLayout(LayoutKind.Sequential)] public struct Compositor_CumulativeStats { @@ -4667,15 +5338,15 @@ public enum EVRScreenshotError } [StructLayout(LayoutKind.Sequential)] public struct RenderModel_TextureMap_t { - public char unWidth; - public char unHeight; + public ushort unWidth; + public ushort unHeight; public IntPtr rubTextureMapData; // const uint8_t * } // This structure is for backwards binary compatibility on Linux and OSX only [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct RenderModel_TextureMap_t_Packed { - public char unWidth; - public char unHeight; + public ushort unWidth; + public ushort unHeight; public IntPtr rubTextureMapData; // const uint8_t * public RenderModel_TextureMap_t_Packed(RenderModel_TextureMap_t unpacked) { @@ -4735,6 +5406,213 @@ public enum EVRScreenshotError public int m_nHeight; public int m_nBytesPerPixel; } +[StructLayout(LayoutKind.Sequential)] public struct CVRSettingHelper +{ + public IntPtr m_pSettings; // class vr::IVRSettings * +} +[StructLayout(LayoutKind.Sequential)] public struct InputAnalogActionData_t +{ + [MarshalAs(UnmanagedType.I1)] + public bool bActive; + public ulong activeOrigin; + public float x; + public float y; + public float z; + public float deltaX; + public float deltaY; + public float deltaZ; + public float fUpdateTime; +} +[StructLayout(LayoutKind.Sequential)] public struct InputDigitalActionData_t +{ + [MarshalAs(UnmanagedType.I1)] + public bool bActive; + public ulong activeOrigin; + [MarshalAs(UnmanagedType.I1)] + public bool bState; + [MarshalAs(UnmanagedType.I1)] + public bool bChanged; + public float fUpdateTime; +} +[StructLayout(LayoutKind.Sequential)] public struct InputPoseActionData_t +{ + [MarshalAs(UnmanagedType.I1)] + public bool bActive; + public ulong activeOrigin; + public TrackedDevicePose_t pose; +} +[StructLayout(LayoutKind.Sequential)] public struct InputSkeletalActionData_t +{ + [MarshalAs(UnmanagedType.I1)] + public bool bActive; + public ulong activeOrigin; +} +[StructLayout(LayoutKind.Sequential)] public struct InputOriginInfo_t +{ + public ulong devicePath; + public uint trackedDeviceIndex; + public byte rchRenderModelComponentName0,rchRenderModelComponentName1,rchRenderModelComponentName2,rchRenderModelComponentName3,rchRenderModelComponentName4,rchRenderModelComponentName5,rchRenderModelComponentName6,rchRenderModelComponentName7,rchRenderModelComponentName8,rchRenderModelComponentName9,rchRenderModelComponentName10,rchRenderModelComponentName11,rchRenderModelComponentName12,rchRenderModelComponentName13,rchRenderModelComponentName14,rchRenderModelComponentName15,rchRenderModelComponentName16,rchRenderModelComponentName17,rchRenderModelComponentName18,rchRenderModelComponentName19,rchRenderModelComponentName20,rchRenderModelComponentName21,rchRenderModelComponentName22,rchRenderModelComponentName23,rchRenderModelComponentName24,rchRenderModelComponentName25,rchRenderModelComponentName26,rchRenderModelComponentName27,rchRenderModelComponentName28,rchRenderModelComponentName29,rchRenderModelComponentName30,rchRenderModelComponentName31,rchRenderModelComponentName32,rchRenderModelComponentName33,rchRenderModelComponentName34,rchRenderModelComponentName35,rchRenderModelComponentName36,rchRenderModelComponentName37,rchRenderModelComponentName38,rchRenderModelComponentName39,rchRenderModelComponentName40,rchRenderModelComponentName41,rchRenderModelComponentName42,rchRenderModelComponentName43,rchRenderModelComponentName44,rchRenderModelComponentName45,rchRenderModelComponentName46,rchRenderModelComponentName47,rchRenderModelComponentName48,rchRenderModelComponentName49,rchRenderModelComponentName50,rchRenderModelComponentName51,rchRenderModelComponentName52,rchRenderModelComponentName53,rchRenderModelComponentName54,rchRenderModelComponentName55,rchRenderModelComponentName56,rchRenderModelComponentName57,rchRenderModelComponentName58,rchRenderModelComponentName59,rchRenderModelComponentName60,rchRenderModelComponentName61,rchRenderModelComponentName62,rchRenderModelComponentName63,rchRenderModelComponentName64,rchRenderModelComponentName65,rchRenderModelComponentName66,rchRenderModelComponentName67,rchRenderModelComponentName68,rchRenderModelComponentName69,rchRenderModelComponentName70,rchRenderModelComponentName71,rchRenderModelComponentName72,rchRenderModelComponentName73,rchRenderModelComponentName74,rchRenderModelComponentName75,rchRenderModelComponentName76,rchRenderModelComponentName77,rchRenderModelComponentName78,rchRenderModelComponentName79,rchRenderModelComponentName80,rchRenderModelComponentName81,rchRenderModelComponentName82,rchRenderModelComponentName83,rchRenderModelComponentName84,rchRenderModelComponentName85,rchRenderModelComponentName86,rchRenderModelComponentName87,rchRenderModelComponentName88,rchRenderModelComponentName89,rchRenderModelComponentName90,rchRenderModelComponentName91,rchRenderModelComponentName92,rchRenderModelComponentName93,rchRenderModelComponentName94,rchRenderModelComponentName95,rchRenderModelComponentName96,rchRenderModelComponentName97,rchRenderModelComponentName98,rchRenderModelComponentName99,rchRenderModelComponentName100,rchRenderModelComponentName101,rchRenderModelComponentName102,rchRenderModelComponentName103,rchRenderModelComponentName104,rchRenderModelComponentName105,rchRenderModelComponentName106,rchRenderModelComponentName107,rchRenderModelComponentName108,rchRenderModelComponentName109,rchRenderModelComponentName110,rchRenderModelComponentName111,rchRenderModelComponentName112,rchRenderModelComponentName113,rchRenderModelComponentName114,rchRenderModelComponentName115,rchRenderModelComponentName116,rchRenderModelComponentName117,rchRenderModelComponentName118,rchRenderModelComponentName119,rchRenderModelComponentName120,rchRenderModelComponentName121,rchRenderModelComponentName122,rchRenderModelComponentName123,rchRenderModelComponentName124,rchRenderModelComponentName125,rchRenderModelComponentName126,rchRenderModelComponentName127; + public string rchRenderModelComponentName + { + get + { + return new string(new char[] { + (char)rchRenderModelComponentName0, + (char)rchRenderModelComponentName1, + (char)rchRenderModelComponentName2, + (char)rchRenderModelComponentName3, + (char)rchRenderModelComponentName4, + (char)rchRenderModelComponentName5, + (char)rchRenderModelComponentName6, + (char)rchRenderModelComponentName7, + (char)rchRenderModelComponentName8, + (char)rchRenderModelComponentName9, + (char)rchRenderModelComponentName10, + (char)rchRenderModelComponentName11, + (char)rchRenderModelComponentName12, + (char)rchRenderModelComponentName13, + (char)rchRenderModelComponentName14, + (char)rchRenderModelComponentName15, + (char)rchRenderModelComponentName16, + (char)rchRenderModelComponentName17, + (char)rchRenderModelComponentName18, + (char)rchRenderModelComponentName19, + (char)rchRenderModelComponentName20, + (char)rchRenderModelComponentName21, + (char)rchRenderModelComponentName22, + (char)rchRenderModelComponentName23, + (char)rchRenderModelComponentName24, + (char)rchRenderModelComponentName25, + (char)rchRenderModelComponentName26, + (char)rchRenderModelComponentName27, + (char)rchRenderModelComponentName28, + (char)rchRenderModelComponentName29, + (char)rchRenderModelComponentName30, + (char)rchRenderModelComponentName31, + (char)rchRenderModelComponentName32, + (char)rchRenderModelComponentName33, + (char)rchRenderModelComponentName34, + (char)rchRenderModelComponentName35, + (char)rchRenderModelComponentName36, + (char)rchRenderModelComponentName37, + (char)rchRenderModelComponentName38, + (char)rchRenderModelComponentName39, + (char)rchRenderModelComponentName40, + (char)rchRenderModelComponentName41, + (char)rchRenderModelComponentName42, + (char)rchRenderModelComponentName43, + (char)rchRenderModelComponentName44, + (char)rchRenderModelComponentName45, + (char)rchRenderModelComponentName46, + (char)rchRenderModelComponentName47, + (char)rchRenderModelComponentName48, + (char)rchRenderModelComponentName49, + (char)rchRenderModelComponentName50, + (char)rchRenderModelComponentName51, + (char)rchRenderModelComponentName52, + (char)rchRenderModelComponentName53, + (char)rchRenderModelComponentName54, + (char)rchRenderModelComponentName55, + (char)rchRenderModelComponentName56, + (char)rchRenderModelComponentName57, + (char)rchRenderModelComponentName58, + (char)rchRenderModelComponentName59, + (char)rchRenderModelComponentName60, + (char)rchRenderModelComponentName61, + (char)rchRenderModelComponentName62, + (char)rchRenderModelComponentName63, + (char)rchRenderModelComponentName64, + (char)rchRenderModelComponentName65, + (char)rchRenderModelComponentName66, + (char)rchRenderModelComponentName67, + (char)rchRenderModelComponentName68, + (char)rchRenderModelComponentName69, + (char)rchRenderModelComponentName70, + (char)rchRenderModelComponentName71, + (char)rchRenderModelComponentName72, + (char)rchRenderModelComponentName73, + (char)rchRenderModelComponentName74, + (char)rchRenderModelComponentName75, + (char)rchRenderModelComponentName76, + (char)rchRenderModelComponentName77, + (char)rchRenderModelComponentName78, + (char)rchRenderModelComponentName79, + (char)rchRenderModelComponentName80, + (char)rchRenderModelComponentName81, + (char)rchRenderModelComponentName82, + (char)rchRenderModelComponentName83, + (char)rchRenderModelComponentName84, + (char)rchRenderModelComponentName85, + (char)rchRenderModelComponentName86, + (char)rchRenderModelComponentName87, + (char)rchRenderModelComponentName88, + (char)rchRenderModelComponentName89, + (char)rchRenderModelComponentName90, + (char)rchRenderModelComponentName91, + (char)rchRenderModelComponentName92, + (char)rchRenderModelComponentName93, + (char)rchRenderModelComponentName94, + (char)rchRenderModelComponentName95, + (char)rchRenderModelComponentName96, + (char)rchRenderModelComponentName97, + (char)rchRenderModelComponentName98, + (char)rchRenderModelComponentName99, + (char)rchRenderModelComponentName100, + (char)rchRenderModelComponentName101, + (char)rchRenderModelComponentName102, + (char)rchRenderModelComponentName103, + (char)rchRenderModelComponentName104, + (char)rchRenderModelComponentName105, + (char)rchRenderModelComponentName106, + (char)rchRenderModelComponentName107, + (char)rchRenderModelComponentName108, + (char)rchRenderModelComponentName109, + (char)rchRenderModelComponentName110, + (char)rchRenderModelComponentName111, + (char)rchRenderModelComponentName112, + (char)rchRenderModelComponentName113, + (char)rchRenderModelComponentName114, + (char)rchRenderModelComponentName115, + (char)rchRenderModelComponentName116, + (char)rchRenderModelComponentName117, + (char)rchRenderModelComponentName118, + (char)rchRenderModelComponentName119, + (char)rchRenderModelComponentName120, + (char)rchRenderModelComponentName121, + (char)rchRenderModelComponentName122, + (char)rchRenderModelComponentName123, + (char)rchRenderModelComponentName124, + (char)rchRenderModelComponentName125, + (char)rchRenderModelComponentName126, + (char)rchRenderModelComponentName127 + }).TrimEnd('\0'); + } + } +} +[StructLayout(LayoutKind.Sequential)] public struct VRActiveActionSet_t +{ + public ulong ulActionSet; + public ulong ulRestrictedToDevice; + public ulong ulSecondaryActionSet; + public uint unPadding; + public int nPriority; +} +[StructLayout(LayoutKind.Sequential)] public struct VRSkeletalSummaryData_t +{ + public float flFingerCurl0; //float[5] + public float flFingerCurl1; + public float flFingerCurl2; + public float flFingerCurl3; + public float flFingerCurl4; + public float flFingerSplay0; //float[4] + public float flFingerSplay1; + public float flFingerSplay2; + public float flFingerSplay3; +} +[StructLayout(LayoutKind.Sequential)] public struct SpatialAnchorPose_t +{ + public HmdMatrix34_t mAnchorToAbsoluteTracking; +} [StructLayout(LayoutKind.Sequential)] public struct COpenVRContext { public IntPtr m_pVRSystem; // class vr::IVRSystem * @@ -4750,6 +5628,9 @@ public enum EVRScreenshotError public IntPtr m_pVRTrackedCamera; // class vr::IVRTrackedCamera * public IntPtr m_pVRScreenshots; // class vr::IVRScreenshots * public IntPtr m_pVRDriverManager; // class vr::IVRDriverManager * + public IntPtr m_pVRInput; // class vr::IVRInput * + public IntPtr m_pVRIOBuffer; // class vr::IVRIOBuffer * + public IntPtr m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors * } public class OpenVR @@ -4760,6 +5641,11 @@ public class OpenVR return OpenVRInterop.InitInternal(ref peError, eApplicationType); } + public static uint InitInternal2(ref EVRInitError peError, EVRApplicationType eApplicationType, string pchStartupInfo) + { + return OpenVRInterop.InitInternal2(ref peError, eApplicationType, pchStartupInfo); + } + public static void ShutdownInternal() { OpenVRInterop.ShutdownInternal(); @@ -4775,6 +5661,11 @@ public class OpenVR return OpenVRInterop.IsRuntimeInstalled(); } + public static string RuntimePath() + { + return OpenVRInterop.RuntimePath(); + } + public static string GetStringForHmdError(EVRInitError error) { return Marshal.PtrToStringAnsi(OpenVRInterop.GetStringForHmdError(error)); @@ -4813,39 +5704,48 @@ public class OpenVR public const uint k_unHmdMatrix44PropertyTag = 21; public const uint k_unHmdVector3PropertyTag = 22; public const uint k_unHmdVector4PropertyTag = 23; + public const uint k_unHmdVector2PropertyTag = 24; + public const uint k_unHmdQuadPropertyTag = 25; public const uint k_unHiddenAreaPropertyTag = 30; public const uint k_unPathHandleInfoTag = 31; public const uint k_unActionPropertyTag = 32; public const uint k_unInputValuePropertyTag = 33; public const uint k_unWildcardPropertyTag = 34; public const uint k_unHapticVibrationPropertyTag = 35; + public const uint k_unSkeletonPropertyTag = 36; + public const uint k_unSpatialAnchorPosePropertyTag = 40; + public const uint k_unJsonPropertyTag = 41; public const uint k_unOpenVRInternalReserved_Start = 1000; public const uint k_unOpenVRInternalReserved_End = 10000; public const uint k_unMaxPropertyStringSize = 32768; + public const ulong k_ulInvalidActionHandle = 0; + public const ulong k_ulInvalidActionSetHandle = 0; + public const ulong k_ulInvalidInputValueHandle = 0; public const uint k_unControllerStateAxisCount = 5; public const ulong k_ulOverlayHandleInvalid = 0; + public const uint k_unMaxDistortionFunctionParameters = 8; public const uint k_unScreenshotHandleInvalid = 0; public const string IVRSystem_Version = "IVRSystem_019"; public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; - public const string IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + public const string IVRTrackedCamera_Version = "IVRTrackedCamera_005"; public const uint k_unMaxApplicationKeyLength = 128; public const string k_pch_MimeType_HomeApp = "vr/home"; public const string k_pch_MimeType_GameTheater = "vr/game_theater"; public const string IVRApplications_Version = "IVRApplications_006"; public const string IVRChaperone_Version = "IVRChaperone_003"; - public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_006"; public const string IVRCompositor_Version = "IVRCompositor_022"; public const uint k_unVROverlayMaxKeyLength = 128; public const uint k_unVROverlayMaxNameLength = 128; public const uint k_unMaxOverlayCount = 64; public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; - public const string IVROverlay_Version = "IVROverlay_018"; + public const string IVROverlay_Version = "IVROverlay_019"; public const string k_pch_Controller_Component_GDC2015 = "gdc2015"; public const string k_pch_Controller_Component_Base = "base"; public const string k_pch_Controller_Component_Tip = "tip"; public const string k_pch_Controller_Component_HandGrip = "handgrip"; public const string k_pch_Controller_Component_Status = "status"; - public const string IVRRenderModels_Version = "IVRRenderModels_005"; + public const string IVRRenderModels_Version = "IVRRenderModels_006"; public const uint k_unNotificationTextMaxSize = 256; public const string IVRNotifications_Version = "IVRNotifications_002"; public const uint k_unMaxSettingsKeyLength = 128; @@ -4869,21 +5769,19 @@ public class OpenVR public const string k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; public const string k_pch_SteamVR_ShowStage_Bool = "showStage"; public const string k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; - public const string k_pch_SteamVR_DirectMode_Bool = "directMode"; - public const string k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; - public const string k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; public const string k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; public const string k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; public const string k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; public const string k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; public const string k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; - public const string k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection"; - public const string k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection"; - public const string k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; + 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_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; - public const string k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + public const string k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; public const string k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; public const string k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + public const string k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized"; public const string k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; public const string k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; public const string k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; @@ -4893,11 +5791,24 @@ public class OpenVR public const string k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; public const string k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; public const string k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; + public const string k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleManualOverride"; public const string k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; 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_SteamVR_LegacyInputRebinding = "legacyInputRebinding"; + public const string k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; + public const string k_pch_SteamVR_InputBindingUIBlock = "inputBindingUI"; + public const string k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; + public const string k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; + public const string k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; + public const string k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; + 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"; + public const string k_pch_DirectMode_EdidVid_Int32 = "edidVid"; + public const string k_pch_DirectMode_EdidPid_Int32 = "edidPid"; 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"; @@ -4907,6 +5818,8 @@ public class OpenVR 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_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; + public const string k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; 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"; @@ -4921,6 +5834,7 @@ public class OpenVR public const string k_pch_UserInterface_Section = "userinterface"; public const string k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; public const string k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + public const string k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized"; public const string k_pch_UserInterface_Screenshots_Bool = "screenshots"; public const string k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; public const string k_pch_Notifications_Section = "notifications"; @@ -4934,9 +5848,7 @@ public class OpenVR public const string k_pch_Keyboard_OffsetY = "OffsetY"; public const string k_pch_Keyboard_Smoothing = "Smoothing"; public const string k_pch_Perf_Section = "perfcheck"; - public const string k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; - public const string k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; - public const string k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + public const string k_pch_Perf_PerfGraphInHMD_Bool = "perfGraphInHMD"; public const string k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; public const string k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; public const string k_pch_Perf_TestData_Float = "perfTestData"; @@ -4961,6 +5873,7 @@ public class OpenVR public const string k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; public const string k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; public const string k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + public const string k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode"; public const string k_pch_audio_Section = "audio"; public const string k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; public const string k_pch_audio_OnRecordDevice_String = "onRecordDevice"; @@ -4979,13 +5892,38 @@ public class OpenVR 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_Dashboard_EnableWebUIDevTools = "webUIDevTools"; + public const string k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard"; 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_WebEnable_Bool = "WebEnable"; public const string k_pch_WebInterface_WebPort_String = "WebPort"; + public const string k_pch_VRWebHelper_Section = "VRWebHelper"; + public const string k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled"; + public const string k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort"; + public const string k_pch_TrackingOverride_Section = "TrackingOverrides"; + public const string k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; + public const string k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL"; + public const string k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; + public const string k_pch_App_ActionManifestURL_String = "ActionManifestURL"; + public const string k_pch_Trackers_Section = "trackers"; + public const string k_pch_DesktopUI_Section = "DesktopUI"; + public const string k_pch_LastKnown_Section = "LastKnown"; + public const string k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; + public const string k_pch_LastKnown_HMDModel_String = "HMDModel"; public const string IVRScreenshots_Version = "IVRScreenshots_001"; public const string IVRResources_Version = "IVRResources_001"; public const string IVRDriverManager_Version = "IVRDriverManager_001"; + public const uint k_unMaxActionNameLength = 64; + public const uint k_unMaxActionSetNameLength = 64; + public const uint k_unMaxActionOriginCount = 16; + public const uint k_unMaxBoneNameLength = 32; + public const string IVRInput_Version = "IVRInput_005"; + public const ulong k_ulInvalidIOBufferHandle = 0; + public const string IVRIOBuffer_Version = "IVRIOBuffer_001"; + public const uint k_ulInvalidSpatialAnchorHandle = 0; + public const string IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; static uint VRToken { get; set; } @@ -5008,6 +5946,8 @@ public class OpenVR m_pVRApplications = null; m_pVRScreenshots = null; m_pVRTrackedCamera = null; + m_pVRInput = null; + m_pVRSpatialAnchors = null; } void CheckClear() @@ -5162,6 +6102,32 @@ public class OpenVR return m_pVRTrackedCamera; } + public CVRInput VRInput() + { + CheckClear(); + if (m_pVRInput == null) + { + var eError = EVRInitError.None; + var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRInput_Version, ref eError); + if (pInterface != IntPtr.Zero && eError == EVRInitError.None) + m_pVRInput = new CVRInput(pInterface); + } + return m_pVRInput; + } + + public CVRSpatialAnchors VRSpatialAnchors() + { + CheckClear(); + if (m_pVRSpatialAnchors == null) + { + var eError = EVRInitError.None; + var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix + IVRSpatialAnchors_Version, ref eError); + if (pInterface != IntPtr.Zero && eError == EVRInitError.None) + m_pVRSpatialAnchors = new CVRSpatialAnchors(pInterface); + } + return m_pVRSpatialAnchors; + } + private CVRSystem m_pVRSystem; private CVRChaperone m_pVRChaperone; private CVRChaperoneSetup m_pVRChaperoneSetup; @@ -5173,6 +6139,8 @@ public class OpenVR private CVRApplications m_pVRApplications; private CVRScreenshots m_pVRScreenshots; private CVRTrackedCamera m_pVRTrackedCamera; + private CVRInput m_pVRInput; + private CVRSpatialAnchors m_pVRSpatialAnchors; }; private static COpenVRContext _OpenVRInternal_ModuleContext = null; @@ -5197,11 +6165,21 @@ public class OpenVR public static CVRApplications Applications { get { return OpenVRInternal_ModuleContext.VRApplications(); } } public static CVRScreenshots Screenshots { get { return OpenVRInternal_ModuleContext.VRScreenshots(); } } public static CVRTrackedCamera TrackedCamera { get { return OpenVRInternal_ModuleContext.VRTrackedCamera(); } } + public static CVRInput Input { get { return OpenVRInternal_ModuleContext.VRInput(); } } + public static CVRSpatialAnchors SpatialAnchors { get { return OpenVRInternal_ModuleContext.VRSpatialAnchors(); } } /** Finds the active installation of vrclient.dll and initializes it */ - public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene) + public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene, string pchStartupInfo= "") { - VRToken = InitInternal(ref peError, eApplicationType); + try + { + VRToken = InitInternal2(ref peError, eApplicationType, pchStartupInfo); + } + catch (EntryPointNotFoundException) + { + VRToken = InitInternal(ref peError, eApplicationType); + } + OpenVRInternal_ModuleContext.Clear(); if (peError != EVRInitError.None) diff --git a/third-party/openvr/headers/openvr_api.json b/third-party/openvr/headers/openvr_api.json index 05ea66a..fab82e8 100644 --- a/third-party/openvr/headers/openvr_api.json +++ b/third-party/openvr/headers/openvr_api.json @@ -1,21 +1,28 @@ -{"typedefs":[{"typedef": "vr::glSharedTextureHandle_t","type": "void *"} +{"typedefs":[{"typedef": "vr::SpatialAnchorHandle_t","type": "uint32_t"} +,{"typedef": "vr::glSharedTextureHandle_t","type": "void *"} ,{"typedef": "vr::glInt_t","type": "int32_t"} ,{"typedef": "vr::glUInt_t","type": "uint32_t"} ,{"typedef": "vr::SharedTextureHandle_t","type": "uint64_t"} ,{"typedef": "vr::DriverId_t","type": "uint32_t"} ,{"typedef": "vr::TrackedDeviceIndex_t","type": "uint32_t"} +,{"typedef": "vr::WebConsoleHandle_t","type": "uint64_t"} ,{"typedef": "vr::PropertyContainerHandle_t","type": "uint64_t"} ,{"typedef": "vr::PropertyTypeTag_t","type": "uint32_t"} ,{"typedef": "vr::DriverHandle_t","type": "PropertyContainerHandle_t"} +,{"typedef": "vr::VRActionHandle_t","type": "uint64_t"} +,{"typedef": "vr::VRActionSetHandle_t","type": "uint64_t"} +,{"typedef": "vr::VRInputValueHandle_t","type": "uint64_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"} +,{"typedef": "vr::BoneIndex_t","type": "int32_t"} ,{"typedef": "vr::TrackedCameraHandle_t","type": "uint64_t"} ,{"typedef": "vr::ScreenshotHandle_t","type": "uint32_t"} ,{"typedef": "vr::VROverlayIntersectionMaskPrimitive_Data_t","type": "union VROverlayIntersectionMaskPrimitive_Data_t"} ,{"typedef": "vr::VRComponentProperties","type": "uint32_t"} ,{"typedef": "vr::TextureID_t","type": "int32_t"} ,{"typedef": "vr::VRNotificationId","type": "uint32_t"} +,{"typedef": "vr::IOBufferHandle_t","type": "uint64_t"} ,{"typedef": "vr::HmdError","type": "enum vr::EVRInitError"} ,{"typedef": "vr::Hmd_Eye","type": "enum vr::EVREye"} ,{"typedef": "vr::ColorSpace","type": "enum vr::EColorSpace"} @@ -38,12 +45,14 @@ ,{"name": "Eye_Right","value": "1"} ]} , {"enumname": "vr::ETextureType","values": [ - {"name": "TextureType_DirectX","value": "0"} + {"name": "TextureType_Invalid","value": "-1"} + ,{"name": "TextureType_DirectX","value": "0"} ,{"name": "TextureType_OpenGL","value": "1"} ,{"name": "TextureType_Vulkan","value": "2"} ,{"name": "TextureType_IOSurface","value": "3"} ,{"name": "TextureType_DirectX12","value": "4"} ,{"name": "TextureType_DXGISharedHandle","value": "5"} + ,{"name": "TextureType_Metal","value": "6"} ]} , {"enumname": "vr::EColorSpace","values": [ {"name": "ColorSpace_Auto","value": "0"} @@ -56,6 +65,7 @@ ,{"name": "TrackingResult_Calibrating_OutOfRange","value": "101"} ,{"name": "TrackingResult_Running_OK","value": "200"} ,{"name": "TrackingResult_Running_OutOfRange","value": "201"} + ,{"name": "TrackingResult_Fallback_RotationOnly","value": "300"} ]} , {"enumname": "vr::ETrackedDeviceClass","values": [ {"name": "TrackedDeviceClass_Invalid","value": "0"} @@ -64,12 +74,15 @@ ,{"name": "TrackedDeviceClass_GenericTracker","value": "3"} ,{"name": "TrackedDeviceClass_TrackingReference","value": "4"} ,{"name": "TrackedDeviceClass_DisplayRedirect","value": "5"} + ,{"name": "TrackedDeviceClass_Max","value": "6"} ]} , {"enumname": "vr::ETrackedControllerRole","values": [ {"name": "TrackedControllerRole_Invalid","value": "0"} ,{"name": "TrackedControllerRole_LeftHand","value": "1"} ,{"name": "TrackedControllerRole_RightHand","value": "2"} ,{"name": "TrackedControllerRole_OptOut","value": "3"} + ,{"name": "TrackedControllerRole_Treadmill","value": "4"} + ,{"name": "TrackedControllerRole_Max","value": "4"} ]} , {"enumname": "vr::ETrackingUniverseOrigin","values": [ {"name": "TrackingUniverseSeated","value": "0"} @@ -117,6 +130,11 @@ ,{"name": "Prop_RegisteredDeviceType_String","value": "1036"} ,{"name": "Prop_InputProfilePath_String","value": "1037"} ,{"name": "Prop_NeverTracked_Bool","value": "1038"} + ,{"name": "Prop_NumCameras_Int32","value": "1039"} + ,{"name": "Prop_CameraFrameLayout_Int32","value": "1040"} + ,{"name": "Prop_CameraStreamFormat_Int32","value": "1041"} + ,{"name": "Prop_AdditionalDeviceSettingsPath_String","value": "1042"} + ,{"name": "Prop_Identifiable_Bool","value": "1043"} ,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"} ,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"} ,{"name": "Prop_DisplayFrequency_Float","value": "2002"} @@ -178,6 +196,21 @@ ,{"name": "Prop_MinimumIpdStepMeters_Float","value": "2060"} ,{"name": "Prop_AudioBridgeFirmwareVersion_Uint64","value": "2061"} ,{"name": "Prop_ImageBridgeFirmwareVersion_Uint64","value": "2062"} + ,{"name": "Prop_ImuToHeadTransform_Matrix34","value": "2063"} + ,{"name": "Prop_ImuFactoryGyroBias_Vector3","value": "2064"} + ,{"name": "Prop_ImuFactoryGyroScale_Vector3","value": "2065"} + ,{"name": "Prop_ImuFactoryAccelerometerBias_Vector3","value": "2066"} + ,{"name": "Prop_ImuFactoryAccelerometerScale_Vector3","value": "2067"} + ,{"name": "Prop_ConfigurationIncludesLighthouse20Features_Bool","value": "2069"} + ,{"name": "Prop_DriverRequestedMuraCorrectionMode_Int32","value": "2200"} + ,{"name": "Prop_DriverRequestedMuraFeather_InnerLeft_Int32","value": "2201"} + ,{"name": "Prop_DriverRequestedMuraFeather_InnerRight_Int32","value": "2202"} + ,{"name": "Prop_DriverRequestedMuraFeather_InnerTop_Int32","value": "2203"} + ,{"name": "Prop_DriverRequestedMuraFeather_InnerBottom_Int32","value": "2204"} + ,{"name": "Prop_DriverRequestedMuraFeather_OuterLeft_Int32","value": "2205"} + ,{"name": "Prop_DriverRequestedMuraFeather_OuterRight_Int32","value": "2206"} + ,{"name": "Prop_DriverRequestedMuraFeather_OuterTop_Int32","value": "2207"} + ,{"name": "Prop_DriverRequestedMuraFeather_OuterBottom_Int32","value": "2208"} ,{"name": "Prop_AttachedDeviceId_String","value": "3000"} ,{"name": "Prop_SupportedButtons_Uint64","value": "3001"} ,{"name": "Prop_Axis0Type_Int32","value": "3002"} @@ -212,8 +245,10 @@ ,{"name": "Prop_HasCameraComponent_Bool","value": "6004"} ,{"name": "Prop_HasDriverDirectModeComponent_Bool","value": "6005"} ,{"name": "Prop_HasVirtualDisplayComponent_Bool","value": "6006"} + ,{"name": "Prop_HasSpatialAnchorsSupport_Bool","value": "6007"} ,{"name": "Prop_ControllerType_String","value": "7000"} ,{"name": "Prop_LegacyInputProfile_String","value": "7001"} + ,{"name": "Prop_ControllerHandSelectionPriority_Int32","value": "7002"} ,{"name": "Prop_VendorSpecific_Reserved_Start","value": "10000"} ,{"name": "Prop_VendorSpecific_Reserved_End","value": "10999"} ,{"name": "Prop_TrackedDeviceProperty_Max","value": "1000000"} @@ -232,6 +267,7 @@ ,{"name": "TrackedProp_PermissionDenied","value": "10"} ,{"name": "TrackedProp_InvalidOperation","value": "11"} ,{"name": "TrackedProp_CannotWriteToWildcards","value": "12"} + ,{"name": "TrackedProp_IPCReadFailure","value": "13"} ]} , {"enumname": "vr::EVRSubmitFlags","values": [ {"name": "Submit_Default","value": "0"} @@ -288,6 +324,7 @@ ,{"name": "VREvent_Scroll","value": "305"} ,{"name": "VREvent_TouchPadMove","value": "306"} ,{"name": "VREvent_OverlayFocusChanged","value": "307"} + ,{"name": "VREvent_ReloadOverlays","value": "308"} ,{"name": "VREvent_InputFocusCaptured","value": "400"} ,{"name": "VREvent_InputFocusReleased","value": "401"} ,{"name": "VREvent_SceneFocusLost","value": "402"} @@ -297,6 +334,7 @@ ,{"name": "VREvent_InputFocusChanged","value": "406"} ,{"name": "VREvent_SceneApplicationSecondaryRenderingStarted","value": "407"} ,{"name": "VREvent_SceneApplicationUsingWrongGraphicsAdapter","value": "408"} + ,{"name": "VREvent_ActionBindingReloaded","value": "409"} ,{"name": "VREvent_HideRenderModels","value": "410"} ,{"name": "VREvent_ShowRenderModels","value": "411"} ,{"name": "VREvent_ConsoleOpened","value": "420"} @@ -327,6 +365,7 @@ ,{"name": "VREvent_PrimaryDashboardDeviceChanged","value": "525"} ,{"name": "VREvent_RoomViewShown","value": "526"} ,{"name": "VREvent_RoomViewHidden","value": "527"} + ,{"name": "VREvent_ShowUI","value": "528"} ,{"name": "VREvent_Notification_Shown","value": "600"} ,{"name": "VREvent_Notification_Hidden","value": "601"} ,{"name": "VREvent_Notification_BeginInteraction","value": "602"} @@ -341,6 +380,7 @@ ,{"name": "VREvent_ChaperoneTempDataHasChanged","value": "802"} ,{"name": "VREvent_ChaperoneSettingsHaveChanged","value": "803"} ,{"name": "VREvent_SeatedZeroPoseReset","value": "804"} + ,{"name": "VREvent_ChaperoneFlushCache","value": "805"} ,{"name": "VREvent_AudioSettingsHaveChanged","value": "820"} ,{"name": "VREvent_BackgroundSettingHasChanged","value": "850"} ,{"name": "VREvent_CameraSettingsHaveChanged","value": "851"} @@ -358,6 +398,8 @@ ,{"name": "VREvent_PerfSectionSettingChanged","value": "863"} ,{"name": "VREvent_DashboardSectionSettingChanged","value": "864"} ,{"name": "VREvent_WebInterfaceSectionSettingChanged","value": "865"} + ,{"name": "VREvent_TrackersSectionSettingChanged","value": "866"} + ,{"name": "VREvent_LastKnownSectionSettingChanged","value": "867"} ,{"name": "VREvent_StatusUpdate","value": "900"} ,{"name": "VREvent_WebInterface_InstallDriverCompleted","value": "950"} ,{"name": "VREvent_MCImageUpdated","value": "1000"} @@ -389,6 +431,16 @@ ,{"name": "VREvent_MessageOverlay_Closed","value": "1650"} ,{"name": "VREvent_MessageOverlayCloseRequested","value": "1651"} ,{"name": "VREvent_Input_HapticVibration","value": "1700"} + ,{"name": "VREvent_Input_BindingLoadFailed","value": "1701"} + ,{"name": "VREvent_Input_BindingLoadSuccessful","value": "1702"} + ,{"name": "VREvent_Input_ActionManifestReloaded","value": "1703"} + ,{"name": "VREvent_Input_ActionManifestLoadFailed","value": "1704"} + ,{"name": "VREvent_Input_ProgressUpdate","value": "1705"} + ,{"name": "VREvent_Input_TrackerActivated","value": "1706"} + ,{"name": "VREvent_SpatialAnchors_PoseUpdated","value": "1800"} + ,{"name": "VREvent_SpatialAnchors_DescriptorUpdated","value": "1801"} + ,{"name": "VREvent_SpatialAnchors_RequestPoseUpdate","value": "1802"} + ,{"name": "VREvent_SpatialAnchors_RequestDescriptorUpdate","value": "1803"} ,{"name": "VREvent_VendorSpecific_Reserved_Start","value": "10000"} ,{"name": "VREvent_VendorSpecific_Reserved_End","value": "19999"} ]} @@ -417,6 +469,9 @@ ,{"name": "k_EButton_SteamVR_Touchpad","value": "32"} ,{"name": "k_EButton_SteamVR_Trigger","value": "33"} ,{"name": "k_EButton_Dashboard_Back","value": "2"} + ,{"name": "k_EButton_Knuckles_A","value": "2"} + ,{"name": "k_EButton_Knuckles_B","value": "1"} + ,{"name": "k_EButton_Knuckles_JoyStick","value": "35"} ,{"name": "k_EButton_Max","value": "64"} ]} , {"enumname": "vr::EVRMouseButton","values": [ @@ -428,6 +483,11 @@ {"name": "k_EDualAnalog_Left","value": "0"} ,{"name": "k_EDualAnalog_Right","value": "1"} ]} +, {"enumname": "vr::EShowUIType","values": [ + {"name": "ShowUI_ControllerBinding","value": "0"} + ,{"name": "ShowUI_ManageTrackers","value": "1"} + ,{"name": "ShowUI_QuickStart","value": "2"} +]} , {"enumname": "vr::EVRInputError","values": [ {"name": "VRInputError_None","value": "0"} ,{"name": "VRInputError_NameNotFound","value": "1"} @@ -439,6 +499,30 @@ ,{"name": "VRInputError_IPCError","value": "7"} ,{"name": "VRInputError_NoActiveActionSet","value": "8"} ,{"name": "VRInputError_InvalidDevice","value": "9"} + ,{"name": "VRInputError_InvalidSkeleton","value": "10"} + ,{"name": "VRInputError_InvalidBoneCount","value": "11"} + ,{"name": "VRInputError_InvalidCompressedData","value": "12"} + ,{"name": "VRInputError_NoData","value": "13"} + ,{"name": "VRInputError_BufferTooSmall","value": "14"} + ,{"name": "VRInputError_MismatchedActionManifest","value": "15"} + ,{"name": "VRInputError_MissingSkeletonData","value": "16"} + ,{"name": "VRInputError_InvalidBoneIndex","value": "17"} +]} +, {"enumname": "vr::EVRSpatialAnchorError","values": [ + {"name": "VRSpatialAnchorError_Success","value": "0"} + ,{"name": "VRSpatialAnchorError_Internal","value": "1"} + ,{"name": "VRSpatialAnchorError_UnknownHandle","value": "2"} + ,{"name": "VRSpatialAnchorError_ArrayTooSmall","value": "3"} + ,{"name": "VRSpatialAnchorError_InvalidDescriptorChar","value": "4"} + ,{"name": "VRSpatialAnchorError_NotYetAvailable","value": "5"} + ,{"name": "VRSpatialAnchorError_NotAvailableInThisUniverse","value": "6"} + ,{"name": "VRSpatialAnchorError_PermanentlyUnavailable","value": "7"} + ,{"name": "VRSpatialAnchorError_WrongDriver","value": "8"} + ,{"name": "VRSpatialAnchorError_DescriptorTooLong","value": "9"} + ,{"name": "VRSpatialAnchorError_Unknown","value": "10"} + ,{"name": "VRSpatialAnchorError_NoRoomCalibration","value": "11"} + ,{"name": "VRSpatialAnchorError_InvalidArgument","value": "12"} + ,{"name": "VRSpatialAnchorError_UnknownDriver","value": "13"} ]} , {"enumname": "vr::EHiddenAreaMeshType","values": [ {"name": "k_eHiddenAreaMesh_Standard","value": "0"} @@ -499,7 +583,8 @@ ,{"name": "VRApplication_VRMonitor","value": "5"} ,{"name": "VRApplication_SteamWatchdog","value": "6"} ,{"name": "VRApplication_Bootstrapper","value": "7"} - ,{"name": "VRApplication_Max","value": "8"} + ,{"name": "VRApplication_WebHelper","value": "8"} + ,{"name": "VRApplication_Max","value": "9"} ]} , {"enumname": "vr::EVRFirmwareError","values": [ {"name": "VRFirmwareError_None","value": "0"} @@ -513,6 +598,17 @@ ,{"name": "VRNotificationError_InvalidOverlayHandle","value": "102"} ,{"name": "VRNotificationError_SystemWithUserValueAlreadyExists","value": "103"} ]} +, {"enumname": "vr::EVRSkeletalMotionRange","values": [ + {"name": "VRSkeletalMotionRange_WithController","value": "0"} + ,{"name": "VRSkeletalMotionRange_WithoutController","value": "1"} +]} +, {"enumname": "vr::EVRSkeletalTrackingLevel","values": [ + {"name": "VRSkeletalTracking_Estimated","value": "0"} + ,{"name": "VRSkeletalTracking_Partial","value": "1"} + ,{"name": "VRSkeletalTracking_Full","value": "2"} + ,{"name": "VRSkeletalTrackingLevel_Count","value": "3"} + ,{"name": "VRSkeletalTrackingLevel_Max","value": "2"} +]} , {"enumname": "vr::EVRInitError","values": [ {"name": "VRInitError_None","value": "0"} ,{"name": "VRInitError_Unknown","value": "1"} @@ -558,6 +654,7 @@ ,{"name": "VRInitError_Init_FirmwareRecoveryBusy","value": "139"} ,{"name": "VRInitError_Init_USBServiceBusy","value": "140"} ,{"name": "VRInitError_Init_VRWebHelperStartupFailed","value": "141"} + ,{"name": "VRInitError_Init_TrackerManagerInitFailed","value": "142"} ,{"name": "VRInitError_Driver_Failed","value": "200"} ,{"name": "VRInitError_Driver_Unknown","value": "201"} ,{"name": "VRInitError_Driver_HmdUnknown","value": "202"} @@ -633,12 +730,41 @@ ,{"name": "VRTrackedCameraError_InvalidArgument","value": "114"} ,{"name": "VRTrackedCameraError_InvalidFrameBufferSize","value": "115"} ]} +, {"enumname": "vr::EVRTrackedCameraFrameLayout","values": [ + {"name": "EVRTrackedCameraFrameLayout_Mono","value": "1"} + ,{"name": "EVRTrackedCameraFrameLayout_Stereo","value": "2"} + ,{"name": "EVRTrackedCameraFrameLayout_VerticalLayout","value": "16"} + ,{"name": "EVRTrackedCameraFrameLayout_HorizontalLayout","value": "32"} +]} , {"enumname": "vr::EVRTrackedCameraFrameType","values": [ {"name": "VRTrackedCameraFrameType_Distorted","value": "0"} ,{"name": "VRTrackedCameraFrameType_Undistorted","value": "1"} ,{"name": "VRTrackedCameraFrameType_MaximumUndistorted","value": "2"} ,{"name": "MAX_CAMERA_FRAME_TYPES","value": "3"} ]} +, {"enumname": "vr::EVRDistortionFunctionType","values": [ + {"name": "VRDistortionFunctionType_None","value": "0"} + ,{"name": "VRDistortionFunctionType_FTheta","value": "1"} + ,{"name": "VRDistortionFucntionType_Extended_FTheta","value": "2"} + ,{"name": "MAX_DISTORTION_FUNCTION_TYPES","value": "3"} +]} +, {"enumname": "vr::EVSync","values": [ + {"name": "VSync_None","value": "0"} + ,{"name": "VSync_WaitRender","value": "1"} + ,{"name": "VSync_NoWaitRender","value": "2"} +]} +, {"enumname": "vr::EVRMuraCorrectionMode","values": [ + {"name": "EVRMuraCorrectionMode_Default","value": "0"} + ,{"name": "EVRMuraCorrectionMode_NoCorrection","value": "1"} +]} +, {"enumname": "vr::Imu_OffScaleFlags","values": [ + {"name": "OffScale_AccelX","value": "1"} + ,{"name": "OffScale_AccelY","value": "2"} + ,{"name": "OffScale_AccelZ","value": "4"} + ,{"name": "OffScale_GyroX","value": "8"} + ,{"name": "OffScale_GyroY","value": "16"} + ,{"name": "OffScale_GyroZ","value": "32"} +]} , {"enumname": "vr::EVRApplicationError","values": [ {"name": "VRApplicationError_None","value": "0"} ,{"name": "VRApplicationError_AppKeyAlreadyExists","value": "100"} @@ -753,6 +879,7 @@ ,{"name": "VROverlayFlags_StereoPanorama","value": "13"} ,{"name": "VROverlayFlags_SortWithNonSceneOverlays","value": "14"} ,{"name": "VROverlayFlags_VisibleInDashboard","value": "15"} + ,{"name": "VROverlayFlags_MakeOverlaysInteractiveIfVisible","value": "16"} ]} , {"enumname": "vr::VRMessageOverlayResponse","values": [ {"name": "VRMessageOverlayResponse_ButtonPress_0","value": "0"} @@ -833,6 +960,55 @@ ,{"name": "VRScreenshotError_BufferTooSmall","value": "102"} ,{"name": "VRScreenshotError_ScreenshotAlreadyInProgress","value": "108"} ]} +, {"enumname": "vr::EVRSkeletalTransformSpace","values": [ + {"name": "VRSkeletalTransformSpace_Model","value": "0"} + ,{"name": "VRSkeletalTransformSpace_Parent","value": "1"} +]} +, {"enumname": "vr::EVRSkeletalReferencePose","values": [ + {"name": "VRSkeletalReferencePose_BindPose","value": "0"} + ,{"name": "VRSkeletalReferencePose_OpenHand","value": "1"} + ,{"name": "VRSkeletalReferencePose_Fist","value": "2"} + ,{"name": "VRSkeletalReferencePose_GripLimit","value": "3"} +]} +, {"enumname": "vr::EVRFinger","values": [ + {"name": "VRFinger_Thumb","value": "0"} + ,{"name": "VRFinger_Index","value": "1"} + ,{"name": "VRFinger_Middle","value": "2"} + ,{"name": "VRFinger_Ring","value": "3"} + ,{"name": "VRFinger_Pinky","value": "4"} + ,{"name": "VRFinger_Count","value": "5"} +]} +, {"enumname": "vr::EVRFingerSplay","values": [ + {"name": "VRFingerSplay_Thumb_Index","value": "0"} + ,{"name": "VRFingerSplay_Index_Middle","value": "1"} + ,{"name": "VRFingerSplay_Middle_Ring","value": "2"} + ,{"name": "VRFingerSplay_Ring_Pinky","value": "3"} + ,{"name": "VRFingerSplay_Count","value": "4"} +]} +, {"enumname": "vr::EVRInputFilterCancelType","values": [ + {"name": "VRInputFilterCancel_Timers","value": "0"} + ,{"name": "VRInputFilterCancel_Momentum","value": "1"} +]} +, {"enumname": "vr::EVRInputStringBits","values": [ + {"name": "VRInputString_Hand","value": "1"} + ,{"name": "VRInputString_ControllerType","value": "2"} + ,{"name": "VRInputString_InputSource","value": "4"} + ,{"name": "VRInputString_All","value": "-1"} +]} +, {"enumname": "vr::EIOBufferError","values": [ + {"name": "IOBuffer_Success","value": "0"} + ,{"name": "IOBuffer_OperationFailed","value": "100"} + ,{"name": "IOBuffer_InvalidHandle","value": "101"} + ,{"name": "IOBuffer_InvalidArgument","value": "102"} + ,{"name": "IOBuffer_PathExists","value": "103"} + ,{"name": "IOBuffer_PathDoesNotExist","value": "104"} + ,{"name": "IOBuffer_Permission","value": "105"} +]} +, {"enumname": "vr::EIOBufferMode","values": [ + {"name": "IOBufferMode_Read","value": "1"} + ,{"name": "IOBufferMode_Write","value": "2"} + ,{"name": "IOBufferMode_Create","value": "512"} +]} ], "consts":[{ "constname": "k_nDriverNone","consttype": "const uint32_t", "constval": "4294967295"} @@ -870,6 +1046,10 @@ "constname": "k_unHmdVector3PropertyTag","consttype": "const PropertyTypeTag_t", "constval": "22"} ,{ "constname": "k_unHmdVector4PropertyTag","consttype": "const PropertyTypeTag_t", "constval": "23"} +,{ + "constname": "k_unHmdVector2PropertyTag","consttype": "const PropertyTypeTag_t", "constval": "24"} +,{ + "constname": "k_unHmdQuadPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "25"} ,{ "constname": "k_unHiddenAreaPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "30"} ,{ @@ -882,16 +1062,30 @@ "constname": "k_unWildcardPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "34"} ,{ "constname": "k_unHapticVibrationPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "35"} +,{ + "constname": "k_unSkeletonPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "36"} +,{ + "constname": "k_unSpatialAnchorPosePropertyTag","consttype": "const PropertyTypeTag_t", "constval": "40"} +,{ + "constname": "k_unJsonPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "41"} ,{ "constname": "k_unOpenVRInternalReserved_Start","consttype": "const PropertyTypeTag_t", "constval": "1000"} ,{ "constname": "k_unOpenVRInternalReserved_End","consttype": "const PropertyTypeTag_t", "constval": "10000"} ,{ "constname": "k_unMaxPropertyStringSize","consttype": "const uint32_t", "constval": "32768"} +,{ + "constname": "k_ulInvalidActionHandle","consttype": "const VRActionHandle_t", "constval": "0"} +,{ + "constname": "k_ulInvalidActionSetHandle","consttype": "const VRActionSetHandle_t", "constval": "0"} +,{ + "constname": "k_ulInvalidInputValueHandle","consttype": "const VRInputValueHandle_t", "constval": "0"} ,{ "constname": "k_unControllerStateAxisCount","consttype": "const uint32_t", "constval": "5"} ,{ "constname": "k_ulOverlayHandleInvalid","consttype": "const VROverlayHandle_t", "constval": "0"} +,{ + "constname": "k_unMaxDistortionFunctionParameters","consttype": "const uint32_t", "constval": "8"} ,{ "constname": "k_unScreenshotHandleInvalid","consttype": "const uint32_t", "constval": "0"} ,{ @@ -899,7 +1093,7 @@ ,{ "constname": "IVRExtendedDisplay_Version","consttype": "const char *const", "constval": "IVRExtendedDisplay_001"} ,{ - "constname": "IVRTrackedCamera_Version","consttype": "const char *const", "constval": "IVRTrackedCamera_003"} + "constname": "IVRTrackedCamera_Version","consttype": "const char *const", "constval": "IVRTrackedCamera_005"} ,{ "constname": "k_unMaxApplicationKeyLength","consttype": "const uint32_t", "constval": "128"} ,{ @@ -911,7 +1105,7 @@ ,{ "constname": "IVRChaperone_Version","consttype": "const char *const", "constval": "IVRChaperone_003"} ,{ - "constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_005"} + "constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_006"} ,{ "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_022"} ,{ @@ -923,7 +1117,7 @@ ,{ "constname": "k_unMaxOverlayIntersectionMaskPrimitivesCount","consttype": "const uint32_t", "constval": "32"} ,{ - "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_018"} + "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_019"} ,{ "constname": "k_pch_Controller_Component_GDC2015","consttype": "const char *const", "constval": "gdc2015"} ,{ @@ -935,7 +1129,7 @@ ,{ "constname": "k_pch_Controller_Component_Status","consttype": "const char *const", "constval": "status"} ,{ - "constname": "IVRRenderModels_Version","consttype": "const char *const", "constval": "IVRRenderModels_005"} + "constname": "IVRRenderModels_Version","consttype": "const char *const", "constval": "IVRRenderModels_006"} ,{ "constname": "k_unNotificationTextMaxSize","consttype": "const uint32_t", "constval": "256"} ,{ @@ -982,12 +1176,6 @@ "constname": "k_pch_SteamVR_ShowStage_Bool","consttype": "const char *const", "constval": "showStage"} ,{ "constname": "k_pch_SteamVR_ActivateMultipleDrivers_Bool","consttype": "const char *const", "constval": "activateMultipleDrivers"} -,{ - "constname": "k_pch_SteamVR_DirectMode_Bool","consttype": "const char *const", "constval": "directMode"} -,{ - "constname": "k_pch_SteamVR_DirectModeEdidVid_Int32","consttype": "const char *const", "constval": "directModeEdidVid"} -,{ - "constname": "k_pch_SteamVR_DirectModeEdidPid_Int32","consttype": "const char *const", "constval": "directModeEdidPid"} ,{ "constname": "k_pch_SteamVR_UsingSpeakers_Bool","consttype": "const char *const", "constval": "usingSpeakers"} ,{ @@ -999,19 +1187,21 @@ ,{ "constname": "k_pch_SteamVR_SupersampleScale_Float","consttype": "const char *const", "constval": "supersampleScale"} ,{ - "constname": "k_pch_SteamVR_AllowAsyncReprojection_Bool","consttype": "const char *const", "constval": "allowAsyncReprojection"} + "constname": "k_pch_SteamVR_MaxRecommendedResolution_Int32","consttype": "const char *const", "constval": "maxRecommendedResolution"} ,{ - "constname": "k_pch_SteamVR_AllowReprojection_Bool","consttype": "const char *const", "constval": "allowInterleavedReprojection"} + "constname": "k_pch_SteamVR_MotionSmoothing_Bool","consttype": "const char *const", "constval": "motionSmoothing"} ,{ - "constname": "k_pch_SteamVR_ForceReprojection_Bool","consttype": "const char *const", "constval": "forceReprojection"} + "constname": "k_pch_SteamVR_MotionSmoothingOverride_Int32","consttype": "const char *const", "constval": "motionSmoothingOverride"} ,{ "constname": "k_pch_SteamVR_ForceFadeOnBadTracking_Bool","consttype": "const char *const", "constval": "forceFadeOnBadTracking"} ,{ - "constname": "k_pch_SteamVR_DefaultMirrorView_Int32","consttype": "const char *const", "constval": "defaultMirrorView"} + "constname": "k_pch_SteamVR_DefaultMirrorView_Int32","consttype": "const char *const", "constval": "mirrorView"} ,{ "constname": "k_pch_SteamVR_ShowMirrorView_Bool","consttype": "const char *const", "constval": "showMirrorView"} ,{ "constname": "k_pch_SteamVR_MirrorViewGeometry_String","consttype": "const char *const", "constval": "mirrorViewGeometry"} +,{ + "constname": "k_pch_SteamVR_MirrorViewGeometryMaximized_String","consttype": "const char *const", "constval": "mirrorViewGeometryMaximized"} ,{ "constname": "k_pch_SteamVR_StartMonitorFromAppLaunch","consttype": "const char *const", "constval": "startMonitorFromAppLaunch"} ,{ @@ -1030,6 +1220,8 @@ "constname": "k_pch_SteamVR_IpdOffset_Float","consttype": "const char *const", "constval": "ipdOffset"} ,{ "constname": "k_pch_SteamVR_AllowSupersampleFiltering_Bool","consttype": "const char *const", "constval": "allowSupersampleFiltering"} +,{ + "constname": "k_pch_SteamVR_SupersampleManualOverride_Bool","consttype": "const char *const", "constval": "supersampleManualOverride"} ,{ "constname": "k_pch_SteamVR_EnableLinuxVulkanAsync_Bool","consttype": "const char *const", "constval": "enableLinuxVulkanAsync"} ,{ @@ -1040,6 +1232,30 @@ "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_SteamVR_LegacyInputRebinding","consttype": "const char *const", "constval": "legacyInputRebinding"} +,{ + "constname": "k_pch_SteamVR_DebugInputBinding","consttype": "const char *const", "constval": "debugInputBinding"} +,{ + "constname": "k_pch_SteamVR_InputBindingUIBlock","consttype": "const char *const", "constval": "inputBindingUI"} +,{ + "constname": "k_pch_SteamVR_RenderCameraMode","consttype": "const char *const", "constval": "renderCameraMode"} +,{ + "constname": "k_pch_SteamVR_EnableSharedResourceJournaling","consttype": "const char *const", "constval": "enableSharedResourceJournaling"} +,{ + "constname": "k_pch_SteamVR_EnableSafeMode","consttype": "const char *const", "constval": "enableSafeMode"} +,{ + "constname": "k_pch_SteamVR_PreferredRefreshRate","consttype": "const char *const", "constval": "preferredRefreshRate"} +,{ + "constname": "k_pch_DirectMode_Section","consttype": "const char *const", "constval": "direct_mode"} +,{ + "constname": "k_pch_DirectMode_Enable_Bool","consttype": "const char *const", "constval": "enable"} +,{ + "constname": "k_pch_DirectMode_Count_Int32","consttype": "const char *const", "constval": "count"} +,{ + "constname": "k_pch_DirectMode_EdidVid_Int32","consttype": "const char *const", "constval": "edidVid"} +,{ + "constname": "k_pch_DirectMode_EdidPid_Int32","consttype": "const char *const", "constval": "edidPid"} ,{ "constname": "k_pch_Lighthouse_Section","consttype": "const char *const", "constval": "driver_lighthouse"} ,{ @@ -1058,6 +1274,10 @@ "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_Lighthouse_PowerManagedBaseStations2_String","consttype": "const char *const", "constval": "PowerManagedBaseStations2"} +,{ + "constname": "k_pch_Lighthouse_EnableImuFallback_Bool","consttype": "const char *const", "constval": "enableImuFallback"} ,{ "constname": "k_pch_Null_Section","consttype": "const char *const", "constval": "driver_null"} ,{ @@ -1086,6 +1306,8 @@ "constname": "k_pch_UserInterface_StatusAlwaysOnTop_Bool","consttype": "const char *const", "constval": "StatusAlwaysOnTop"} ,{ "constname": "k_pch_UserInterface_MinimizeToTray_Bool","consttype": "const char *const", "constval": "MinimizeToTray"} +,{ + "constname": "k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool","consttype": "const char *const", "constval": "HidePopupsWhenStatusMinimized"} ,{ "constname": "k_pch_UserInterface_Screenshots_Bool","consttype": "const char *const", "constval": "screenshots"} ,{ @@ -1113,11 +1335,7 @@ ,{ "constname": "k_pch_Perf_Section","consttype": "const char *const", "constval": "perfcheck"} ,{ - "constname": "k_pch_Perf_HeuristicActive_Bool","consttype": "const char *const", "constval": "heuristicActive"} -,{ - "constname": "k_pch_Perf_NotifyInHMD_Bool","consttype": "const char *const", "constval": "warnInHMD"} -,{ - "constname": "k_pch_Perf_NotifyOnlyOnce_Bool","consttype": "const char *const", "constval": "warnOnlyOnce"} + "constname": "k_pch_Perf_PerfGraphInHMD_Bool","consttype": "const char *const", "constval": "perfGraphInHMD"} ,{ "constname": "k_pch_Perf_AllowTimingStore_Bool","consttype": "const char *const", "constval": "allowTimingStore"} ,{ @@ -1166,6 +1384,8 @@ "constname": "k_pch_Camera_BoundsColorGammaA_Int32","consttype": "const char *const", "constval": "cameraBoundsColorGammaA"} ,{ "constname": "k_pch_Camera_BoundsStrength_Int32","consttype": "const char *const", "constval": "cameraBoundsStrength"} +,{ + "constname": "k_pch_Camera_RoomViewMode_Int32","consttype": "const char *const", "constval": "cameraRoomViewMode"} ,{ "constname": "k_pch_audio_Section","consttype": "const char *const", "constval": "audio"} ,{ @@ -1202,23 +1422,75 @@ "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_Dashboard_EnableWebUIDevTools","consttype": "const char *const", "constval": "webUIDevTools"} +,{ + "constname": "k_pch_Dashboard_EnableWebUIDashboardReplacement","consttype": "const char *const", "constval": "webUIDashboard"} ,{ "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_WebEnable_Bool","consttype": "const char *const", "constval": "WebEnable"} ,{ "constname": "k_pch_WebInterface_WebPort_String","consttype": "const char *const", "constval": "WebPort"} +,{ + "constname": "k_pch_VRWebHelper_Section","consttype": "const char *const", "constval": "VRWebHelper"} +,{ + "constname": "k_pch_VRWebHelper_DebuggerEnabled_Bool","consttype": "const char *const", "constval": "DebuggerEnabled"} +,{ + "constname": "k_pch_VRWebHelper_DebuggerPort_Int32","consttype": "const char *const", "constval": "DebuggerPort"} +,{ + "constname": "k_pch_TrackingOverride_Section","consttype": "const char *const", "constval": "TrackingOverrides"} +,{ + "constname": "k_pch_App_BindingAutosaveURLSuffix_String","consttype": "const char *const", "constval": "AutosaveURL"} +,{ + "constname": "k_pch_App_BindingCurrentURLSuffix_String","consttype": "const char *const", "constval": "CurrentURL"} +,{ + "constname": "k_pch_App_NeedToUpdateAutosaveSuffix_Bool","consttype": "const char *const", "constval": "NeedToUpdateAutosave"} +,{ + "constname": "k_pch_App_ActionManifestURL_String","consttype": "const char *const", "constval": "ActionManifestURL"} +,{ + "constname": "k_pch_Trackers_Section","consttype": "const char *const", "constval": "trackers"} +,{ + "constname": "k_pch_DesktopUI_Section","consttype": "const char *const", "constval": "DesktopUI"} +,{ + "constname": "k_pch_LastKnown_Section","consttype": "const char *const", "constval": "LastKnown"} +,{ + "constname": "k_pch_LastKnown_HMDManufacturer_String","consttype": "const char *const", "constval": "HMDManufacturer"} +,{ + "constname": "k_pch_LastKnown_HMDModel_String","consttype": "const char *const", "constval": "HMDModel"} ,{ "constname": "IVRScreenshots_Version","consttype": "const char *const", "constval": "IVRScreenshots_001"} ,{ "constname": "IVRResources_Version","consttype": "const char *const", "constval": "IVRResources_001"} ,{ "constname": "IVRDriverManager_Version","consttype": "const char *const", "constval": "IVRDriverManager_001"} +,{ + "constname": "k_unMaxActionNameLength","consttype": "const uint32_t", "constval": "64"} +,{ + "constname": "k_unMaxActionSetNameLength","consttype": "const uint32_t", "constval": "64"} +,{ + "constname": "k_unMaxActionOriginCount","consttype": "const uint32_t", "constval": "16"} +,{ + "constname": "k_unMaxBoneNameLength","consttype": "const uint32_t", "constval": "32"} +,{ + "constname": "IVRInput_Version","consttype": "const char *const", "constval": "IVRInput_005"} +,{ + "constname": "k_ulInvalidIOBufferHandle","consttype": "const uint64_t", "constval": "0"} +,{ + "constname": "IVRIOBuffer_Version","consttype": "const char *", "constval": "IVRIOBuffer_001"} +,{ + "constname": "k_ulInvalidSpatialAnchorHandle","consttype": "const SpatialAnchorHandle_t", "constval": "0"} +,{ + "constname": "IVRSpatialAnchors_Version","consttype": "const char *const", "constval": "IVRSpatialAnchors_001"} ], "structs":[{"struct": "vr::HmdMatrix34_t","fields": [ { "fieldname": "m", "fieldtype": "float [3][4]"}]} +,{"struct": "vr::HmdMatrix33_t","fields": [ +{ "fieldname": "m", "fieldtype": "float [3][3]"}]} ,{"struct": "vr::HmdMatrix44_t","fields": [ { "fieldname": "m", "fieldtype": "float [4][4]"}]} ,{"struct": "vr::HmdVector3_t","fields": [ @@ -1234,6 +1506,11 @@ { "fieldname": "x", "fieldtype": "double"}, { "fieldname": "y", "fieldtype": "double"}, { "fieldname": "z", "fieldtype": "double"}]} +,{"struct": "vr::HmdQuaternionf_t","fields": [ +{ "fieldname": "w", "fieldtype": "float"}, +{ "fieldname": "x", "fieldtype": "float"}, +{ "fieldname": "y", "fieldtype": "float"}, +{ "fieldname": "z", "fieldtype": "float"}]} ,{"struct": "vr::HmdColor_t","fields": [ { "fieldname": "r", "fieldtype": "float"}, { "fieldname": "g", "fieldtype": "float"}, @@ -1314,7 +1591,8 @@ { "fieldname": "oldPid", "fieldtype": "uint32_t"}, { "fieldname": "bForced", "fieldtype": "_Bool"}]} ,{"struct": "vr::VREvent_Overlay_t","fields": [ -{ "fieldname": "overlayHandle", "fieldtype": "uint64_t"}]} +{ "fieldname": "overlayHandle", "fieldtype": "uint64_t"}, +{ "fieldname": "devicePath", "fieldtype": "uint64_t"}]} ,{"struct": "vr::VREvent_Status_t","fields": [ { "fieldname": "statusState", "fieldtype": "uint32_t"}]} ,{"struct": "vr::VREvent_Keyboard_t","fields": [ @@ -1329,7 +1607,9 @@ { "fieldname": "reserved0", "fieldtype": "uint64_t"}, { "fieldname": "reserved1", "fieldtype": "uint64_t"}, { "fieldname": "reserved2", "fieldtype": "uint64_t"}, -{ "fieldname": "reserved3", "fieldtype": "uint64_t"}]} +{ "fieldname": "reserved3", "fieldtype": "uint64_t"}, +{ "fieldname": "reserved4", "fieldtype": "uint64_t"}, +{ "fieldname": "reserved5", "fieldtype": "uint64_t"}]} ,{"struct": "vr::VREvent_PerformanceTest_t","fields": [ { "fieldname": "m_nFidelityLevel", "fieldtype": "uint32_t"}]} ,{"struct": "vr::VREvent_SeatedZeroPoseReset_t","fields": [ @@ -1362,6 +1642,29 @@ { "fieldname": "fDurationSeconds", "fieldtype": "float"}, { "fieldname": "fFrequency", "fieldtype": "float"}, { "fieldname": "fAmplitude", "fieldtype": "float"}]} +,{"struct": "vr::VREvent_WebConsole_t","fields": [ +{ "fieldname": "webConsoleHandle", "fieldtype": "WebConsoleHandle_t"}]} +,{"struct": "vr::VREvent_InputBindingLoad_t","fields": [ +{ "fieldname": "ulAppContainer", "fieldtype": "vr::PropertyContainerHandle_t"}, +{ "fieldname": "pathMessage", "fieldtype": "uint64_t"}, +{ "fieldname": "pathUrl", "fieldtype": "uint64_t"}, +{ "fieldname": "pathControllerType", "fieldtype": "uint64_t"}]} +,{"struct": "vr::VREvent_InputActionManifestLoad_t","fields": [ +{ "fieldname": "pathAppKey", "fieldtype": "uint64_t"}, +{ "fieldname": "pathMessage", "fieldtype": "uint64_t"}, +{ "fieldname": "pathMessageParam", "fieldtype": "uint64_t"}, +{ "fieldname": "pathManifestPath", "fieldtype": "uint64_t"}]} +,{"struct": "vr::VREvent_SpatialAnchor_t","fields": [ +{ "fieldname": "unHandle", "fieldtype": "SpatialAnchorHandle_t"}]} +,{"struct": "vr::VREvent_ProgressUpdate_t","fields": [ +{ "fieldname": "ulApplicationPropertyContainer", "fieldtype": "uint64_t"}, +{ "fieldname": "pathDevice", "fieldtype": "uint64_t"}, +{ "fieldname": "pathInputSource", "fieldtype": "uint64_t"}, +{ "fieldname": "pathProgressAction", "fieldtype": "uint64_t"}, +{ "fieldname": "pathIcon", "fieldtype": "uint64_t"}, +{ "fieldname": "fProgress", "fieldtype": "float"}]} +,{"struct": "vr::VREvent_ShowUI_t","fields": [ +{ "fieldname": "eType", "fieldtype": "enum vr::EShowUIType"}]} ,{"struct": "vr::(anonymous)","fields": [ { "fieldname": "reserved", "fieldtype": "struct vr::VREvent_Reserved_t"}, { "fieldname": "controller", "fieldtype": "struct vr::VREvent_Controller_t"}, @@ -1384,7 +1687,13 @@ { "fieldname": "messageOverlay", "fieldtype": "struct vr::VREvent_MessageOverlay_t"}, { "fieldname": "property", "fieldtype": "struct vr::VREvent_Property_t"}, { "fieldname": "dualAnalog", "fieldtype": "struct vr::VREvent_DualAnalog_t"}, -{ "fieldname": "hapticVibration", "fieldtype": "struct vr::VREvent_HapticVibration_t"}]} +{ "fieldname": "hapticVibration", "fieldtype": "struct vr::VREvent_HapticVibration_t"}, +{ "fieldname": "webConsole", "fieldtype": "struct vr::VREvent_WebConsole_t"}, +{ "fieldname": "inputBinding", "fieldtype": "struct vr::VREvent_InputBindingLoad_t"}, +{ "fieldname": "actionManifest", "fieldtype": "struct vr::VREvent_InputActionManifestLoad_t"}, +{ "fieldname": "spatialAnchor", "fieldtype": "struct vr::VREvent_SpatialAnchor_t"}, +{ "fieldname": "progressUpdate", "fieldtype": "struct vr::VREvent_ProgressUpdate_t"}, +{ "fieldname": "showUi", "fieldtype": "struct vr::VREvent_ShowUI_t"}]} ,{"struct": "vr::VREvent_t","fields": [ { "fieldname": "eventType", "fieldtype": "uint32_t"}, { "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"}, @@ -1416,19 +1725,28 @@ { "fieldname": "gridWidth", "fieldtype": "float"}, { "fieldname": "gridScale", "fieldtype": "float"}, { "fieldname": "transform", "fieldtype": "struct vr::HmdMatrix44_t"}]} +,{"struct": "vr::VRBoneTransform_t","fields": [ +{ "fieldname": "position", "fieldtype": "struct vr::HmdVector4_t"}, +{ "fieldname": "orientation", "fieldtype": "struct vr::HmdQuaternionf_t"}]} ,{"struct": "vr::CameraVideoStreamFrameHeader_t","fields": [ { "fieldname": "eFrameType", "fieldtype": "enum vr::EVRTrackedCameraFrameType"}, { "fieldname": "nWidth", "fieldtype": "uint32_t"}, { "fieldname": "nHeight", "fieldtype": "uint32_t"}, { "fieldname": "nBytesPerPixel", "fieldtype": "uint32_t"}, { "fieldname": "nFrameSequence", "fieldtype": "uint32_t"}, -{ "fieldname": "standingTrackedDevicePose", "fieldtype": "struct vr::TrackedDevicePose_t"}]} +{ "fieldname": "standingTrackedDevicePose", "fieldtype": "struct vr::TrackedDevicePose_t"}, +{ "fieldname": "ulFrameExposureTime", "fieldtype": "uint64_t"}]} ,{"struct": "vr::DriverDirectMode_FrameTiming","fields": [ { "fieldname": "m_nSize", "fieldtype": "uint32_t"}, { "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"}, { "fieldname": "m_nNumMisPresented", "fieldtype": "uint32_t"}, { "fieldname": "m_nNumDroppedFrames", "fieldtype": "uint32_t"}, { "fieldname": "m_nReprojectionFlags", "fieldtype": "uint32_t"}]} +,{"struct": "vr::ImuSample_t","fields": [ +{ "fieldname": "fSampleTime", "fieldtype": "double"}, +{ "fieldname": "vAccel", "fieldtype": "struct vr::HmdVector3d_t"}, +{ "fieldname": "vGyro", "fieldtype": "struct vr::HmdVector3d_t"}, +{ "fieldname": "unOffScaleFlags", "fieldtype": "uint32_t"}]} ,{"struct": "vr::AppOverrideKeys_t","fields": [ { "fieldname": "pchKey", "fieldtype": "const char *"}, { "fieldname": "pchValue", "fieldtype": "const char *"}]} @@ -1456,7 +1774,9 @@ { "fieldname": "m_flCompositorUpdateStartMs", "fieldtype": "float"}, { "fieldname": "m_flCompositorUpdateEndMs", "fieldtype": "float"}, { "fieldname": "m_flCompositorRenderStartMs", "fieldtype": "float"}, -{ "fieldname": "m_HmdPose", "fieldtype": "vr::TrackedDevicePose_t"}]} +{ "fieldname": "m_HmdPose", "fieldtype": "vr::TrackedDevicePose_t"}, +{ "fieldname": "m_nNumVSyncsReadyForUse", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nNumVSyncsToFirstView", "fieldtype": "uint32_t"}]} ,{"struct": "vr::Compositor_CumulativeStats","fields": [ { "fieldname": "m_nPid", "fieldtype": "uint32_t"}, { "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"}, @@ -1522,6 +1842,46 @@ { "fieldname": "m_nWidth", "fieldtype": "int32_t"}, { "fieldname": "m_nHeight", "fieldtype": "int32_t"}, { "fieldname": "m_nBytesPerPixel", "fieldtype": "int32_t"}]} +,{"struct": "vr::CVRSettingHelper","fields": [ +{ "fieldname": "m_pSettings", "fieldtype": "class vr::IVRSettings *"}]} +,{"struct": "vr::InputAnalogActionData_t","fields": [ +{ "fieldname": "bActive", "fieldtype": "_Bool"}, +{ "fieldname": "activeOrigin", "fieldtype": "VRInputValueHandle_t"}, +{ "fieldname": "x", "fieldtype": "float"}, +{ "fieldname": "y", "fieldtype": "float"}, +{ "fieldname": "z", "fieldtype": "float"}, +{ "fieldname": "deltaX", "fieldtype": "float"}, +{ "fieldname": "deltaY", "fieldtype": "float"}, +{ "fieldname": "deltaZ", "fieldtype": "float"}, +{ "fieldname": "fUpdateTime", "fieldtype": "float"}]} +,{"struct": "vr::InputDigitalActionData_t","fields": [ +{ "fieldname": "bActive", "fieldtype": "_Bool"}, +{ "fieldname": "activeOrigin", "fieldtype": "VRInputValueHandle_t"}, +{ "fieldname": "bState", "fieldtype": "_Bool"}, +{ "fieldname": "bChanged", "fieldtype": "_Bool"}, +{ "fieldname": "fUpdateTime", "fieldtype": "float"}]} +,{"struct": "vr::InputPoseActionData_t","fields": [ +{ "fieldname": "bActive", "fieldtype": "_Bool"}, +{ "fieldname": "activeOrigin", "fieldtype": "VRInputValueHandle_t"}, +{ "fieldname": "pose", "fieldtype": "struct vr::TrackedDevicePose_t"}]} +,{"struct": "vr::InputSkeletalActionData_t","fields": [ +{ "fieldname": "bActive", "fieldtype": "_Bool"}, +{ "fieldname": "activeOrigin", "fieldtype": "VRInputValueHandle_t"}]} +,{"struct": "vr::InputOriginInfo_t","fields": [ +{ "fieldname": "devicePath", "fieldtype": "VRInputValueHandle_t"}, +{ "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"}, +{ "fieldname": "rchRenderModelComponentName", "fieldtype": "char [128]"}]} +,{"struct": "vr::VRActiveActionSet_t","fields": [ +{ "fieldname": "ulActionSet", "fieldtype": "VRActionSetHandle_t"}, +{ "fieldname": "ulRestrictedToDevice", "fieldtype": "VRInputValueHandle_t"}, +{ "fieldname": "ulSecondaryActionSet", "fieldtype": "VRActionSetHandle_t"}, +{ "fieldname": "unPadding", "fieldtype": "uint32_t"}, +{ "fieldname": "nPriority", "fieldtype": "int32_t"}]} +,{"struct": "vr::VRSkeletalSummaryData_t","fields": [ +{ "fieldname": "flFingerCurl", "fieldtype": "float [5]"}, +{ "fieldname": "flFingerSplay", "fieldtype": "float [4]"}]} +,{"struct": "vr::SpatialAnchorPose_t","fields": [ +{ "fieldname": "mAnchorToAbsoluteTracking", "fieldtype": "struct vr::HmdMatrix34_t"}]} ,{"struct": "vr::COpenVRContext","fields": [ { "fieldname": "m_pVRSystem", "fieldtype": "class vr::IVRSystem *"}, { "fieldname": "m_pVRChaperone", "fieldtype": "class vr::IVRChaperone *"}, @@ -1535,7 +1895,10 @@ { "fieldname": "m_pVRApplications", "fieldtype": "class vr::IVRApplications *"}, { "fieldname": "m_pVRTrackedCamera", "fieldtype": "class vr::IVRTrackedCamera *"}, { "fieldname": "m_pVRScreenshots", "fieldtype": "class vr::IVRScreenshots *"}, -{ "fieldname": "m_pVRDriverManager", "fieldtype": "class vr::IVRDriverManager *"}]} +{ "fieldname": "m_pVRDriverManager", "fieldtype": "class vr::IVRDriverManager *"}, +{ "fieldname": "m_pVRInput", "fieldtype": "class vr::IVRInput *"}, +{ "fieldname": "m_pVRIOBuffer", "fieldtype": "class vr::IVRIOBuffer *"}, +{ "fieldname": "m_pVRSpatialAnchors", "fieldtype": "class vr::IVRSpatialAnchors *"}]} ], "methods":[{ "classname": "vr::IVRSystem", @@ -2003,6 +2366,7 @@ "returntype": "vr::EVRTrackedCameraError", "params": [ { "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"}, +{ "paramname": "nCameraIndex" ,"paramtype": "uint32_t"}, { "paramname": "eFrameType" ,"paramtype": "vr::EVRTrackedCameraFrameType"}, { "paramname": "pFocalLength" ,"paramtype": "vr::HmdVector2_t *"}, { "paramname": "pCenter" ,"paramtype": "vr::HmdVector2_t *"} @@ -2014,6 +2378,7 @@ "returntype": "vr::EVRTrackedCameraError", "params": [ { "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"}, +{ "paramname": "nCameraIndex" ,"paramtype": "uint32_t"}, { "paramname": "eFrameType" ,"paramtype": "vr::EVRTrackedCameraFrameType"}, { "paramname": "flZNear" ,"paramtype": "float"}, { "paramname": "flZFar" ,"paramtype": "float"}, @@ -2504,6 +2869,15 @@ { "paramname": "unQuadsCount" ,"paramtype": "uint32_t"} ] } +,{ + "classname": "vr::IVRChaperoneSetup", + "methodname": "SetWorkingPerimeter", + "returntype": "void", + "params": [ +{ "paramname": "pPointBuffer" ,"array_count": "unPointCount" ,"paramtype": "struct vr::HmdVector2_t *"}, +{ "paramname": "unPointCount" ,"paramtype": "uint32_t"} + ] +} ,{ "classname": "vr::IVRChaperoneSetup", "methodname": "SetWorkingSeatedZeroPoseToRawTrackingPose", @@ -2536,42 +2910,6 @@ { "paramname": "pmatSeatedZeroPoseToRawTrackingPose" ,"paramtype": "struct vr::HmdMatrix34_t *"} ] } -,{ - "classname": "vr::IVRChaperoneSetup", - "methodname": "SetWorkingCollisionBoundsTagsInfo", - "returntype": "void", - "params": [ -{ "paramname": "pTagsBuffer" ,"array_count": "unTagCount" ,"paramtype": "uint8_t *"}, -{ "paramname": "unTagCount" ,"paramtype": "uint32_t"} - ] -} -,{ - "classname": "vr::IVRChaperoneSetup", - "methodname": "GetLiveCollisionBoundsTagsInfo", - "returntype": "bool", - "params": [ -{ "paramname": "pTagsBuffer" ,"out_array_count": "punTagCount" ,"paramtype": "uint8_t *"}, -{ "paramname": "punTagCount" ,"paramtype": "uint32_t *"} - ] -} -,{ - "classname": "vr::IVRChaperoneSetup", - "methodname": "SetWorkingPhysicalBoundsInfo", - "returntype": "bool", - "params": [ -{ "paramname": "pQuadsBuffer" ,"array_count": "unQuadsCount" ,"paramtype": "struct vr::HmdQuad_t *"}, -{ "paramname": "unQuadsCount" ,"paramtype": "uint32_t"} - ] -} -,{ - "classname": "vr::IVRChaperoneSetup", - "methodname": "GetLivePhysicalBoundsInfo", - "returntype": "bool", - "params": [ -{ "paramname": "pQuadsBuffer" ,"out_array_count": "punQuadsCount" ,"paramtype": "struct vr::HmdQuad_t *"}, -{ "paramname": "punQuadsCount" ,"paramtype": "uint32_t *"} - ] -} ,{ "classname": "vr::IVRChaperoneSetup", "methodname": "ExportLiveToBuffer", @@ -2590,6 +2928,16 @@ { "paramname": "nImportFlags" ,"paramtype": "uint32_t"} ] } +,{ + "classname": "vr::IVRChaperoneSetup", + "methodname": "ShowWorkingSetPreview", + "returntype": "void" +} +,{ + "classname": "vr::IVRChaperoneSetup", + "methodname": "HideWorkingSetPreview", + "returntype": "void" +} ,{ "classname": "vr::IVRCompositor", "methodname": "SetTrackingSpace", @@ -2903,6 +3251,11 @@ "methodname": "SubmitExplicitTimingData", "returntype": "vr::EVRCompositorError" } +,{ + "classname": "vr::IVRCompositor", + "methodname": "IsMotionSmoothingEnabled", + "returntype": "bool" +} ,{ "classname": "vr::IVROverlay", "methodname": "FindOverlay", @@ -3431,7 +3784,7 @@ "params": [ { "paramname": "ulOverlay" ,"paramtype": "vr::VROverlayHandle_t"}, { "paramname": "eWhich" ,"paramtype": "vr::EDualAnalogWhich"}, -{ "paramname": "vCenter" ,"paramtype": "const struct vr::HmdVector2_t &"}, +{ "paramname": "pvCenter" ,"paramtype": "const struct vr::HmdVector2_t *"}, { "paramname": "fRadius" ,"paramtype": "float"} ] } @@ -3788,6 +4141,18 @@ { "paramname": "unComponentRenderModelNameLen" ,"paramtype": "uint32_t"} ] } +,{ + "classname": "vr::IVRRenderModels", + "methodname": "GetComponentStateForDevicePath", + "returntype": "bool", + "params": [ +{ "paramname": "pchRenderModelName" ,"paramtype": "const char *"}, +{ "paramname": "pchComponentName" ,"paramtype": "const char *"}, +{ "paramname": "devicePath" ,"paramtype": "vr::VRInputValueHandle_t"}, +{ "paramname": "pState" ,"paramtype": "const vr::RenderModel_ControllerMode_State_t *"}, +{ "paramname": "pComponentState" ,"paramtype": "vr::RenderModel_ComponentState_t *"} + ] +} ,{ "classname": "vr::IVRRenderModels", "methodname": "GetComponentState", @@ -4098,5 +4463,345 @@ { "paramname": "pchDriverName" ,"paramtype": "const char *"} ] } +,{ + "classname": "vr::IVRInput", + "methodname": "SetActionManifestPath", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "pchActionManifestPath" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetActionSetHandle", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "pchActionSetName" ,"paramtype": "const char *"}, +{ "paramname": "pHandle" ,"paramtype": "vr::VRActionSetHandle_t *"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetActionHandle", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "pchActionName" ,"paramtype": "const char *"}, +{ "paramname": "pHandle" ,"paramtype": "vr::VRActionHandle_t *"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetInputSourceHandle", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "pchInputSourcePath" ,"paramtype": "const char *"}, +{ "paramname": "pHandle" ,"paramtype": "vr::VRInputValueHandle_t *"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "UpdateActionState", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "pSets" ,"array_count": "unSetCount" ,"paramtype": "struct vr::VRActiveActionSet_t *"}, +{ "paramname": "unSizeOfVRSelectedActionSet_t" ,"paramtype": "uint32_t"}, +{ "paramname": "unSetCount" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetDigitalActionData", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "pActionData" ,"paramtype": "struct vr::InputDigitalActionData_t *"}, +{ "paramname": "unActionDataSize" ,"paramtype": "uint32_t"}, +{ "paramname": "ulRestrictToDevice" ,"paramtype": "vr::VRInputValueHandle_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetAnalogActionData", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "pActionData" ,"paramtype": "struct vr::InputAnalogActionData_t *"}, +{ "paramname": "unActionDataSize" ,"paramtype": "uint32_t"}, +{ "paramname": "ulRestrictToDevice" ,"paramtype": "vr::VRInputValueHandle_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetPoseActionData", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "eOrigin" ,"paramtype": "vr::ETrackingUniverseOrigin"}, +{ "paramname": "fPredictedSecondsFromNow" ,"paramtype": "float"}, +{ "paramname": "pActionData" ,"paramtype": "struct vr::InputPoseActionData_t *"}, +{ "paramname": "unActionDataSize" ,"paramtype": "uint32_t"}, +{ "paramname": "ulRestrictToDevice" ,"paramtype": "vr::VRInputValueHandle_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetSkeletalActionData", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "pActionData" ,"paramtype": "struct vr::InputSkeletalActionData_t *"}, +{ "paramname": "unActionDataSize" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetBoneCount", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "pBoneCount" ,"paramtype": "uint32_t *"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetBoneHierarchy", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "pParentIndices" ,"array_count": "unIndexArayCount" ,"paramtype": "vr::BoneIndex_t *"}, +{ "paramname": "unIndexArayCount" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetBoneName", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "nBoneIndex" ,"paramtype": "vr::BoneIndex_t"}, +{ "paramname": "pchBoneName" ,"out_string": " " ,"paramtype": "char *"}, +{ "paramname": "unNameBufferSize" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetSkeletalReferenceTransforms", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "eTransformSpace" ,"paramtype": "vr::EVRSkeletalTransformSpace"}, +{ "paramname": "eReferencePose" ,"paramtype": "vr::EVRSkeletalReferencePose"}, +{ "paramname": "pTransformArray" ,"array_count": "unTransformArrayCount" ,"paramtype": "struct vr::VRBoneTransform_t *"}, +{ "paramname": "unTransformArrayCount" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetSkeletalTrackingLevel", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "pSkeletalTrackingLevel" ,"paramtype": "vr::EVRSkeletalTrackingLevel *"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetSkeletalBoneData", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "eTransformSpace" ,"paramtype": "vr::EVRSkeletalTransformSpace"}, +{ "paramname": "eMotionRange" ,"paramtype": "vr::EVRSkeletalMotionRange"}, +{ "paramname": "pTransformArray" ,"array_count": "unTransformArrayCount" ,"paramtype": "struct vr::VRBoneTransform_t *"}, +{ "paramname": "unTransformArrayCount" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetSkeletalSummaryData", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "pSkeletalSummaryData" ,"paramtype": "struct vr::VRSkeletalSummaryData_t *"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetSkeletalBoneDataCompressed", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "eMotionRange" ,"paramtype": "vr::EVRSkeletalMotionRange"}, +{ "paramname": "pvCompressedData" ,"out_buffer_count": "unCompressedSize" ,"paramtype": "void *"}, +{ "paramname": "unCompressedSize" ,"paramtype": "uint32_t"}, +{ "paramname": "punRequiredCompressedSize" ,"paramtype": "uint32_t *"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "DecompressSkeletalBoneData", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "pvCompressedBuffer" ,"paramtype": "const void *"}, +{ "paramname": "unCompressedBufferSize" ,"paramtype": "uint32_t"}, +{ "paramname": "eTransformSpace" ,"paramtype": "vr::EVRSkeletalTransformSpace"}, +{ "paramname": "pTransformArray" ,"array_count": "unTransformArrayCount" ,"paramtype": "struct vr::VRBoneTransform_t *"}, +{ "paramname": "unTransformArrayCount" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "TriggerHapticVibrationAction", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "fStartSecondsFromNow" ,"paramtype": "float"}, +{ "paramname": "fDurationSeconds" ,"paramtype": "float"}, +{ "paramname": "fFrequency" ,"paramtype": "float"}, +{ "paramname": "fAmplitude" ,"paramtype": "float"}, +{ "paramname": "ulRestrictToDevice" ,"paramtype": "vr::VRInputValueHandle_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetActionOrigins", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "actionSetHandle" ,"paramtype": "vr::VRActionSetHandle_t"}, +{ "paramname": "digitalActionHandle" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "originsOut" ,"array_count": "originOutCount" ,"paramtype": "vr::VRInputValueHandle_t *"}, +{ "paramname": "originOutCount" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetOriginLocalizedName", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "origin" ,"paramtype": "vr::VRInputValueHandle_t"}, +{ "paramname": "pchNameArray" ,"out_string": " " ,"paramtype": "char *"}, +{ "paramname": "unNameArraySize" ,"paramtype": "uint32_t"}, +{ "paramname": "unStringSectionsToInclude" ,"paramtype": "int32_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetOriginTrackedDeviceInfo", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "origin" ,"paramtype": "vr::VRInputValueHandle_t"}, +{ "paramname": "pOriginInfo" ,"paramtype": "struct vr::InputOriginInfo_t *"}, +{ "paramname": "unOriginInfoSize" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "ShowActionOrigins", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "actionSetHandle" ,"paramtype": "vr::VRActionSetHandle_t"}, +{ "paramname": "ulActionHandle" ,"paramtype": "vr::VRActionHandle_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "ShowBindingsForActionSet", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "pSets" ,"array_count": "unSetCount" ,"paramtype": "struct vr::VRActiveActionSet_t *"}, +{ "paramname": "unSizeOfVRSelectedActionSet_t" ,"paramtype": "uint32_t"}, +{ "paramname": "unSetCount" ,"paramtype": "uint32_t"}, +{ "paramname": "originToHighlight" ,"paramtype": "vr::VRInputValueHandle_t"} + ] +} +,{ + "classname": "vr::IVRIOBuffer", + "methodname": "Open", + "returntype": "vr::EIOBufferError", + "params": [ +{ "paramname": "pchPath" ,"paramtype": "const char *"}, +{ "paramname": "mode" ,"paramtype": "vr::EIOBufferMode"}, +{ "paramname": "unElementSize" ,"paramtype": "uint32_t"}, +{ "paramname": "unElements" ,"paramtype": "uint32_t"}, +{ "paramname": "pulBuffer" ,"paramtype": "vr::IOBufferHandle_t *"} + ] +} +,{ + "classname": "vr::IVRIOBuffer", + "methodname": "Close", + "returntype": "vr::EIOBufferError", + "params": [ +{ "paramname": "ulBuffer" ,"paramtype": "vr::IOBufferHandle_t"} + ] +} +,{ + "classname": "vr::IVRIOBuffer", + "methodname": "Read", + "returntype": "vr::EIOBufferError", + "params": [ +{ "paramname": "ulBuffer" ,"paramtype": "vr::IOBufferHandle_t"}, +{ "paramname": "pDst" ,"paramtype": "void *"}, +{ "paramname": "unBytes" ,"paramtype": "uint32_t"}, +{ "paramname": "punRead" ,"paramtype": "uint32_t *"} + ] +} +,{ + "classname": "vr::IVRIOBuffer", + "methodname": "Write", + "returntype": "vr::EIOBufferError", + "params": [ +{ "paramname": "ulBuffer" ,"paramtype": "vr::IOBufferHandle_t"}, +{ "paramname": "pSrc" ,"paramtype": "void *"}, +{ "paramname": "unBytes" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRIOBuffer", + "methodname": "PropertyContainer", + "returntype": "vr::PropertyContainerHandle_t", + "params": [ +{ "paramname": "ulBuffer" ,"paramtype": "vr::IOBufferHandle_t"} + ] +} +,{ + "classname": "vr::IVRSpatialAnchors", + "methodname": "CreateSpatialAnchorFromDescriptor", + "returntype": "vr::EVRSpatialAnchorError", + "params": [ +{ "paramname": "pchDescriptor" ,"paramtype": "const char *"}, +{ "paramname": "pHandleOut" ,"paramtype": "vr::SpatialAnchorHandle_t *"} + ] +} +,{ + "classname": "vr::IVRSpatialAnchors", + "methodname": "CreateSpatialAnchorFromPose", + "returntype": "vr::EVRSpatialAnchorError", + "params": [ +{ "paramname": "unDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"}, +{ "paramname": "eOrigin" ,"paramtype": "vr::ETrackingUniverseOrigin"}, +{ "paramname": "pPose" ,"paramtype": "struct vr::SpatialAnchorPose_t *"}, +{ "paramname": "pHandleOut" ,"paramtype": "vr::SpatialAnchorHandle_t *"} + ] +} +,{ + "classname": "vr::IVRSpatialAnchors", + "methodname": "GetSpatialAnchorPose", + "returntype": "vr::EVRSpatialAnchorError", + "params": [ +{ "paramname": "unHandle" ,"paramtype": "vr::SpatialAnchorHandle_t"}, +{ "paramname": "eOrigin" ,"paramtype": "vr::ETrackingUniverseOrigin"}, +{ "paramname": "pPoseOut" ,"paramtype": "struct vr::SpatialAnchorPose_t *"} + ] +} +,{ + "classname": "vr::IVRSpatialAnchors", + "methodname": "GetSpatialAnchorDescriptor", + "returntype": "vr::EVRSpatialAnchorError", + "params": [ +{ "paramname": "unHandle" ,"paramtype": "vr::SpatialAnchorHandle_t"}, +{ "paramname": "pchDescriptorOut" ,"out_string": " " ,"paramtype": "char *"}, +{ "paramname": "punDescriptorBufferLenInOut" ,"paramtype": "uint32_t *"} + ] +} ] } \ No newline at end of file diff --git a/third-party/openvr/headers/openvr_capi.h b/third-party/openvr/headers/openvr_capi.h index 533ac80..ac42097 100644 --- a/third-party/openvr/headers/openvr_capi.h +++ b/third-party/openvr/headers/openvr_capi.h @@ -81,39 +81,48 @@ static const unsigned int k_unHmdMatrix34PropertyTag = 20; static const unsigned int k_unHmdMatrix44PropertyTag = 21; static const unsigned int k_unHmdVector3PropertyTag = 22; static const unsigned int k_unHmdVector4PropertyTag = 23; +static const unsigned int k_unHmdVector2PropertyTag = 24; +static const unsigned int k_unHmdQuadPropertyTag = 25; static const unsigned int k_unHiddenAreaPropertyTag = 30; static const unsigned int k_unPathHandleInfoTag = 31; static const unsigned int k_unActionPropertyTag = 32; static const unsigned int k_unInputValuePropertyTag = 33; static const unsigned int k_unWildcardPropertyTag = 34; static const unsigned int k_unHapticVibrationPropertyTag = 35; +static const unsigned int k_unSkeletonPropertyTag = 36; +static const unsigned int k_unSpatialAnchorPosePropertyTag = 40; +static const unsigned int k_unJsonPropertyTag = 41; static const unsigned int k_unOpenVRInternalReserved_Start = 1000; static const unsigned int k_unOpenVRInternalReserved_End = 10000; static const unsigned int k_unMaxPropertyStringSize = 32768; +static const unsigned long k_ulInvalidActionHandle = 0; +static const unsigned long k_ulInvalidActionSetHandle = 0; +static const unsigned long k_ulInvalidInputValueHandle = 0; static const unsigned int k_unControllerStateAxisCount = 5; static const unsigned long k_ulOverlayHandleInvalid = 0; +static const unsigned int k_unMaxDistortionFunctionParameters = 8; static const unsigned int k_unScreenshotHandleInvalid = 0; static const char * IVRSystem_Version = "IVRSystem_019"; static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; -static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_003"; +static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_005"; static const unsigned int k_unMaxApplicationKeyLength = 128; static const char * k_pch_MimeType_HomeApp = "vr/home"; static const char * k_pch_MimeType_GameTheater = "vr/game_theater"; static const char * IVRApplications_Version = "IVRApplications_006"; static const char * IVRChaperone_Version = "IVRChaperone_003"; -static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; +static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_006"; static const char * IVRCompositor_Version = "IVRCompositor_022"; static const unsigned int k_unVROverlayMaxKeyLength = 128; static const unsigned int k_unVROverlayMaxNameLength = 128; static const unsigned int k_unMaxOverlayCount = 64; static const unsigned int k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; -static const char * IVROverlay_Version = "IVROverlay_018"; +static const char * IVROverlay_Version = "IVROverlay_019"; static const char * k_pch_Controller_Component_GDC2015 = "gdc2015"; static const char * k_pch_Controller_Component_Base = "base"; static const char * k_pch_Controller_Component_Tip = "tip"; static const char * k_pch_Controller_Component_HandGrip = "handgrip"; static const char * k_pch_Controller_Component_Status = "status"; -static const char * IVRRenderModels_Version = "IVRRenderModels_005"; +static const char * IVRRenderModels_Version = "IVRRenderModels_006"; static const unsigned int k_unNotificationTextMaxSize = 256; static const char * IVRNotifications_Version = "IVRNotifications_002"; static const unsigned int k_unMaxSettingsKeyLength = 128; @@ -137,21 +146,19 @@ static const char * k_pch_SteamVR_GridColor_String = "gridColor"; static const char * k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; static const char * k_pch_SteamVR_ShowStage_Bool = "showStage"; static const char * k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; -static const char * k_pch_SteamVR_DirectMode_Bool = "directMode"; -static const char * k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; -static const char * k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; static const char * k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; static const char * k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; static const char * k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; static const char * k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; static const char * k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; -static const char * k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection"; -static const char * k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection"; -static const char * k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; +static const char * k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; +static const char * k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; +static const char * k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; static const char * k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; -static const char * k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; +static const char * k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; static const char * k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; static const char * k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; +static const char * k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized"; static const char * k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; static const char * k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; static const char * k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; @@ -161,11 +168,24 @@ static const char * k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBack static const char * k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; static const char * k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; static const char * k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; +static const char * k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleManualOverride"; static const char * k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; 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_SteamVR_LegacyInputRebinding = "legacyInputRebinding"; +static const char * k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; +static const char * k_pch_SteamVR_InputBindingUIBlock = "inputBindingUI"; +static const char * k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; +static const char * k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; +static const char * k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; +static const char * k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; +static const char * k_pch_DirectMode_Section = "direct_mode"; +static const char * k_pch_DirectMode_Enable_Bool = "enable"; +static const char * k_pch_DirectMode_Count_Int32 = "count"; +static const char * k_pch_DirectMode_EdidVid_Int32 = "edidVid"; +static const char * k_pch_DirectMode_EdidPid_Int32 = "edidPid"; 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"; @@ -175,6 +195,8 @@ static const char * k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestat 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_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; +static const char * k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; 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"; @@ -189,6 +211,7 @@ static const char * k_pch_Null_DisplayFrequency_Float = "displayFrequency"; static const char * k_pch_UserInterface_Section = "userinterface"; static const char * k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; static const char * k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; +static const char * k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized"; static const char * k_pch_UserInterface_Screenshots_Bool = "screenshots"; static const char * k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; static const char * k_pch_Notifications_Section = "notifications"; @@ -202,9 +225,7 @@ static const char * k_pch_Keyboard_OffsetRightX = "OffsetRightX"; static const char * k_pch_Keyboard_OffsetY = "OffsetY"; static const char * k_pch_Keyboard_Smoothing = "Smoothing"; static const char * k_pch_Perf_Section = "perfcheck"; -static const char * k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; -static const char * k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; -static const char * k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; +static const char * k_pch_Perf_PerfGraphInHMD_Bool = "perfGraphInHMD"; static const char * k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; static const char * k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; static const char * k_pch_Perf_TestData_Float = "perfTestData"; @@ -229,6 +250,7 @@ static const char * k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGam static const char * k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; static const char * k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; static const char * k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; +static const char * k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode"; static const char * k_pch_audio_Section = "audio"; static const char * k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; static const char * k_pch_audio_OnRecordDevice_String = "onRecordDevice"; @@ -247,13 +269,38 @@ 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_Dashboard_EnableWebUIDevTools = "webUIDevTools"; +static const char * k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard"; 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_WebEnable_Bool = "WebEnable"; static const char * k_pch_WebInterface_WebPort_String = "WebPort"; +static const char * k_pch_VRWebHelper_Section = "VRWebHelper"; +static const char * k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled"; +static const char * k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort"; +static const char * k_pch_TrackingOverride_Section = "TrackingOverrides"; +static const char * k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; +static const char * k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL"; +static const char * k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; +static const char * k_pch_App_ActionManifestURL_String = "ActionManifestURL"; +static const char * k_pch_Trackers_Section = "trackers"; +static const char * k_pch_DesktopUI_Section = "DesktopUI"; +static const char * k_pch_LastKnown_Section = "LastKnown"; +static const char * k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; +static const char * k_pch_LastKnown_HMDModel_String = "HMDModel"; static const char * IVRScreenshots_Version = "IVRScreenshots_001"; static const char * IVRResources_Version = "IVRResources_001"; static const char * IVRDriverManager_Version = "IVRDriverManager_001"; +static const unsigned int k_unMaxActionNameLength = 64; +static const unsigned int k_unMaxActionSetNameLength = 64; +static const unsigned int k_unMaxActionOriginCount = 16; +static const unsigned int k_unMaxBoneNameLength = 32; +static const char * IVRInput_Version = "IVRInput_005"; +static const unsigned long k_ulInvalidIOBufferHandle = 0; +static const char * IVRIOBuffer_Version = "IVRIOBuffer_001"; +static const unsigned int k_ulInvalidSpatialAnchorHandle = 0; +static const char * IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; // OpenVR Enums @@ -265,12 +312,14 @@ typedef enum EVREye typedef enum ETextureType { + ETextureType_TextureType_Invalid = -1, ETextureType_TextureType_DirectX = 0, ETextureType_TextureType_OpenGL = 1, ETextureType_TextureType_Vulkan = 2, ETextureType_TextureType_IOSurface = 3, ETextureType_TextureType_DirectX12 = 4, ETextureType_TextureType_DXGISharedHandle = 5, + ETextureType_TextureType_Metal = 6, } ETextureType; typedef enum EColorSpace @@ -287,6 +336,7 @@ typedef enum ETrackingResult ETrackingResult_TrackingResult_Calibrating_OutOfRange = 101, ETrackingResult_TrackingResult_Running_OK = 200, ETrackingResult_TrackingResult_Running_OutOfRange = 201, + ETrackingResult_TrackingResult_Fallback_RotationOnly = 300, } ETrackingResult; typedef enum ETrackedDeviceClass @@ -297,6 +347,7 @@ typedef enum ETrackedDeviceClass ETrackedDeviceClass_TrackedDeviceClass_GenericTracker = 3, ETrackedDeviceClass_TrackedDeviceClass_TrackingReference = 4, ETrackedDeviceClass_TrackedDeviceClass_DisplayRedirect = 5, + ETrackedDeviceClass_TrackedDeviceClass_Max = 6, } ETrackedDeviceClass; typedef enum ETrackedControllerRole @@ -305,6 +356,8 @@ typedef enum ETrackedControllerRole ETrackedControllerRole_TrackedControllerRole_LeftHand = 1, ETrackedControllerRole_TrackedControllerRole_RightHand = 2, ETrackedControllerRole_TrackedControllerRole_OptOut = 3, + ETrackedControllerRole_TrackedControllerRole_Treadmill = 4, + ETrackedControllerRole_TrackedControllerRole_Max = 4, } ETrackedControllerRole; typedef enum ETrackingUniverseOrigin @@ -356,6 +409,11 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_RegisteredDeviceType_String = 1036, ETrackedDeviceProperty_Prop_InputProfilePath_String = 1037, ETrackedDeviceProperty_Prop_NeverTracked_Bool = 1038, + ETrackedDeviceProperty_Prop_NumCameras_Int32 = 1039, + ETrackedDeviceProperty_Prop_CameraFrameLayout_Int32 = 1040, + ETrackedDeviceProperty_Prop_CameraStreamFormat_Int32 = 1041, + ETrackedDeviceProperty_Prop_AdditionalDeviceSettingsPath_String = 1042, + ETrackedDeviceProperty_Prop_Identifiable_Bool = 1043, ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000, ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001, ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002, @@ -417,6 +475,21 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_MinimumIpdStepMeters_Float = 2060, ETrackedDeviceProperty_Prop_AudioBridgeFirmwareVersion_Uint64 = 2061, ETrackedDeviceProperty_Prop_ImageBridgeFirmwareVersion_Uint64 = 2062, + ETrackedDeviceProperty_Prop_ImuToHeadTransform_Matrix34 = 2063, + ETrackedDeviceProperty_Prop_ImuFactoryGyroBias_Vector3 = 2064, + ETrackedDeviceProperty_Prop_ImuFactoryGyroScale_Vector3 = 2065, + ETrackedDeviceProperty_Prop_ImuFactoryAccelerometerBias_Vector3 = 2066, + ETrackedDeviceProperty_Prop_ImuFactoryAccelerometerScale_Vector3 = 2067, + ETrackedDeviceProperty_Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069, + ETrackedDeviceProperty_Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, + ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, + ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, + ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203, + ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204, + ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205, + ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206, + ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, + ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000, ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001, ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002, @@ -451,8 +524,10 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_HasCameraComponent_Bool = 6004, ETrackedDeviceProperty_Prop_HasDriverDirectModeComponent_Bool = 6005, ETrackedDeviceProperty_Prop_HasVirtualDisplayComponent_Bool = 6006, + ETrackedDeviceProperty_Prop_HasSpatialAnchorsSupport_Bool = 6007, ETrackedDeviceProperty_Prop_ControllerType_String = 7000, ETrackedDeviceProperty_Prop_LegacyInputProfile_String = 7001, + ETrackedDeviceProperty_Prop_ControllerHandSelectionPriority_Int32 = 7002, ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_Start = 10000, ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_End = 10999, ETrackedDeviceProperty_Prop_TrackedDeviceProperty_Max = 1000000, @@ -473,6 +548,7 @@ typedef enum ETrackedPropertyError ETrackedPropertyError_TrackedProp_PermissionDenied = 10, ETrackedPropertyError_TrackedProp_InvalidOperation = 11, ETrackedPropertyError_TrackedProp_CannotWriteToWildcards = 12, + ETrackedPropertyError_TrackedProp_IPCReadFailure = 13, } ETrackedPropertyError; typedef enum EVRSubmitFlags @@ -535,6 +611,7 @@ typedef enum EVREventType EVREventType_VREvent_Scroll = 305, EVREventType_VREvent_TouchPadMove = 306, EVREventType_VREvent_OverlayFocusChanged = 307, + EVREventType_VREvent_ReloadOverlays = 308, EVREventType_VREvent_InputFocusCaptured = 400, EVREventType_VREvent_InputFocusReleased = 401, EVREventType_VREvent_SceneFocusLost = 402, @@ -544,6 +621,7 @@ typedef enum EVREventType EVREventType_VREvent_InputFocusChanged = 406, EVREventType_VREvent_SceneApplicationSecondaryRenderingStarted = 407, EVREventType_VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, + EVREventType_VREvent_ActionBindingReloaded = 409, EVREventType_VREvent_HideRenderModels = 410, EVREventType_VREvent_ShowRenderModels = 411, EVREventType_VREvent_ConsoleOpened = 420, @@ -574,6 +652,7 @@ typedef enum EVREventType EVREventType_VREvent_PrimaryDashboardDeviceChanged = 525, EVREventType_VREvent_RoomViewShown = 526, EVREventType_VREvent_RoomViewHidden = 527, + EVREventType_VREvent_ShowUI = 528, EVREventType_VREvent_Notification_Shown = 600, EVREventType_VREvent_Notification_Hidden = 601, EVREventType_VREvent_Notification_BeginInteraction = 602, @@ -588,6 +667,7 @@ typedef enum EVREventType EVREventType_VREvent_ChaperoneTempDataHasChanged = 802, EVREventType_VREvent_ChaperoneSettingsHaveChanged = 803, EVREventType_VREvent_SeatedZeroPoseReset = 804, + EVREventType_VREvent_ChaperoneFlushCache = 805, EVREventType_VREvent_AudioSettingsHaveChanged = 820, EVREventType_VREvent_BackgroundSettingHasChanged = 850, EVREventType_VREvent_CameraSettingsHaveChanged = 851, @@ -605,6 +685,8 @@ typedef enum EVREventType EVREventType_VREvent_PerfSectionSettingChanged = 863, EVREventType_VREvent_DashboardSectionSettingChanged = 864, EVREventType_VREvent_WebInterfaceSectionSettingChanged = 865, + EVREventType_VREvent_TrackersSectionSettingChanged = 866, + EVREventType_VREvent_LastKnownSectionSettingChanged = 867, EVREventType_VREvent_StatusUpdate = 900, EVREventType_VREvent_WebInterface_InstallDriverCompleted = 950, EVREventType_VREvent_MCImageUpdated = 1000, @@ -636,6 +718,16 @@ typedef enum EVREventType EVREventType_VREvent_MessageOverlay_Closed = 1650, EVREventType_VREvent_MessageOverlayCloseRequested = 1651, EVREventType_VREvent_Input_HapticVibration = 1700, + EVREventType_VREvent_Input_BindingLoadFailed = 1701, + EVREventType_VREvent_Input_BindingLoadSuccessful = 1702, + EVREventType_VREvent_Input_ActionManifestReloaded = 1703, + EVREventType_VREvent_Input_ActionManifestLoadFailed = 1704, + EVREventType_VREvent_Input_ProgressUpdate = 1705, + EVREventType_VREvent_Input_TrackerActivated = 1706, + EVREventType_VREvent_SpatialAnchors_PoseUpdated = 1800, + EVREventType_VREvent_SpatialAnchors_DescriptorUpdated = 1801, + EVREventType_VREvent_SpatialAnchors_RequestPoseUpdate = 1802, + EVREventType_VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, EVREventType_VREvent_VendorSpecific_Reserved_Start = 10000, EVREventType_VREvent_VendorSpecific_Reserved_End = 19999, } EVREventType; @@ -668,6 +760,9 @@ typedef enum EVRButtonId EVRButtonId_k_EButton_SteamVR_Touchpad = 32, EVRButtonId_k_EButton_SteamVR_Trigger = 33, EVRButtonId_k_EButton_Dashboard_Back = 2, + EVRButtonId_k_EButton_Knuckles_A = 2, + EVRButtonId_k_EButton_Knuckles_B = 1, + EVRButtonId_k_EButton_Knuckles_JoyStick = 35, EVRButtonId_k_EButton_Max = 64, } EVRButtonId; @@ -684,6 +779,13 @@ typedef enum EDualAnalogWhich EDualAnalogWhich_k_EDualAnalog_Right = 1, } EDualAnalogWhich; +typedef enum EShowUIType +{ + EShowUIType_ShowUI_ControllerBinding = 0, + EShowUIType_ShowUI_ManageTrackers = 1, + EShowUIType_ShowUI_QuickStart = 2, +} EShowUIType; + typedef enum EVRInputError { EVRInputError_VRInputError_None = 0, @@ -696,8 +798,34 @@ typedef enum EVRInputError EVRInputError_VRInputError_IPCError = 7, EVRInputError_VRInputError_NoActiveActionSet = 8, EVRInputError_VRInputError_InvalidDevice = 9, + EVRInputError_VRInputError_InvalidSkeleton = 10, + EVRInputError_VRInputError_InvalidBoneCount = 11, + EVRInputError_VRInputError_InvalidCompressedData = 12, + EVRInputError_VRInputError_NoData = 13, + EVRInputError_VRInputError_BufferTooSmall = 14, + EVRInputError_VRInputError_MismatchedActionManifest = 15, + EVRInputError_VRInputError_MissingSkeletonData = 16, + EVRInputError_VRInputError_InvalidBoneIndex = 17, } EVRInputError; +typedef enum EVRSpatialAnchorError +{ + EVRSpatialAnchorError_VRSpatialAnchorError_Success = 0, + EVRSpatialAnchorError_VRSpatialAnchorError_Internal = 1, + EVRSpatialAnchorError_VRSpatialAnchorError_UnknownHandle = 2, + EVRSpatialAnchorError_VRSpatialAnchorError_ArrayTooSmall = 3, + EVRSpatialAnchorError_VRSpatialAnchorError_InvalidDescriptorChar = 4, + EVRSpatialAnchorError_VRSpatialAnchorError_NotYetAvailable = 5, + EVRSpatialAnchorError_VRSpatialAnchorError_NotAvailableInThisUniverse = 6, + EVRSpatialAnchorError_VRSpatialAnchorError_PermanentlyUnavailable = 7, + EVRSpatialAnchorError_VRSpatialAnchorError_WrongDriver = 8, + EVRSpatialAnchorError_VRSpatialAnchorError_DescriptorTooLong = 9, + EVRSpatialAnchorError_VRSpatialAnchorError_Unknown = 10, + EVRSpatialAnchorError_VRSpatialAnchorError_NoRoomCalibration = 11, + EVRSpatialAnchorError_VRSpatialAnchorError_InvalidArgument = 12, + EVRSpatialAnchorError_VRSpatialAnchorError_UnknownDriver = 13, +} EVRSpatialAnchorError; + typedef enum EHiddenAreaMeshType { EHiddenAreaMeshType_k_eHiddenAreaMesh_Standard = 0, @@ -768,7 +896,8 @@ typedef enum EVRApplicationType EVRApplicationType_VRApplication_VRMonitor = 5, EVRApplicationType_VRApplication_SteamWatchdog = 6, EVRApplicationType_VRApplication_Bootstrapper = 7, - EVRApplicationType_VRApplication_Max = 8, + EVRApplicationType_VRApplication_WebHelper = 8, + EVRApplicationType_VRApplication_Max = 9, } EVRApplicationType; typedef enum EVRFirmwareError @@ -787,6 +916,21 @@ typedef enum EVRNotificationError EVRNotificationError_VRNotificationError_SystemWithUserValueAlreadyExists = 103, } EVRNotificationError; +typedef enum EVRSkeletalMotionRange +{ + EVRSkeletalMotionRange_VRSkeletalMotionRange_WithController = 0, + EVRSkeletalMotionRange_VRSkeletalMotionRange_WithoutController = 1, +} EVRSkeletalMotionRange; + +typedef enum EVRSkeletalTrackingLevel +{ + EVRSkeletalTrackingLevel_VRSkeletalTracking_Estimated = 0, + EVRSkeletalTrackingLevel_VRSkeletalTracking_Partial = 1, + EVRSkeletalTrackingLevel_VRSkeletalTracking_Full = 2, + EVRSkeletalTrackingLevel_VRSkeletalTrackingLevel_Count = 3, + EVRSkeletalTrackingLevel_VRSkeletalTrackingLevel_Max = 2, +} EVRSkeletalTrackingLevel; + typedef enum EVRInitError { EVRInitError_VRInitError_None = 0, @@ -833,6 +977,7 @@ typedef enum EVRInitError EVRInitError_VRInitError_Init_FirmwareRecoveryBusy = 139, EVRInitError_VRInitError_Init_USBServiceBusy = 140, EVRInitError_VRInitError_Init_VRWebHelperStartupFailed = 141, + EVRInitError_VRInitError_Init_TrackerManagerInitFailed = 142, EVRInitError_VRInitError_Driver_Failed = 200, EVRInitError_VRInitError_Driver_Unknown = 201, EVRInitError_VRInitError_Driver_HmdUnknown = 202, @@ -915,6 +1060,14 @@ typedef enum EVRTrackedCameraError EVRTrackedCameraError_VRTrackedCameraError_InvalidFrameBufferSize = 115, } EVRTrackedCameraError; +typedef enum EVRTrackedCameraFrameLayout +{ + EVRTrackedCameraFrameLayout_Mono = 1, + EVRTrackedCameraFrameLayout_Stereo = 2, + EVRTrackedCameraFrameLayout_VerticalLayout = 16, + EVRTrackedCameraFrameLayout_HorizontalLayout = 32, +} EVRTrackedCameraFrameLayout; + typedef enum EVRTrackedCameraFrameType { EVRTrackedCameraFrameType_VRTrackedCameraFrameType_Distorted = 0, @@ -923,6 +1076,37 @@ typedef enum EVRTrackedCameraFrameType EVRTrackedCameraFrameType_MAX_CAMERA_FRAME_TYPES = 3, } EVRTrackedCameraFrameType; +typedef enum EVRDistortionFunctionType +{ + EVRDistortionFunctionType_VRDistortionFunctionType_None = 0, + EVRDistortionFunctionType_VRDistortionFunctionType_FTheta = 1, + EVRDistortionFunctionType_VRDistortionFucntionType_Extended_FTheta = 2, + EVRDistortionFunctionType_MAX_DISTORTION_FUNCTION_TYPES = 3, +} EVRDistortionFunctionType; + +typedef enum EVSync +{ + EVSync_VSync_None = 0, + EVSync_VSync_WaitRender = 1, + EVSync_VSync_NoWaitRender = 2, +} EVSync; + +typedef enum EVRMuraCorrectionMode +{ + EVRMuraCorrectionMode_Default = 0, + EVRMuraCorrectionMode_NoCorrection = 1, +} EVRMuraCorrectionMode; + +typedef enum Imu_OffScaleFlags +{ + Imu_OffScaleFlags_OffScale_AccelX = 1, + Imu_OffScaleFlags_OffScale_AccelY = 2, + Imu_OffScaleFlags_OffScale_AccelZ = 4, + Imu_OffScaleFlags_OffScale_GyroX = 8, + Imu_OffScaleFlags_OffScale_GyroY = 16, + Imu_OffScaleFlags_OffScale_GyroZ = 32, +} Imu_OffScaleFlags; + typedef enum EVRApplicationError { EVRApplicationError_VRApplicationError_None = 0, @@ -1058,6 +1242,7 @@ typedef enum VROverlayFlags VROverlayFlags_StereoPanorama = 13, VROverlayFlags_SortWithNonSceneOverlays = 14, VROverlayFlags_VisibleInDashboard = 15, + VROverlayFlags_MakeOverlaysInteractiveIfVisible = 16, } VROverlayFlags; typedef enum VRMessageOverlayResponse @@ -1161,6 +1346,71 @@ typedef enum EVRScreenshotError EVRScreenshotError_VRScreenshotError_ScreenshotAlreadyInProgress = 108, } EVRScreenshotError; +typedef enum EVRSkeletalTransformSpace +{ + EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Model = 0, + EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Parent = 1, +} EVRSkeletalTransformSpace; + +typedef enum EVRSkeletalReferencePose +{ + EVRSkeletalReferencePose_VRSkeletalReferencePose_BindPose = 0, + EVRSkeletalReferencePose_VRSkeletalReferencePose_OpenHand = 1, + EVRSkeletalReferencePose_VRSkeletalReferencePose_Fist = 2, + EVRSkeletalReferencePose_VRSkeletalReferencePose_GripLimit = 3, +} EVRSkeletalReferencePose; + +typedef enum EVRFinger +{ + EVRFinger_VRFinger_Thumb = 0, + EVRFinger_VRFinger_Index = 1, + EVRFinger_VRFinger_Middle = 2, + EVRFinger_VRFinger_Ring = 3, + EVRFinger_VRFinger_Pinky = 4, + EVRFinger_VRFinger_Count = 5, +} EVRFinger; + +typedef enum EVRFingerSplay +{ + EVRFingerSplay_VRFingerSplay_Thumb_Index = 0, + EVRFingerSplay_VRFingerSplay_Index_Middle = 1, + EVRFingerSplay_VRFingerSplay_Middle_Ring = 2, + EVRFingerSplay_VRFingerSplay_Ring_Pinky = 3, + EVRFingerSplay_VRFingerSplay_Count = 4, +} EVRFingerSplay; + +typedef enum EVRInputFilterCancelType +{ + EVRInputFilterCancelType_VRInputFilterCancel_Timers = 0, + EVRInputFilterCancelType_VRInputFilterCancel_Momentum = 1, +} EVRInputFilterCancelType; + +typedef enum EVRInputStringBits +{ + EVRInputStringBits_VRInputString_Hand = 1, + EVRInputStringBits_VRInputString_ControllerType = 2, + EVRInputStringBits_VRInputString_InputSource = 4, + EVRInputStringBits_VRInputString_All = -1, +} EVRInputStringBits; + +typedef enum EIOBufferError +{ + EIOBufferError_IOBuffer_Success = 0, + EIOBufferError_IOBuffer_OperationFailed = 100, + EIOBufferError_IOBuffer_InvalidHandle = 101, + EIOBufferError_IOBuffer_InvalidArgument = 102, + EIOBufferError_IOBuffer_PathExists = 103, + EIOBufferError_IOBuffer_PathDoesNotExist = 104, + EIOBufferError_IOBuffer_Permission = 105, +} EIOBufferError; + +typedef enum EIOBufferMode +{ + EIOBufferMode_IOBufferMode_Read = 1, + EIOBufferMode_IOBufferMode_Write = 2, + EIOBufferMode_IOBufferMode_Create = 512, +} EIOBufferMode; + // OpenVR typedefs @@ -1168,21 +1418,28 @@ typedef uint32_t TrackedDeviceIndex_t; typedef uint32_t VRNotificationId; typedef uint64_t VROverlayHandle_t; +typedef uint32_t SpatialAnchorHandle_t; typedef void * glSharedTextureHandle_t; typedef int32_t glInt_t; typedef uint32_t glUInt_t; typedef uint64_t SharedTextureHandle_t; typedef uint32_t DriverId_t; typedef uint32_t TrackedDeviceIndex_t; +typedef uint64_t WebConsoleHandle_t; typedef uint64_t PropertyContainerHandle_t; typedef uint32_t PropertyTypeTag_t; typedef PropertyContainerHandle_t DriverHandle_t; +typedef uint64_t VRActionHandle_t; +typedef uint64_t VRActionSetHandle_t; +typedef uint64_t VRInputValueHandle_t; typedef uint64_t VROverlayHandle_t; +typedef int32_t BoneIndex_t; typedef uint64_t TrackedCameraHandle_t; typedef uint32_t ScreenshotHandle_t; typedef uint32_t VRComponentProperties; typedef int32_t TextureID_t; typedef uint32_t VRNotificationId; +typedef uint64_t IOBufferHandle_t; typedef EVRInitError HmdError; typedef EVREye Hmd_Eye; typedef EColorSpace ColorSpace; @@ -1206,6 +1463,11 @@ typedef struct HmdMatrix34_t float m[3][4]; //float[3][4] } HmdMatrix34_t; +typedef struct HmdMatrix33_t +{ + float m[3][3]; //float[3][3] +} HmdMatrix33_t; + typedef struct HmdMatrix44_t { float m[4][4]; //float[4][4] @@ -1239,6 +1501,14 @@ typedef struct HmdQuaternion_t double z; } HmdQuaternion_t; +typedef struct HmdQuaternionf_t +{ + float w; + float x; + float y; + float z; +} HmdQuaternionf_t; + typedef struct HmdColor_t { float r; @@ -1378,6 +1648,7 @@ typedef struct VREvent_Process_t typedef struct VREvent_Overlay_t { uint64_t overlayHandle; + uint64_t devicePath; } VREvent_Overlay_t; typedef struct VREvent_Status_t @@ -1387,7 +1658,7 @@ typedef struct VREvent_Status_t typedef struct VREvent_Keyboard_t { - char * cNewInput[8]; //char[8] + char cNewInput[8]; //char[8] uint64_t uUserValue; } VREvent_Keyboard_t; @@ -1408,6 +1679,8 @@ typedef struct VREvent_Reserved_t uint64_t reserved1; uint64_t reserved2; uint64_t reserved3; + uint64_t reserved4; + uint64_t reserved5; } VREvent_Reserved_t; typedef struct VREvent_PerformanceTest_t @@ -1472,6 +1745,47 @@ typedef struct VREvent_HapticVibration_t float fAmplitude; } VREvent_HapticVibration_t; +typedef struct VREvent_WebConsole_t +{ + WebConsoleHandle_t webConsoleHandle; +} VREvent_WebConsole_t; + +typedef struct VREvent_InputBindingLoad_t +{ + PropertyContainerHandle_t ulAppContainer; + uint64_t pathMessage; + uint64_t pathUrl; + uint64_t pathControllerType; +} VREvent_InputBindingLoad_t; + +typedef struct VREvent_InputActionManifestLoad_t +{ + uint64_t pathAppKey; + uint64_t pathMessage; + uint64_t pathMessageParam; + uint64_t pathManifestPath; +} VREvent_InputActionManifestLoad_t; + +typedef struct VREvent_SpatialAnchor_t +{ + SpatialAnchorHandle_t unHandle; +} VREvent_SpatialAnchor_t; + +typedef struct VREvent_ProgressUpdate_t +{ + uint64_t ulApplicationPropertyContainer; + uint64_t pathDevice; + uint64_t pathInputSource; + uint64_t pathProgressAction; + uint64_t pathIcon; + float fProgress; +} VREvent_ProgressUpdate_t; + +typedef struct VREvent_ShowUI_t +{ + enum EShowUIType eType; +} VREvent_ShowUI_t; + typedef struct HiddenAreaMesh_t { struct HmdVector2_t * pVertexData; // const struct vr::HmdVector2_t * @@ -1510,6 +1824,12 @@ typedef struct Compositor_OverlaySettings struct HmdMatrix44_t transform; } Compositor_OverlaySettings; +typedef struct VRBoneTransform_t +{ + struct HmdVector4_t position; + struct HmdQuaternionf_t orientation; +} VRBoneTransform_t; + typedef struct CameraVideoStreamFrameHeader_t { enum EVRTrackedCameraFrameType eFrameType; @@ -1518,6 +1838,7 @@ typedef struct CameraVideoStreamFrameHeader_t uint32_t nBytesPerPixel; uint32_t nFrameSequence; struct TrackedDevicePose_t standingTrackedDevicePose; + uint64_t ulFrameExposureTime; } CameraVideoStreamFrameHeader_t; typedef struct DriverDirectMode_FrameTiming @@ -1529,6 +1850,14 @@ typedef struct DriverDirectMode_FrameTiming uint32_t m_nReprojectionFlags; } DriverDirectMode_FrameTiming; +typedef struct ImuSample_t +{ + double fSampleTime; + struct HmdVector3d_t vAccel; + struct HmdVector3d_t vGyro; + uint32_t unOffScaleFlags; +} ImuSample_t; + typedef struct AppOverrideKeys_t { char * pchKey; // const char * @@ -1561,6 +1890,8 @@ typedef struct Compositor_FrameTiming float m_flCompositorUpdateEndMs; float m_flCompositorRenderStartMs; TrackedDevicePose_t m_HmdPose; + uint32_t m_nNumVSyncsReadyForUse; + uint32_t m_nNumVSyncsToFirstView; } Compositor_FrameTiming; typedef struct Compositor_CumulativeStats @@ -1667,6 +1998,73 @@ typedef struct NotificationBitmap_t int32_t m_nBytesPerPixel; } NotificationBitmap_t; +typedef struct CVRSettingHelper +{ + intptr_t m_pSettings; // class vr::IVRSettings * +} CVRSettingHelper; + +typedef struct InputAnalogActionData_t +{ + bool bActive; + VRInputValueHandle_t activeOrigin; + float x; + float y; + float z; + float deltaX; + float deltaY; + float deltaZ; + float fUpdateTime; +} InputAnalogActionData_t; + +typedef struct InputDigitalActionData_t +{ + bool bActive; + VRInputValueHandle_t activeOrigin; + bool bState; + bool bChanged; + float fUpdateTime; +} InputDigitalActionData_t; + +typedef struct InputPoseActionData_t +{ + bool bActive; + VRInputValueHandle_t activeOrigin; + struct TrackedDevicePose_t pose; +} InputPoseActionData_t; + +typedef struct InputSkeletalActionData_t +{ + bool bActive; + VRInputValueHandle_t activeOrigin; +} InputSkeletalActionData_t; + +typedef struct InputOriginInfo_t +{ + VRInputValueHandle_t devicePath; + TrackedDeviceIndex_t trackedDeviceIndex; + char rchRenderModelComponentName[128]; //char[128] +} InputOriginInfo_t; + +typedef struct VRActiveActionSet_t +{ + VRActionSetHandle_t ulActionSet; + VRInputValueHandle_t ulRestrictedToDevice; + VRActionSetHandle_t ulSecondaryActionSet; + uint32_t unPadding; + int32_t nPriority; +} VRActiveActionSet_t; + +typedef struct VRSkeletalSummaryData_t +{ + float flFingerCurl[5]; //float[5] + float flFingerSplay[4]; //float[4] +} VRSkeletalSummaryData_t; + +typedef struct SpatialAnchorPose_t +{ + struct HmdMatrix34_t mAnchorToAbsoluteTracking; +} SpatialAnchorPose_t; + typedef struct COpenVRContext { intptr_t m_pVRSystem; // class vr::IVRSystem * @@ -1682,6 +2080,9 @@ typedef struct COpenVRContext intptr_t m_pVRTrackedCamera; // class vr::IVRTrackedCamera * intptr_t m_pVRScreenshots; // class vr::IVRScreenshots * intptr_t m_pVRDriverManager; // class vr::IVRDriverManager * + intptr_t m_pVRInput; // class vr::IVRInput * + intptr_t m_pVRIOBuffer; // class vr::IVRIOBuffer * + intptr_t m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors * } COpenVRContext; @@ -1701,8 +2102,26 @@ typedef union VREvent_PerformanceTest_t performanceTest; VREvent_TouchPadMove_t touchPadMove; VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; + VREvent_MessageOverlay_t messageOverlay; + VREvent_Property_t property; + VREvent_DualAnalog_t dualAnalog; + VREvent_HapticVibration_t hapticVibration; + VREvent_WebConsole_t webConsole; + VREvent_InputBindingLoad_t inputBinding; + VREvent_InputActionManifestLoad_t actionManifest; + VREvent_SpatialAnchor_t spatialAnchor; } VREvent_Data_t; +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + /** An event posted by the server to all running applications */ struct VREvent_t { @@ -1713,6 +2132,10 @@ struct VREvent_t VREvent_Data_t data; }; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + typedef union { @@ -1792,8 +2215,8 @@ struct VR_IVRTrackedCamera_FnTable char * (OPENVR_FNTABLE_CALLTYPE *GetCameraErrorNameFromEnum)(EVRTrackedCameraError eCameraError); EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *HasCamera)(TrackedDeviceIndex_t nDeviceIndex, bool * pHasCamera); EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraFrameSize)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, uint32_t * pnWidth, uint32_t * pnHeight, uint32_t * pnFrameBufferSize); - EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraIntrinsics)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, HmdVector2_t * pFocalLength, HmdVector2_t * pCenter); - EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraProjection)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, HmdMatrix44_t * pProjection); + EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraIntrinsics)(TrackedDeviceIndex_t nDeviceIndex, uint32_t nCameraIndex, EVRTrackedCameraFrameType eFrameType, HmdVector2_t * pFocalLength, HmdVector2_t * pCenter); + EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraProjection)(TrackedDeviceIndex_t nDeviceIndex, uint32_t nCameraIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, HmdMatrix44_t * pProjection); EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *AcquireVideoStreamingService)(TrackedDeviceIndex_t nDeviceIndex, TrackedCameraHandle_t * pHandle); EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *ReleaseVideoStreamingService)(TrackedCameraHandle_t hTrackedCamera); EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamFrameBuffer)(TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pFrameBuffer, uint32_t nFrameBufferSize, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize); @@ -1862,16 +2285,15 @@ struct VR_IVRChaperoneSetup_FnTable bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingStandingZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatStandingZeroPoseToRawTrackingPose); void (OPENVR_FNTABLE_CALLTYPE *SetWorkingPlayAreaSize)(float sizeX, float sizeZ); void (OPENVR_FNTABLE_CALLTYPE *SetWorkingCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount); + void (OPENVR_FNTABLE_CALLTYPE *SetWorkingPerimeter)(struct HmdVector2_t * pPointBuffer, uint32_t unPointCount); void (OPENVR_FNTABLE_CALLTYPE *SetWorkingSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pMatSeatedZeroPoseToRawTrackingPose); void (OPENVR_FNTABLE_CALLTYPE *SetWorkingStandingZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pMatStandingZeroPoseToRawTrackingPose); void (OPENVR_FNTABLE_CALLTYPE *ReloadFromDisk)(EChaperoneConfigFile configFile); bool (OPENVR_FNTABLE_CALLTYPE *GetLiveSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose); - void (OPENVR_FNTABLE_CALLTYPE *SetWorkingCollisionBoundsTagsInfo)(uint8_t * pTagsBuffer, uint32_t unTagCount); - bool (OPENVR_FNTABLE_CALLTYPE *GetLiveCollisionBoundsTagsInfo)(uint8_t * pTagsBuffer, uint32_t * punTagCount); - bool (OPENVR_FNTABLE_CALLTYPE *SetWorkingPhysicalBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount); - bool (OPENVR_FNTABLE_CALLTYPE *GetLivePhysicalBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount); bool (OPENVR_FNTABLE_CALLTYPE *ExportLiveToBuffer)(char * pBuffer, uint32_t * pnBufferLength); bool (OPENVR_FNTABLE_CALLTYPE *ImportFromBufferToWorking)(char * pBuffer, uint32_t nImportFlags); + void (OPENVR_FNTABLE_CALLTYPE *ShowWorkingSetPreview)(); + void (OPENVR_FNTABLE_CALLTYPE *HideWorkingSetPreview)(); }; struct VR_IVRCompositor_FnTable @@ -1919,6 +2341,7 @@ struct VR_IVRCompositor_FnTable uint32_t (OPENVR_FNTABLE_CALLTYPE *GetVulkanDeviceExtensionsRequired)(struct VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize); void (OPENVR_FNTABLE_CALLTYPE *SetExplicitTimingMode)(EVRCompositorTimingMode eTimingMode); EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SubmitExplicitTimingData)(); + bool (OPENVR_FNTABLE_CALLTYPE *IsMotionSmoothingEnabled)(); }; struct VR_IVROverlay_FnTable @@ -1979,7 +2402,7 @@ struct VR_IVROverlay_FnTable EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetGamepadFocusOverlay)(VROverlayHandle_t ulNewFocusOverlay); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayNeighbor)(EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *MoveGamepadFocusToNeighbor)(EOverlayDirection eDirection, VROverlayHandle_t ulFrom); - EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, struct HmdVector2_t & vCenter, float fRadius); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, struct HmdVector2_t * pvCenter, float fRadius); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, struct HmdVector2_t * pvCenter, float * pfRadius); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, struct Texture_t * pTexture); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ClearOverlayTexture)(VROverlayHandle_t ulOverlayHandle); @@ -2022,6 +2445,7 @@ struct VR_IVRRenderModels_FnTable uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentName)(char * pchRenderModelName, uint32_t unComponentIndex, char * pchComponentName, uint32_t unComponentNameLen); uint64_t (OPENVR_FNTABLE_CALLTYPE *GetComponentButtonMask)(char * pchRenderModelName, char * pchComponentName); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentRenderModelName)(char * pchRenderModelName, char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen); + bool (OPENVR_FNTABLE_CALLTYPE *GetComponentStateForDevicePath)(char * pchRenderModelName, char * pchComponentName, VRInputValueHandle_t devicePath, RenderModel_ControllerMode_State_t * pState, RenderModel_ComponentState_t * pComponentState); bool (OPENVR_FNTABLE_CALLTYPE *GetComponentState)(char * pchRenderModelName, char * pchComponentName, VRControllerState_t * pControllerState, struct RenderModel_ControllerMode_State_t * pState, struct RenderModel_ComponentState_t * pComponentState); bool (OPENVR_FNTABLE_CALLTYPE *RenderModelHasComponent)(char * pchRenderModelName, char * pchComponentName); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelThumbnailURL)(char * pchRenderModelName, char * pchThumbnailURL, uint32_t unThumbnailURLLen, EVRRenderModelError * peError); @@ -2075,6 +2499,51 @@ struct VR_IVRDriverManager_FnTable DriverHandle_t (OPENVR_FNTABLE_CALLTYPE *GetDriverHandle)(char * pchDriverName); }; +struct VR_IVRInput_FnTable +{ + EVRInputError (OPENVR_FNTABLE_CALLTYPE *SetActionManifestPath)(char * pchActionManifestPath); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetActionSetHandle)(char * pchActionSetName, VRActionSetHandle_t * pHandle); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetActionHandle)(char * pchActionName, VRActionHandle_t * pHandle); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetInputSourceHandle)(char * pchInputSourcePath, VRInputValueHandle_t * pHandle); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *UpdateActionState)(struct VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetDigitalActionData)(VRActionHandle_t action, struct InputDigitalActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetAnalogActionData)(VRActionHandle_t action, struct InputAnalogActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetPoseActionData)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, struct InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalActionData)(VRActionHandle_t action, struct InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneCount)(VRActionHandle_t action, uint32_t * pBoneCount); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneHierarchy)(VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneName)(VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalReferenceTransforms)(VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, struct VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalTrackingLevel)(VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalBoneData)(VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, struct VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalSummaryData)(VRActionHandle_t action, struct VRSkeletalSummaryData_t * pSkeletalSummaryData); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalBoneDataCompressed)(VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *DecompressSkeletalBoneData)(void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, struct VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *TriggerHapticVibrationAction)(VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetOriginLocalizedName)(VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetOriginTrackedDeviceInfo)(VRInputValueHandle_t origin, struct InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowBindingsForActionSet)(struct VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight); +}; + +struct VR_IVRIOBuffer_FnTable +{ + EIOBufferError (OPENVR_FNTABLE_CALLTYPE *Open)(char * pchPath, EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, IOBufferHandle_t * pulBuffer); + EIOBufferError (OPENVR_FNTABLE_CALLTYPE *Close)(IOBufferHandle_t ulBuffer); + EIOBufferError (OPENVR_FNTABLE_CALLTYPE *Read)(IOBufferHandle_t ulBuffer, void * pDst, uint32_t unBytes, uint32_t * punRead); + EIOBufferError (OPENVR_FNTABLE_CALLTYPE *Write)(IOBufferHandle_t ulBuffer, void * pSrc, uint32_t unBytes); + PropertyContainerHandle_t (OPENVR_FNTABLE_CALLTYPE *PropertyContainer)(IOBufferHandle_t ulBuffer); +}; + +struct VR_IVRSpatialAnchors_FnTable +{ + EVRSpatialAnchorError (OPENVR_FNTABLE_CALLTYPE *CreateSpatialAnchorFromDescriptor)(char * pchDescriptor, SpatialAnchorHandle_t * pHandleOut); + EVRSpatialAnchorError (OPENVR_FNTABLE_CALLTYPE *CreateSpatialAnchorFromPose)(TrackedDeviceIndex_t unDeviceIndex, ETrackingUniverseOrigin eOrigin, struct SpatialAnchorPose_t * pPose, SpatialAnchorHandle_t * pHandleOut); + EVRSpatialAnchorError (OPENVR_FNTABLE_CALLTYPE *GetSpatialAnchorPose)(SpatialAnchorHandle_t unHandle, ETrackingUniverseOrigin eOrigin, struct SpatialAnchorPose_t * pPoseOut); + EVRSpatialAnchorError (OPENVR_FNTABLE_CALLTYPE *GetSpatialAnchorDescriptor)(SpatialAnchorHandle_t unHandle, char * pchDescriptorOut, uint32_t * punDescriptorBufferLenInOut); +}; + #if 0 // Global entry points diff --git a/third-party/openvr/headers/openvr_driver.h b/third-party/openvr/headers/openvr_driver.h index 590619f..b8c6952 100644 --- a/third-party/openvr/headers/openvr_driver.h +++ b/third-party/openvr/headers/openvr_driver.h @@ -11,6 +11,14 @@ +// version.h +namespace vr +{ + static const uint32_t k_nSteamVRVersionMajor = 1; + static const uint32_t k_nSteamVRVersionMinor = 1; + static const uint32_t k_nSteamVRVersionBuild = 3; +} // namespace vr + // vrtypes.h #ifndef _INCLUDE_VRTYPES_H #define _INCLUDE_VRTYPES_H @@ -29,6 +37,10 @@ namespace vr { #pragma pack( push, 8 ) +/** A handle for a spatial anchor. This handle is only valid during the session it was created in. +* Anchors that live beyond one session should be saved by their string descriptors. */ +typedef uint32_t SpatialAnchorHandle_t; + typedef void* glSharedTextureHandle_t; typedef int32_t glInt_t; typedef uint32_t glUInt_t; @@ -43,6 +55,11 @@ struct HmdMatrix34_t float m[3][4]; }; +struct HmdMatrix33_t +{ + float m[3][3]; +}; + struct HmdMatrix44_t { float m[4][4]; @@ -73,6 +90,11 @@ struct HmdQuaternion_t double w, x, y, z; }; +struct HmdQuaternionf_t +{ + float w, x, y, z; +}; + struct HmdColor_t { float r, g, b, a; @@ -107,13 +129,17 @@ enum EVREye enum ETextureType { + TextureType_Invalid = -1, // Handle has been invalidated TextureType_DirectX = 0, // Handle is an ID3D11Texture TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure - TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef + TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef, deprecated in favor of TextureType_Metal on supported platforms 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 + TextureType_Metal = 6, // Handle is a MTLTexture conforming to the MTLSharedTexture protocol. Textures submitted to IVRCompositor::Submit which + // are of type MTLTextureType2DArray assume layer 0 is the left eye texture (vr::EVREye::Eye_left), layer 1 is the right + // eye texture (vr::EVREye::Eye_Right) }; enum EColorSpace @@ -143,6 +169,8 @@ enum ETrackingResult TrackingResult_Running_OK = 200, TrackingResult_Running_OutOfRange = 201, + + TrackingResult_Fallback_RotationOnly = 300, }; typedef uint32_t DriverId_t; @@ -166,6 +194,8 @@ enum ETrackedDeviceClass TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points TrackedDeviceClass_DisplayRedirect = 5, // Accessories that aren't necessarily tracked themselves, but may redirect video output from other tracked devices + + TrackedDeviceClass_Max }; @@ -176,9 +206,26 @@ enum ETrackedControllerRole 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 + TrackedControllerRole_Treadmill = 4, // Tracked device is a treadmill + TrackedControllerRole_Max = 4 }; +/** Returns true if the tracked controller role is allowed to be a hand */ +inline bool IsRoleAllowedAsHand( ETrackedControllerRole eRole ) +{ + switch ( eRole ) + { + case TrackedControllerRole_Invalid: + case TrackedControllerRole_LeftHand: + case TrackedControllerRole_RightHand: + return true; + default: + return false; + } +} + + /** describes a single pose for a tracked object */ struct TrackedDevicePose_t { @@ -202,6 +249,9 @@ enum ETrackingUniverseOrigin TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. }; +typedef uint64_t WebConsoleHandle_t; +#define INVALID_WEB_CONSOLE_HANDLE ((vr::WebConsoleHandle_t)0) + // Refers to a single container of properties typedef uint64_t PropertyContainerHandle_t; typedef uint32_t PropertyTypeTag_t; @@ -223,6 +273,8 @@ static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20; static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21; static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; +static const PropertyTypeTag_t k_unHmdVector2PropertyTag = 24; +static const PropertyTypeTag_t k_unHmdQuadPropertyTag = 25; static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; static const PropertyTypeTag_t k_unPathHandleInfoTag = 31; @@ -230,6 +282,10 @@ static const PropertyTypeTag_t k_unActionPropertyTag = 32; static const PropertyTypeTag_t k_unInputValuePropertyTag = 33; static const PropertyTypeTag_t k_unWildcardPropertyTag = 34; static const PropertyTypeTag_t k_unHapticVibrationPropertyTag = 35; +static const PropertyTypeTag_t k_unSkeletonPropertyTag = 36; + +static const PropertyTypeTag_t k_unSpatialAnchorPosePropertyTag = 40; +static const PropertyTypeTag_t k_unJsonPropertyTag = 41; static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; @@ -281,6 +337,11 @@ enum ETrackedDeviceProperty 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 + Prop_NumCameras_Int32 = 1039, + Prop_CameraFrameLayout_Int32 = 1040, // EVRTrackedCameraFrameLayout value + Prop_CameraStreamFormat_Int32 = 1041, // ECameraVideoStreamFormat value + Prop_AdditionalDeviceSettingsPath_String = 1042, // driver-relative path to additional device and global configuration settings + Prop_Identifiable_Bool = 1043, // Whether device supports being identified from vrmonitor (e.g. blink LED, vibrate haptics, etc) // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -344,6 +405,24 @@ enum ETrackedDeviceProperty Prop_MinimumIpdStepMeters_Float = 2060, Prop_AudioBridgeFirmwareVersion_Uint64 = 2061, Prop_ImageBridgeFirmwareVersion_Uint64 = 2062, + Prop_ImuToHeadTransform_Matrix34 = 2063, + Prop_ImuFactoryGyroBias_Vector3 = 2064, + Prop_ImuFactoryGyroScale_Vector3 = 2065, + Prop_ImuFactoryAccelerometerBias_Vector3 = 2066, + Prop_ImuFactoryAccelerometerScale_Vector3 = 2067, + // reserved 2068 + Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069, + + // Driver requested mura correction properties + Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, + Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, + Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, + Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203, + Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204, + Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205, + Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206, + Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, + Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, // Properties that are unique to TrackedDeviceClass_Controller Prop_AttachedDeviceId_String = 3000, @@ -388,10 +467,12 @@ enum ETrackedDeviceProperty Prop_HasCameraComponent_Bool = 6004, Prop_HasDriverDirectModeComponent_Bool = 6005, Prop_HasVirtualDisplayComponent_Bool = 6006, + Prop_HasSpatialAnchorsSupport_Bool = 6007, // Properties that are set internally based on other information provided by drivers Prop_ControllerType_String = 7000, Prop_LegacyInputProfile_String = 7001, + Prop_ControllerHandSelectionPriority_Int32 = 7002, // Allows hand assignments to prefer some controllers over others. High numbers are selected over low numbers // Vendors are free to expose private debug data in this reserved region Prop_VendorSpecific_Reserved_Start = 10000, @@ -419,8 +500,19 @@ enum ETrackedPropertyError TrackedProp_PermissionDenied = 10, TrackedProp_InvalidOperation = 11, TrackedProp_CannotWriteToWildcards = 12, + TrackedProp_IPCReadFailure = 13, }; + +typedef uint64_t VRActionHandle_t; +typedef uint64_t VRActionSetHandle_t; +typedef uint64_t VRInputValueHandle_t; + +static const VRActionHandle_t k_ulInvalidActionHandle = 0; +static const VRActionSetHandle_t k_ulInvalidActionSetHandle = 0; +static const VRInputValueHandle_t k_ulInvalidInputValueHandle = 0; + + /** Allows the application to control what part of the provided texture will be used in the * frame buffer. */ struct VRTextureBounds_t @@ -479,7 +571,8 @@ enum EVRSubmitFlags }; /** Data required for passing Vulkan textures to IVRCompositor::Submit. -* Be sure to call OpenVR_Shutdown before destroying these resources. */ +* Be sure to call OpenVR_Shutdown before destroying these resources. +* Please see https://github.com/ValveSoftware/openvr/wiki/Vulkan for Vulkan-specific documentation */ struct VRVulkanTextureData_t { uint64_t m_nImage; // VkImage @@ -556,6 +649,7 @@ enum EVREventType VREvent_Scroll = 305, // data is mouse VREvent_TouchPadMove = 306, // data is mouse VREvent_OverlayFocusChanged = 307, // data is overlay, global event + VREvent_ReloadOverlays = 308, VREvent_InputFocusCaptured = 400, // data is process DEPRECATED VREvent_InputFocusReleased = 401, // data is process DEPRECATED @@ -566,6 +660,7 @@ enum EVREventType VREvent_InputFocusChanged = 406, // data is process VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, // data is process + VREvent_ActionBindingReloaded = 409, // data is process - The App that action binds reloaded for 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 @@ -604,6 +699,7 @@ enum EVREventType 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_ShowUI = 528, // data is showUi VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, @@ -616,11 +712,12 @@ enum EVREventType VREvent_QuitAcknowledged = 703, // data is process VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down - VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneDataHasChanged = 800, // Sent when the process needs to call VRChaperone()->ReloadInfo() VREvent_ChaperoneUniverseHasChanged = 801, VREvent_ChaperoneTempDataHasChanged = 802, VREvent_ChaperoneSettingsHaveChanged = 803, VREvent_SeatedZeroPoseReset = 804, + VREvent_ChaperoneFlushCache = 805, // Sent when the process needs to reload any cached data it retrieved from VRChaperone() VREvent_AudioSettingsHaveChanged = 820, @@ -640,6 +737,8 @@ enum EVREventType VREvent_PerfSectionSettingChanged = 863, VREvent_DashboardSectionSettingChanged = 864, VREvent_WebInterfaceSectionSettingChanged = 865, + VREvent_TrackersSectionSettingChanged = 866, + VREvent_LastKnownSectionSettingChanged = 867, VREvent_StatusUpdate = 900, @@ -682,6 +781,17 @@ enum EVREventType VREvent_MessageOverlayCloseRequested = 1651, VREvent_Input_HapticVibration = 1700, // data is hapticVibration + VREvent_Input_BindingLoadFailed = 1701, // data is inputBinding + VREvent_Input_BindingLoadSuccessful = 1702, // data is inputBinding + VREvent_Input_ActionManifestReloaded = 1703, // no data + VREvent_Input_ActionManifestLoadFailed = 1704, // data is actionManifest + VREvent_Input_ProgressUpdate = 1705, // data is progressUpdate + VREvent_Input_TrackerActivated = 1706, + + VREvent_SpatialAnchors_PoseUpdated = 1800, // data is spatialAnchor. broadcast + VREvent_SpatialAnchors_DescriptorUpdated = 1801, // data is spatialAnchor. broadcast + VREvent_SpatialAnchors_RequestPoseUpdate = 1802, // data is spatialAnchor. sent to specific driver + VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, // data is spatialAnchor. sent to specific driver // Vendors are free to expose private events in this reserved region VREvent_VendorSpecific_Reserved_Start = 10000, @@ -730,6 +840,10 @@ enum EVRButtonId k_EButton_Dashboard_Back = k_EButton_Grip, + k_EButton_Knuckles_A = k_EButton_Grip, + k_EButton_Knuckles_B = k_EButton_ApplicationMenu, + k_EButton_Knuckles_JoyStick = k_EButton_Axis3, + k_EButton_Max = 64 }; @@ -806,6 +920,7 @@ struct VREvent_Process_t struct VREvent_Overlay_t { uint64_t overlayHandle; + uint64_t devicePath; }; @@ -840,6 +955,8 @@ struct VREvent_Reserved_t uint64_t reserved1; uint64_t reserved2; uint64_t reserved3; + uint64_t reserved4; + uint64_t reserved5; }; struct VREvent_PerformanceTest_t @@ -908,8 +1025,54 @@ struct VREvent_HapticVibration_t float fAmplitude; }; +struct VREvent_WebConsole_t +{ + WebConsoleHandle_t webConsoleHandle; +}; + +struct VREvent_InputBindingLoad_t +{ + vr::PropertyContainerHandle_t ulAppContainer; + uint64_t pathMessage; + uint64_t pathUrl; + uint64_t pathControllerType; +}; + +struct VREvent_InputActionManifestLoad_t +{ + uint64_t pathAppKey; + uint64_t pathMessage; + uint64_t pathMessageParam; + uint64_t pathManifestPath; +}; + +struct VREvent_SpatialAnchor_t +{ + SpatialAnchorHandle_t unHandle; +}; + +struct VREvent_ProgressUpdate_t +{ + uint64_t ulApplicationPropertyContainer; + uint64_t pathDevice; + uint64_t pathInputSource; + uint64_t pathProgressAction; + uint64_t pathIcon; + float fProgress; +}; + +enum EShowUIType +{ + ShowUI_ControllerBinding = 0, + ShowUI_ManageTrackers = 1, + ShowUI_QuickStart = 2, +}; + +struct VREvent_ShowUI_t +{ + EShowUIType eType; +}; -/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ typedef union { VREvent_Reserved_t reserved; @@ -934,6 +1097,13 @@ typedef union VREvent_Property_t property; VREvent_DualAnalog_t dualAnalog; VREvent_HapticVibration_t hapticVibration; + VREvent_WebConsole_t webConsole; + VREvent_InputBindingLoad_t inputBinding; + VREvent_InputActionManifestLoad_t actionManifest; + VREvent_SpatialAnchor_t spatialAnchor; + VREvent_ProgressUpdate_t progressUpdate; + VREvent_ShowUI_t showUi; + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ } VREvent_Data_t; @@ -969,8 +1139,33 @@ enum EVRInputError VRInputError_IPCError = 7, VRInputError_NoActiveActionSet = 8, VRInputError_InvalidDevice = 9, + VRInputError_InvalidSkeleton = 10, + VRInputError_InvalidBoneCount = 11, + VRInputError_InvalidCompressedData = 12, + VRInputError_NoData = 13, + VRInputError_BufferTooSmall = 14, + VRInputError_MismatchedActionManifest = 15, + VRInputError_MissingSkeletonData = 16, + VRInputError_InvalidBoneIndex = 17, }; +enum EVRSpatialAnchorError +{ + VRSpatialAnchorError_Success = 0, + VRSpatialAnchorError_Internal = 1, + VRSpatialAnchorError_UnknownHandle = 2, + VRSpatialAnchorError_ArrayTooSmall = 3, + VRSpatialAnchorError_InvalidDescriptorChar = 4, + VRSpatialAnchorError_NotYetAvailable = 5, + VRSpatialAnchorError_NotAvailableInThisUniverse = 6, + VRSpatialAnchorError_PermanentlyUnavailable = 7, + VRSpatialAnchorError_WrongDriver = 8, + VRSpatialAnchorError_DescriptorTooLong = 9, + VRSpatialAnchorError_Unknown = 10, + VRSpatialAnchorError_NoRoomCalibration = 11, + VRSpatialAnchorError_InvalidArgument = 12, + VRSpatialAnchorError_UnknownDriver = 13, +}; /** The mesh to draw into the stencil (or depth) buffer to perform * early stencil (or depth) kills of pixels that will never appear on the HMD. @@ -1127,7 +1322,8 @@ enum EVRApplicationType // interfaces (like IVRSettings and IVRApplications) but not hardware. VRApplication_VRMonitor = 5, // Reserved for vrmonitor VRApplication_SteamWatchdog = 6,// Reserved for Steam - VRApplication_Bootstrapper = 7, // Start up SteamVR + VRApplication_Bootstrapper = 7, // reserved for vrstartup + VRApplication_WebHelper = 8, // reserved for vrwebhelper VRApplication_Max }; @@ -1153,6 +1349,53 @@ enum EVRNotificationError }; +enum EVRSkeletalMotionRange +{ + // The range of motion of the skeleton takes into account any physical limits imposed by + // the controller itself. This will tend to be the most accurate pose compared to the user's + // actual hand pose, but might not allow a closed fist for example + VRSkeletalMotionRange_WithController = 0, + + // Retarget the range of motion provided by the input device to make the hand appear to move + // as if it was not holding a controller. eg: map "hand grasping controller" to "closed fist" + VRSkeletalMotionRange_WithoutController = 1, +}; + +enum EVRSkeletalTrackingLevel +{ + // body part location can’t be directly determined by the device. Any skeletal pose provided by + // the device is estimated by assuming the position required to active buttons, triggers, joysticks, + // or other input sensors. + // E.g. Vive Controller, Gamepad + VRSkeletalTracking_Estimated = 0, + + // body part location can be measured directly but with fewer degrees of freedom than the actual body + // part. Certain body part positions may be unmeasured by the device and estimated from other input data. + // E.g. Knuckles, gloves that only measure finger curl + VRSkeletalTracking_Partial, + + // Body part location can be measured directly throughout the entire range of motion of the body part. + // E.g. Mocap suit for the full body, gloves that measure rotation of each finger segment + VRSkeletalTracking_Full, + + VRSkeletalTrackingLevel_Count, + VRSkeletalTrackingLevel_Max = VRSkeletalTrackingLevel_Count - 1 +}; + + + +/** Holds the transform for a single bone */ +struct VRBoneTransform_t +{ + HmdVector4_t position; + HmdQuaternionf_t orientation; +}; + +/** Type used for referring to bones by their index */ +typedef int32_t BoneIndex_t; +const BoneIndex_t k_unInvalidBoneIndex = -1; + + /** error codes returned by Vr_Init */ // Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp @@ -1203,6 +1446,7 @@ enum EVRInitError VRInitError_Init_FirmwareRecoveryBusy = 139, VRInitError_Init_USBServiceBusy = 140, VRInitError_Init_VRWebHelperStartupFailed = 141, + VRInitError_Init_TrackerManagerInitFailed = 142, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1292,6 +1536,14 @@ enum EVRTrackedCameraError VRTrackedCameraError_InvalidFrameBufferSize = 115, }; +enum EVRTrackedCameraFrameLayout +{ + EVRTrackedCameraFrameLayout_Mono = 0x0001, + EVRTrackedCameraFrameLayout_Stereo = 0x0002, + EVRTrackedCameraFrameLayout_VerticalLayout = 0x0010, // Stereo frames are Top/Bottom (left/right) + EVRTrackedCameraFrameLayout_HorizontalLayout = 0x0020, // Stereo frames are Left/Right +}; + enum EVRTrackedCameraFrameType { VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. @@ -1300,6 +1552,16 @@ enum EVRTrackedCameraFrameType MAX_CAMERA_FRAME_TYPES }; +enum EVRDistortionFunctionType +{ + VRDistortionFunctionType_None, + VRDistortionFunctionType_FTheta, + VRDistortionFucntionType_Extended_FTheta, + MAX_DISTORTION_FUNCTION_TYPES, +}; + +static const uint32_t k_unMaxDistortionFunctionParameters = 8; + typedef uint64_t TrackedCameraHandle_t; #define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) @@ -1314,6 +1576,8 @@ struct CameraVideoStreamFrameHeader_t uint32_t nFrameSequence; TrackedDevicePose_t standingTrackedDevicePose; + + uint64_t ulFrameExposureTime; // mid-point of the exposure of the image in host system ticks }; // Screenshot types @@ -1331,6 +1595,38 @@ struct DriverDirectMode_FrameTiming uint32_t m_nReprojectionFlags; }; +enum EVSync +{ + VSync_None, + VSync_WaitRender, // block following render work until vsync + VSync_NoWaitRender, // do not block following render work (allow to get started early) +}; + +enum EVRMuraCorrectionMode +{ + EVRMuraCorrectionMode_Default = 0, + EVRMuraCorrectionMode_NoCorrection +}; + +/** raw IMU data provided by IVRIOBuffer from paths to tracked devices with IMUs */ +enum Imu_OffScaleFlags +{ + OffScale_AccelX = 0x01, + OffScale_AccelY = 0x02, + OffScale_AccelZ = 0x04, + OffScale_GyroX = 0x08, + OffScale_GyroY = 0x10, + OffScale_GyroZ = 0x20, +}; + +struct ImuSample_t +{ + double fSampleTime; + HmdVector3d_t vAccel; + HmdVector3d_t vGyro; + uint32_t unOffScaleFlags; +}; + #pragma pack( pop ) // figure out how to import from the VR API dll @@ -1401,6 +1697,8 @@ enum ECameraVideoStreamFormat CVS_FORMAT_NV12 = 2, // 12 bits per pixel CVS_FORMAT_RGB24 = 3, // 24 bits per pixel CVS_FORMAT_NV12_2 = 4, // 12 bits per pixel, 2x height + CVS_FORMAT_YUYV16 = 5, // 16 bits per pixel + CVS_FORMAT_BAYER16BG = 6, // 16 bits per pixel, 10-bit BG-format Bayer, see https://docs.opencv.org/3.1.0/de/d25/imgproc_color_conversions.html CVS_MAX_FORMATS }; @@ -1422,12 +1720,23 @@ enum ECameraCompatibilityMode MAX_CAMERA_COMPAT_MODES }; +enum ETrackedCameraRoomViewMode +{ + TRACKED_CAMERA_ROOMVIEW_MODE_DEFAULT = 0, + TRACKED_CAMERA_ROOMVIEW_MODE_EDGE_A, + TRACKED_CAMERA_ROOMVIEW_MODE_EDGE_B, + TRACKED_CAMERA_ROOMVIEW_MODE_VIDEO_TRANSLUSCENT, + TRACKED_CAMERA_ROOMVIEW_MODE_VIDEO_OPAQUE, + TRACKED_CAMERA_ROOMVIEW_MODE_COUNT, +}; + #ifdef _MSC_VER #define VR_CAMERA_DECL_ALIGN( x ) __declspec( align( x ) ) #else #define VR_CAMERA_DECL_ALIGN( x ) // #endif +#define MAX_CAMERAS 4 #define MAX_CAMERA_FRAME_SHARED_HANDLES 4 VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t @@ -1476,6 +1785,8 @@ VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t #endif // _VRTRACKEDCAMERATYPES_H // ivrsettings.h +#include + namespace vr { enum EVRSettingsError @@ -1518,6 +1829,88 @@ namespace vr //----------------------------------------------------------------------------- static const char * const IVRSettings_Version = "IVRSettings_002"; + class CVRSettingHelper + { + IVRSettings *m_pSettings; + public: + CVRSettingHelper( IVRSettings *pSettings ) + { + m_pSettings = pSettings; + } + + const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) + { + return m_pSettings->GetSettingsErrorNameFromEnum( eError ); + } + + // Returns true if file sync occurred (force or settings dirty) + bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->Sync( bForce, peError ); + } + + void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetBool( pchSection, pchSettingsKey, bValue, peError ); + } + + void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetInt32( pchSection, pchSettingsKey, nValue, peError ); + } + void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetFloat( pchSection, pchSettingsKey, flValue, peError ); + } + void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetString( pchSection, pchSettingsKey, pchValue, peError ); + } + void SetString( const std::string & sSection, const std::string & sSettingsKey, const std::string & sValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetString( sSection.c_str(), sSettingsKey.c_str(), sValue.c_str(), peError ); + } + + bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetBool( pchSection, pchSettingsKey, peError ); + } + int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetInt32( pchSection, pchSettingsKey, peError ); + } + float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetFloat( pchSection, pchSettingsKey, peError ); + } + void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) + { + m_pSettings->GetString( pchSection, pchSettingsKey, pchValue, unValueLen, peError ); + } + std::string GetString( const std::string & sSection, const std::string & sSettingsKey, EVRSettingsError *peError = nullptr ) + { + char buf[4096]; + vr::EVRSettingsError eError; + m_pSettings->GetString( sSection.c_str(), sSettingsKey.c_str(), buf, sizeof( buf ), &eError ); + if ( peError ) + *peError = eError; + if ( eError == vr::VRSettingsError_None ) + return buf; + else + return ""; + } + + void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) + { + m_pSettings->RemoveSection( pchSection, peError ); + } + void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + m_pSettings->RemoveKeyInSection( pchSection, pchSettingsKey, peError ); + } + }; + + //----------------------------------------------------------------------------- // steamvr keys static const char * const k_pch_SteamVR_Section = "steamvr"; @@ -1539,21 +1932,19 @@ namespace vr static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; - static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; - static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; - static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; - static const char * const k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection"; - static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection"; - static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; + static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; + static const char * const k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; + static const char * const k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; - static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized"; static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; @@ -1563,11 +1954,27 @@ namespace vr static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; static const char * const k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; + static const char * const k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleManualOverride"; static const char * const k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; 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"; + static const char * const k_pch_SteamVR_LegacyInputRebinding = "legacyInputRebinding"; + static const char * const k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; + static const char * const k_pch_SteamVR_InputBindingUIBlock = "inputBindingUI"; + static const char * const k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; + static const char * const k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; + static const char * const k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; + static const char * const k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; + + //----------------------------------------------------------------------------- + // direct mode keys + static const char * const k_pch_DirectMode_Section = "direct_mode"; + static const char * const k_pch_DirectMode_Enable_Bool = "enable"; + static const char * const k_pch_DirectMode_Count_Int32 = "count"; + static const char * const k_pch_DirectMode_EdidVid_Int32 = "edidVid"; + static const char * const k_pch_DirectMode_EdidPid_Int32 = "edidPid"; //----------------------------------------------------------------------------- // lighthouse keys @@ -1580,6 +1987,8 @@ namespace vr 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"; + static const char * const k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; + static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; //----------------------------------------------------------------------------- // null keys @@ -1600,6 +2009,7 @@ namespace vr static const char * const k_pch_UserInterface_Section = "userinterface"; static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized"; static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; @@ -1622,9 +2032,7 @@ namespace vr //----------------------------------------------------------------------------- // perf keys static const char * const k_pch_Perf_Section = "perfcheck"; - static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; - static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; - static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + static const char * const k_pch_Perf_PerfGraphInHMD_Bool = "perfGraphInHMD"; static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; static const char * const k_pch_Perf_TestData_Float = "perfTestData"; @@ -1655,6 +2063,7 @@ namespace vr static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + static const char * const k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode"; //----------------------------------------------------------------------------- // audio keys @@ -1682,6 +2091,8 @@ namespace vr 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"; + static const char * const k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools"; + static const char * const k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard"; //----------------------------------------------------------------------------- // model skin keys @@ -1694,8 +2105,41 @@ namespace vr //----------------------------------------------------------------------------- // web interface keys static const char* const k_pch_WebInterface_Section = "WebInterface"; + static const char* const k_pch_WebInterface_WebEnable_Bool = "WebEnable"; static const char* const k_pch_WebInterface_WebPort_String = "WebPort"; + //----------------------------------------------------------------------------- + // vrwebhelper keys + static const char* const k_pch_VRWebHelper_Section = "VRWebHelper"; + static const char* const k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled"; + static const char* const k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort"; + + //----------------------------------------------------------------------------- + // tracking overrides - keys are device paths, values are the device paths their + // tracking/pose information overrides + static const char* const k_pch_TrackingOverride_Section = "TrackingOverrides"; + + //----------------------------------------------------------------------------- + // per-app keys - the section name for these is the app key itself. Some of these are prefixed by the controller type + static const char* const k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; + static const char* const k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL"; + static const char* const k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; + static const char* const k_pch_App_ActionManifestURL_String = "ActionManifestURL"; + + //----------------------------------------------------------------------------- + // configuration for trackers + static const char * const k_pch_Trackers_Section = "trackers"; + + //----------------------------------------------------------------------------- + // configuration for desktop UI windows + static const char * const k_pch_DesktopUI_Section = "DesktopUI"; + + //----------------------------------------------------------------------------- + // Last known keys for righting recovery + static const char * const k_pch_LastKnown_Section = "LastKnown"; + static const char* const k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; + static const char* const k_pch_LastKnown_HMDModel_String = "HMDModel"; + } // namespace vr // iservertrackeddevicedriver.h @@ -1964,17 +2408,17 @@ namespace vr virtual bool SetAutoExposure( bool bEnable ) = 0; virtual bool PauseVideoStream() = 0; virtual bool ResumeVideoStream() = 0; - virtual bool GetCameraDistortion( float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0; - virtual bool GetCameraProjection( vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + virtual bool GetCameraDistortion( uint32_t nCameraIndex, float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0; + virtual bool GetCameraProjection( uint32_t nCameraIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; virtual bool SetFrameRate( int nISPFrameRate, int nSensorFrameRate ) = 0; virtual bool SetCameraVideoSinkCallback( vr::ICameraVideoSinkCallback *pCameraVideoSinkCallback ) = 0; virtual bool GetCameraCompatibilityMode( vr::ECameraCompatibilityMode *pCameraCompatibilityMode ) = 0; virtual bool SetCameraCompatibilityMode( vr::ECameraCompatibilityMode nCameraCompatibilityMode ) = 0; virtual bool GetCameraFrameBounds( vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pLeft, uint32_t *pTop, uint32_t *pWidth, uint32_t *pHeight ) = 0; - virtual bool GetCameraIntrinsics( vr::EVRTrackedCameraFrameType eFrameType, HmdVector2_t *pFocalLength, HmdVector2_t *pCenter ) = 0; + virtual bool GetCameraIntrinsics( uint32_t nCameraIndex, vr::EVRTrackedCameraFrameType eFrameType, HmdVector2_t *pFocalLength, HmdVector2_t *pCenter, vr::EVRDistortionFunctionType *peDistortionType, double rCoefficients[ k_unMaxDistortionFunctionParameters ] ) = 0; }; - static const char *IVRCameraComponent_Version = "IVRCameraComponent_002"; + static const char *IVRCameraComponent_Version = "IVRCameraComponent_003"; } // itrackeddevicedriverprovider.h namespace vr @@ -2059,6 +2503,29 @@ public: static const char *IVRWatchdogProvider_Version = "IVRWatchdogProvider_001"; + + + +/** This is an optional interface drivers may implement. It will be loaded in vrcompositor.exe */ +class IVRCompositorPluginProvider +{ +public: + /** initializes the driver when used to load compositor plugins */ + virtual EVRInitError Init( IVRDriverContext *pDriverContext ) = 0; + + /** cleans up the driver right before it is unloaded */ + virtual void Cleanup() = 0; + + /** Returns the versions of interfaces used by this driver */ + virtual const char * const *GetInterfaceVersions() = 0; + + /** Requests a component interface of the driver for specific functionality. The driver should return NULL + * if the requested interface or version is not supported. */ + virtual void *GetComponent( const char *pchComponentNameAndVersion ) = 0; +}; + +static const char *IVRCompositorPluginProvider_Version = "IVRCompositorPluginProvider_001"; + } // ivrproperties.h #include @@ -2112,7 +2579,6 @@ public: /** Returns a container handle given a tracked device index */ virtual PropertyContainerHandle_t TrackedDeviceToPropertyContainer( TrackedDeviceIndex_t nDevice ) = 0; - }; static const char * const IVRProperties_Version = "IVRProperties_001"; @@ -2173,6 +2639,8 @@ public: template< typename T> ETrackedPropertyError SetPropertyVector( PropertyContainerHandle_t ulContainer, ETrackedDeviceProperty prop, PropertyTypeTag_t unExpectedTag, std::vector *vecProperties ); + /** Returns true if the specified property is set on the specified container */ + bool IsPropertySet( PropertyContainerHandle_t ulContainer, ETrackedDeviceProperty prop, ETrackedPropertyError *peError = nullptr ); private: template T GetPropertyHelper( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError, T bDefault, PropertyTypeTag_t unTypeTag ); @@ -2437,8 +2905,18 @@ ETrackedPropertyError CVRPropertyHelpers::GetPropertyVector( PropertyContainerHa return err; } +inline bool CVRPropertyHelpers::IsPropertySet( PropertyContainerHandle_t ulContainer, ETrackedDeviceProperty prop, ETrackedPropertyError *peError ) +{ + ETrackedPropertyError error; + GetProperty( ulContainer, prop, nullptr, 0, nullptr, &error ); + if ( peError ) + *peError = error; + return error == TrackedProp_Success || error == TrackedProp_BufferTooSmall; } +} + + // ivrdriverinput.h namespace vr @@ -2479,9 +2957,15 @@ namespace vr /** Creates a haptic component for the device */ virtual EVRInputError CreateHapticComponent( PropertyContainerHandle_t ulContainer, const char *pchName, VRInputComponentHandle_t *pHandle ) = 0; + /** Creates a skeleton component. */ + virtual EVRInputError CreateSkeletonComponent( PropertyContainerHandle_t ulContainer, const char *pchName, const char *pchSkeletonPath, const char *pchBasePosePath, EVRSkeletalTrackingLevel eSkeletalTrackingLevel, const VRBoneTransform_t *pGripLimitTransforms, uint32_t unGripLimitTransformCount, VRInputComponentHandle_t *pHandle ) = 0; + + /** Updates a skeleton component. */ + virtual EVRInputError UpdateSkeletonComponent( VRInputComponentHandle_t ulComponent, EVRSkeletalMotionRange eMotionRange, const VRBoneTransform_t *pTransforms, uint32_t unTransformCount ) = 0; + }; - static const char * const IVRDriverInput_Version = "IVRDriverInput_001"; + static const char * const IVRDriverInput_Version = "IVRDriverInput_003"; } // namespace vr @@ -2551,6 +3035,22 @@ static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_005"; } +// ivrcompositordriverhost.h +namespace vr +{ + +class IVRCompositorDriverHost +{ +public: + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; +}; + +static const char *IVRCompositorDriverHost_Version = "IVRCompositorDriverHost_001"; + +} + // ivrhiddenarea.h namespace vr { @@ -2628,6 +3128,14 @@ static const char *IVRWatchdogHost_Version = "IVRWatchdogHost_001"; // ivrvirtualdisplay.h namespace vr { + struct PresentInfo_t + { + SharedTextureHandle_t backbufferTextureHandle; + EVSync vsync; + uint64_t nFrameId; + double flVSyncTimeInSeconds; + }; + // ---------------------------------------------------------------------------------------------- // Purpose: This component is used for drivers that implement a virtual display (e.g. wireless). // ---------------------------------------------------------------------------------------------- @@ -2636,7 +3144,7 @@ namespace vr public: /** Submits final backbuffer for display. */ - virtual void Present( vr::SharedTextureHandle_t backbufferTextureHandle ) = 0; + virtual void Present( const PresentInfo_t *pPresentInfo, uint32_t unPresentInfoSize ) = 0; /** Block until the last presented buffer start scanning out. */ virtual void WaitForPresent() = 0; @@ -2645,10 +3153,7 @@ namespace vr virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; }; - static const char *IVRVirtualDisplay_Version = "IVRVirtualDisplay_001"; - - /** Returns the current IVRVirtualDisplay pointer or NULL the interface could not be found. */ - VR_INTERFACE vr::IVRVirtualDisplay *VR_CALLTYPE VRVirtualDisplay(); + static const char *IVRVirtualDisplay_Version = "IVRVirtualDisplay_002"; } @@ -2678,6 +3183,56 @@ static const char * const IVRResources_Version = "IVRResources_001"; } +// ivriobuffer.h +namespace vr +{ + +typedef uint64_t IOBufferHandle_t; +static const uint64_t k_ulInvalidIOBufferHandle = 0; + + enum EIOBufferError + { + IOBuffer_Success = 0, + IOBuffer_OperationFailed = 100, + IOBuffer_InvalidHandle = 101, + IOBuffer_InvalidArgument = 102, + IOBuffer_PathExists = 103, + IOBuffer_PathDoesNotExist = 104, + IOBuffer_Permission = 105, + }; + + enum EIOBufferMode + { + IOBufferMode_Read = 0x0001, + IOBufferMode_Write = 0x0002, + IOBufferMode_Create = 0x0200, + }; + + // ---------------------------------------------------------------------------------------------- + // Purpose: + // ---------------------------------------------------------------------------------------------- + class IVRIOBuffer + { + public: + /** opens an existing or creates a new IOBuffer of unSize bytes */ + virtual vr::EIOBufferError Open( const char *pchPath, vr::EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, vr::IOBufferHandle_t *pulBuffer ) = 0; + + /** closes a previously opened or created buffer */ + virtual vr::EIOBufferError Close( vr::IOBufferHandle_t ulBuffer ) = 0; + + /** reads up to unBytes from buffer into *pDst, returning number of bytes read in *punRead */ + virtual vr::EIOBufferError Read( vr::IOBufferHandle_t ulBuffer, void *pDst, uint32_t unBytes, uint32_t *punRead ) = 0; + + /** writes unBytes of data from *pSrc into a buffer. */ + virtual vr::EIOBufferError Write( vr::IOBufferHandle_t ulBuffer, void *pSrc, uint32_t unBytes ) = 0; + + /** retrieves the property container of an buffer. */ + virtual vr::PropertyContainerHandle_t PropertyContainer( vr::IOBufferHandle_t ulBuffer ) = 0; + }; + + static const char *IVRIOBuffer_Version = "IVRIOBuffer_001"; +} + // ivrdrivermanager.h namespace vr { @@ -2699,10 +3254,103 @@ static const char * const IVRDriverManager_Version = "IVRDriverManager_001"; +// ivrdriverspatialanchors.h +namespace vr +{ + struct SpatialAnchorDriverPose_t + { + /** This position is in the same "world" space (+Y up) as provided by DriverPose_t. */ + vr::HmdQuaternion_t qWorldRotation; + vr::HmdVector3d_t vWorldTranslation; + + /** The pose will automatically start returning VRSpatialAnchorError_NotAvailableInThisUniverse + * if this is nonzero and does not match the current universe ID. */ + uint64_t ulRequiredUniverseId; + + /** When this time expires, SteamVR will start generating + * VREvent_SpatialAnchors_RequestPoseUpdate when the pose is read by an application + * to let the driver know it is still worth updating. + * You can use this facility in several ways: + * 1. Set to -1 to never receive an update request for this pose. The driver + * may still update poses at any time. + * 2. Set to 0 to always receive an update request *after* each time the pose + * is read. The rate of requests could be very high if the application gets + * the pose at framerate. + * 3. If the driver knows there is no reason to update the pose for some amount of + * time, it can set that time here and receive the update request reminder later. + * 4. If the driver plans to automatically update this pose for some amount of time + * (as it gets better information about the virtual location of this anchor) it can + * set that duration here to indicate that no "update requested" reminders are needed. + * When that automatic update period expires, any future interest in the pose will + * be indicated by a pose update request. + * The driver may always update the pose, including during the valid duration. */ + double fValidDuration; // seconds + }; + + class IVRDriverSpatialAnchors + { + public: + + /* NOTE: You must declare support for spatial anchors in your driver manifest. Add + * "spatialAnchorsSupport": true to your manifest. Without that setting, SteamVR + * will short-circuit anchor requests from applications and provide a generic descriptor + * that does not have any of the advantages of true spatial anchors. */ + + /* The driver should monitor for events VREvent_SpatialAnchors_RequestPoseUpdate (for new + * descriptors from applications that need UpdateSpatialAnchorPose()) and for + * VREvent_SpatialAnchors_RequestDescriptorUpdate (for new poses that need UpdateSpatialAnchorDescriptor()). + * For automatic pose updates over time, the driver should keep track of the handles it + * has seen and provide updates when conditions change. If the driver uses fValidDuration, + * it may wait for VREvent_SpatialAnchors_RequestPoseUpdate instead of keeping track itself. */ + + /** Update a pose for a spatial anchor. Should be called when an event notifies the driver that a + * new descriptor has been registered by an application. May be called for any anchor whenever the + * driver has better information about the best virtual coordinate to represent the anchor. Should + * be called on all active handles whenever driver state changes in a way that changes how physical + * world locations map to virtual coordinates (e.g. anything that would cause a universe ID change). + * This fires an event when it is called for the first time (to alert whoever submitted the descriptor). */ + virtual EVRSpatialAnchorError UpdateSpatialAnchorPose( SpatialAnchorHandle_t unHandle, const SpatialAnchorDriverPose_t *pPose ) = 0; + + /** Invalidate any pose associated with the handle and cause future calls to GetSpatialAnchorPose (on + * both the client and driver side) to return the specified error. eError must be one of + * VRSpatialAnchorError_NotYetAvailable, VRSpatialAnchorError_NotAvailableInThisUniverse, or + * VRSpatialAnchorError_PermanentlyUnavailable */ + virtual EVRSpatialAnchorError SetSpatialAnchorPoseError( SpatialAnchorHandle_t unHandle, EVRSpatialAnchorError eError, double fValidDuration ) = 0; + + /** Update the descriptor for a spatial anchor. Should be called when an event notifies the driver + * that a new pose has been registered by an application. May be called for any anchor whenever the + * driver has better or additional information it wants to include in the anchor descriptor. Note, + * however, that the application may never fetch the updated anchor descriptor and may request the + * original descriptor in a future session having ignored the update. + * The supplied descriptor should be only the driver's opaque internal data, not the decorated form that + * is used by clients (wrapped by runtime metadata). The descriptor must not contain non-ASCII characters or + * the two special characters ~ or " + * This fires an event every time it is called. */ + virtual EVRSpatialAnchorError UpdateSpatialAnchorDescriptor( SpatialAnchorHandle_t unHandle, const char *pchDescriptor ) = 0; + + /** Get the pose for a given handle. */ + virtual EVRSpatialAnchorError GetSpatialAnchorPose( SpatialAnchorHandle_t unHandle, SpatialAnchorDriverPose_t *pDriverPoseOut ) = 0; + + /** Get the descriptor for a given handle. This will be VRSpatialAnchorError_NotYetAvailable for handles + * where the driver has not yet built a descriptor. It will be the application-supplied descriptor for previously + * saved anchors that the application is requesting poses for. If the driver has called UpdateSpatialAnchorDescriptor() + * already in this session, it will be the descriptor provided by the driver. + * If bDecorated, returns the descriptor wrapped with runtime metadata suitable for a client to save. Else returns only + * the driver's opaque internal data. + */ + virtual EVRSpatialAnchorError GetSpatialAnchorDescriptor( SpatialAnchorHandle_t unHandle, VR_OUT_STRING() char *pchDescriptorOut, uint32_t *punDescriptorBufferLenInOut, bool bDecorated ) = 0; + + }; + + static const char * const IVRDriverSpatialAnchors_Version = "IVRDriverSpatialAnchors_001"; + +} // namespace vr + namespace vr { +#if !defined( OPENVR_INTERFACE_INTERNAL ) static const char * const k_InterfaceVersions[] = { IVRSettings_Version, @@ -2715,6 +3363,7 @@ namespace vr IVRVirtualDisplay_Version, IVRDriverManager_Version, IVRResources_Version, + IVRCompositorPluginProvider_Version, nullptr }; @@ -2732,6 +3381,7 @@ namespace vr EVRInitError InitServer(); EVRInitError InitWatchdog(); + EVRInitError InitCompositor(); IVRSettings *VRSettings() { @@ -2787,6 +3437,16 @@ namespace vr return m_pVRWatchdogHost; } + IVRCompositorDriverHost *VRCompositorDriverHost() + { + if ( m_pVRCompositorDriverHost == nullptr ) + { + EVRInitError eError; + m_pVRCompositorDriverHost = ( IVRCompositorDriverHost * )VRDriverContext()->GetGenericInterface( IVRCompositorDriverHost_Version, &eError ); + } + return m_pVRCompositorDriverHost; + } + IVRDriverLog *VRDriverLog() { if ( m_pVRDriverLog == nullptr ) @@ -2832,6 +3492,26 @@ namespace vr return m_pVRDriverInput; } + IVRIOBuffer *VRIOBuffer() + { + if ( !m_pVRIOBuffer ) + { + EVRInitError eError; + m_pVRIOBuffer = (IVRIOBuffer *)VRDriverContext()->GetGenericInterface( IVRIOBuffer_Version, &eError ); + } + return m_pVRIOBuffer; + } + + IVRDriverSpatialAnchors *VRDriverSpatialAnchors() + { + if ( !m_pVRDriverSpatialAnchors ) + { + EVRInitError eError; + m_pVRDriverSpatialAnchors = (IVRDriverSpatialAnchors *)VRDriverContext()->GetGenericInterface( IVRDriverSpatialAnchors_Version, &eError ); + } + return m_pVRDriverSpatialAnchors; + } + private: CVRPropertyHelpers m_propertyHelpers; CVRHiddenAreaHelpers m_hiddenAreaHelpers; @@ -2840,10 +3520,13 @@ namespace vr IVRProperties *m_pVRProperties; IVRServerDriverHost *m_pVRServerDriverHost; IVRWatchdogHost *m_pVRWatchdogHost; + IVRCompositorDriverHost *m_pVRCompositorDriverHost; IVRDriverLog *m_pVRDriverLog; IVRDriverManager *m_pVRDriverManager; IVRResources *m_pVRResources; IVRDriverInput *m_pVRDriverInput; + IVRIOBuffer *m_pVRIOBuffer; + IVRDriverSpatialAnchors *m_pVRDriverSpatialAnchors; }; inline COpenVRDriverContext &OpenVRInternal_ModuleServerDriverContext() @@ -2859,21 +3542,27 @@ namespace vr inline IVRDriverLog *VR_CALLTYPE VRDriverLog() { return OpenVRInternal_ModuleServerDriverContext().VRDriverLog(); } inline IVRServerDriverHost *VR_CALLTYPE VRServerDriverHost() { return OpenVRInternal_ModuleServerDriverContext().VRServerDriverHost(); } inline IVRWatchdogHost *VR_CALLTYPE VRWatchdogHost() { return OpenVRInternal_ModuleServerDriverContext().VRWatchdogHost(); } + inline IVRCompositorDriverHost *VR_CALLTYPE VRCompositorDriverHost() { return OpenVRInternal_ModuleServerDriverContext().VRCompositorDriverHost(); } inline DriverHandle_t VR_CALLTYPE VRDriverHandle() { return OpenVRInternal_ModuleServerDriverContext().VRDriverHandle(); } inline IVRDriverManager *VR_CALLTYPE VRDriverManager() { return OpenVRInternal_ModuleServerDriverContext().VRDriverManager(); } inline IVRResources *VR_CALLTYPE VRResources() { return OpenVRInternal_ModuleServerDriverContext().VRResources(); } inline IVRDriverInput *VR_CALLTYPE VRDriverInput() { return OpenVRInternal_ModuleServerDriverContext().VRDriverInput(); } + inline IVRIOBuffer *VR_CALLTYPE VRIOBuffer() { return OpenVRInternal_ModuleServerDriverContext().VRIOBuffer(); } + inline IVRDriverSpatialAnchors *VR_CALLTYPE VRDriverSpatialAnchors() { return OpenVRInternal_ModuleServerDriverContext().VRDriverSpatialAnchors(); } inline void COpenVRDriverContext::Clear() { m_pVRSettings = nullptr; m_pVRProperties = nullptr; m_pVRServerDriverHost = nullptr; - m_pVRDriverLog = nullptr; m_pVRWatchdogHost = nullptr; + m_pVRCompositorDriverHost = nullptr; + m_pVRDriverLog = nullptr; m_pVRDriverManager = nullptr; m_pVRResources = nullptr; m_pVRDriverInput = nullptr; + m_pVRIOBuffer = nullptr; + m_pVRDriverSpatialAnchors = nullptr; } inline EVRInitError COpenVRDriverContext::InitServer() @@ -2899,6 +3588,19 @@ namespace vr return VRInitError_None; } + inline EVRInitError COpenVRDriverContext::InitCompositor() + { + Clear(); + if ( !VRCompositorDriverHost() + || !VRSettings() + || !VRProperties() + || !VRDriverLog() + || !VRDriverManager() + || !VRResources() ) + return VRInitError_Init_InterfaceNotFound; + return VRInitError_None; + } + inline EVRInitError InitServerDriverContext( IVRDriverContext *pContext ) { VRDriverContext() = pContext; @@ -2911,6 +3613,12 @@ namespace vr return OpenVRInternal_ModuleServerDriverContext().InitWatchdog(); } + inline EVRInitError InitCompositorDriverContext( IVRDriverContext *pContext ) + { + VRDriverContext() = pContext; + return OpenVRInternal_ModuleServerDriverContext().InitCompositor(); + } + inline void CleanupDriverContext() { VRDriverContext() = nullptr; @@ -2936,6 +3644,20 @@ namespace vr #define VR_CLEANUP_WATCHDOG_DRIVER_CONTEXT() \ vr::CleanupDriverContext(); + +#define VR_INIT_COMPOSITOR_DRIVER_CONTEXT( pContext ) \ + { \ + vr::EVRInitError eError = vr::InitCompositorDriverContext( pContext ); \ + if( eError != vr::VRInitError_None ) \ + return eError; \ + } + +#define VR_CLEANUP_COMPOSITOR_DRIVER_CONTEXT() \ + vr::CleanupDriverContext(); + + +#endif // OPENVR_INTERFACE_INTERNAL + } // End diff --git a/third-party/openvr/lib/linux32/libopenvr_api.so b/third-party/openvr/lib/linux32/libopenvr_api.so index 65d7c0f..552f31f 100644 Binary files a/third-party/openvr/lib/linux32/libopenvr_api.so and b/third-party/openvr/lib/linux32/libopenvr_api.so differ diff --git a/third-party/openvr/lib/linux64/libopenvr_api.so b/third-party/openvr/lib/linux64/libopenvr_api.so index 58ed73c..5552074 100644 Binary files a/third-party/openvr/lib/linux64/libopenvr_api.so and b/third-party/openvr/lib/linux64/libopenvr_api.so differ diff --git a/third-party/openvr/lib/win32/openvr_api.lib b/third-party/openvr/lib/win32/openvr_api.lib index 52308d4..9c1fdc9 100644 Binary files a/third-party/openvr/lib/win32/openvr_api.lib and b/third-party/openvr/lib/win32/openvr_api.lib differ diff --git a/third-party/openvr/lib/win64/openvr_api.lib b/third-party/openvr/lib/win64/openvr_api.lib index 543028b..a7bf95d 100644 Binary files a/third-party/openvr/lib/win64/openvr_api.lib and b/third-party/openvr/lib/win64/openvr_api.lib differ