Skip to content

Commit cdaf2b3

Browse files
committed
OpenVR SDK 1.5.17
Properties: * Deprecated Prop_DoNotApplyPrediction_Bool. Drivers should provide poses with zero velocity instead. * Added Prop_DriverProvidedChaperoneVisibility_Bool – Drivers that set Prop_DriverProvidedChaperonePath_String can also set this property to indicate when the driver provided chaperone is visible or not visible. * Added Prop_HmdTrackingStyle_Int32 - Drivers should set this to an EHmdTrackingStyle value to control what message is shown to users when the HMD isn't tracking. Add a per-driver “loadPriority” (higher is earlier loading) to control the order that we check drivers for available HMDs. The default loadPriority is 0. Drivers can set a different default in resources/settings/default.vrsettings. The user can override those settings in their personal steam/config/steamvr.vrsettings file. Drivers with the same priority continue to be loaded in alphabetical order as before. IVRDriverManager interface: * Added IsEnabled, which returns true if the driver is enabled. IVRInput interface: * Added GetActionBindingInfo - This function allows the caller to learn details about exactly how an action is bound, including what input source the binding is for, what mode on that source, and what slot on that mode. For example, a dpad binding to a trackpad would be "/input/trackpad", "dpad", and "north". IVRDebug Interface: * Initial version of IVRDebug, an interface intended to collect SteamVR debugging functionality. It currently provides methods to interact with the VR Profiler and the driver debug interface. * Added EmitVrProfilerEvent - Applications can use this method to emit a discrete event to the VR Profiler. * Added BeginVrProfilerEvent/FinishVrProfilerEvent - Applications can use this pair of functions to create a duration based VR Profiler event. The methods signal the beginning and the end of the event respectively. * Added DriverDebugRequest - Migrated this function from IVRSystem to IVRDebug. [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 5214411]
1 parent 02bc73b commit cdaf2b3

22 files changed

+924
-48
lines changed

bin/linux32/libopenvr_api.so

-13 Bytes
Binary file not shown.

bin/linux32/libopenvr_api.so.dbg

-14.5 KB
Binary file not shown.

bin/linux64/libopenvr_api.so

-12 Bytes
Binary file not shown.

bin/linux64/libopenvr_api.so.dbg

-15.6 KB
Binary file not shown.

bin/osx32/libopenvr_api.dylib

0 Bytes
Binary file not shown.
Binary file not shown.

bin/win32/openvr_api.dll

512 Bytes
Binary file not shown.

bin/win32/openvr_api.pdb

0 Bytes
Binary file not shown.

bin/win64/openvr_api.dll

0 Bytes
Binary file not shown.

bin/win64/openvr_api.pdb

0 Bytes
Binary file not shown.

headers/openvr.h

+97-17
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
namespace vr
1616
{
1717
static const uint32_t k_nSteamVRVersionMajor = 1;
18-
static const uint32_t k_nSteamVRVersionMinor = 4;
19-
static const uint32_t k_nSteamVRVersionBuild = 18;
18+
static const uint32_t k_nSteamVRVersionMinor = 5;
19+
static const uint32_t k_nSteamVRVersionBuild = 17;
2020
} // namespace vr
2121

2222
// vrtypes.h
@@ -354,6 +354,7 @@ enum ETrackedDeviceProperty
354354
Prop_BootloaderVersion_Uint64 = 1044,
355355
Prop_AdditionalSystemReportData_String = 1045, // additional string to include in system reports about a tracked device
356356
Prop_CompositeFirmwareVersion_String = 1046, // additional FW components from a device that gets propagated into reports
357+
Prop_Firmware_RemindUpdate_Bool = 1047,
357358

358359
// Properties that are unique to TrackedDeviceClass_HMD
359360
Prop_ReportsTimeSinceVSync_Bool = 2000,
@@ -408,7 +409,7 @@ enum ETrackedDeviceProperty
408409
Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, // placeholder icon for "left" controller if not yet detected/loaded
409410
Prop_NamedIconPathControllerRightDeviceOff_String = 2052, // placeholder icon for "right" controller if not yet detected/loaded
410411
Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded
411-
Prop_DoNotApplyPrediction_Bool = 2054,
412+
Prop_DoNotApplyPrediction_Bool = 2054, // currently no effect. was used to disable HMD pose prediction on MR, which is now done by MR driver setting velocity=0
412413
Prop_CameraToHeadTransforms_Matrix34_Array = 2055,
413414
Prop_DistortionMeshResolution_Int32 = 2056, // custom resolution of compositor calls to IVRSystem::ComputeDistortion
414415
Prop_DriverIsDrawingControllers_Bool = 2057,
@@ -429,6 +430,9 @@ enum ETrackedDeviceProperty
429430
Prop_CameraDistortionFunction_Int32_Array = 2072, // Prop_NumCameras_Int32-sized array of vr::EVRDistortionFunctionType values (max size is vr::k_unMaxCameras)
430431
Prop_CameraDistortionCoefficients_Float_Array = 2073, // Prop_NumCameras_Int32-sized array of double[vr::k_unMaxDistortionFunctionParameters] (max size is vr::k_unMaxCameras)
431432
Prop_ExpectedControllerType_String = 2074,
433+
Prop_HmdTrackingStyle_Int32 = 2075, // one of EHmdTrackingStyle
434+
Prop_DriverProvidedChaperoneVisibility_Bool = 2076,
435+
432436

433437
Prop_DisplayAvailableFrameRates_Float_Array = 2080, // populated by compositor from actual EDID list when available from GPU driver
434438
Prop_DisplaySupportsMultipleFramerates_Bool = 2081, // if this is true but Prop_DisplayAvailableFrameRates_Float_Array is empty, explain to user
@@ -527,6 +531,15 @@ enum ETrackedPropertyError
527531
TrackedProp_IPCReadFailure = 13,
528532
};
529533

534+
/** Used to drive certain text in the UI when talking about the tracking system for the HMD */
535+
enum EHmdTrackingStyle
536+
{
537+
HmdTrackingStyle_Unknown = 0,
538+
539+
HmdTrackingStyle_Lighthouse = 1, // base stations and lasers
540+
HmdTrackingStyle_OutsideInCameras = 2, // Cameras and LED, Rift 1 style
541+
HmdTrackingStyle_InsideOutCameras = 3, // Cameras on HMD looking at the world
542+
};
530543

531544
typedef uint64_t VRActionHandle_t;
532545
typedef uint64_t VRActionSetHandle_t;
@@ -1110,6 +1123,7 @@ enum EShowUIType
11101123
// ShowUI_QuickStart = 2, // Deprecated
11111124
ShowUI_Pairing = 3,
11121125
ShowUI_Settings = 4,
1126+
ShowUI_DebugCommands = 5,
11131127
};
11141128

11151129
struct VREvent_ShowUI_t
@@ -1625,6 +1639,8 @@ enum EVRInitError
16251639
VRInitError_Compositor_CreateTextIndexBuffer = 482,
16261640
VRInitError_Compositor_CreateMirrorTextures = 483,
16271641
VRInitError_Compositor_CreateLastFrameRenderTexture = 484,
1642+
VRInitError_Compositor_CreateMirrorOverlay = 485,
1643+
VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486,
16281644

16291645
VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
16301646
VRInitError_VendorSpecific_WindowsNotInDevMode = 1001,
@@ -1642,6 +1658,7 @@ enum EVRInitError
16421658
VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111,
16431659
VRInitError_VendorSpecific_HmdFound_UserDataError = 1112,
16441660
VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
1661+
VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114,
16451662

16461663
VRInitError_Steam_SteamInstallationNotFound = 2000,
16471664

@@ -2101,15 +2118,6 @@ class IVRSystem
21012118
* its own workload. One common way to do this is to reduce the size of the render target provided for each eye. */
21022119
virtual bool ShouldApplicationReduceRenderingWork() = 0;
21032120

2104-
// ------------------------------------
2105-
// Debug Methods
2106-
// ------------------------------------
2107-
2108-
/** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k,
2109-
* but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated.
2110-
* The size of the response including its terminating null is returned. */
2111-
virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, VR_OUT_STRING() char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0;
2112-
21132121
// ------------------------------------
21142122
// Firmware methods
21152123
// ------------------------------------
@@ -2136,7 +2144,7 @@ class IVRSystem
21362144

21372145
};
21382146

2139-
static const char * const IVRSystem_Version = "IVRSystem_019";
2147+
static const char * const IVRSystem_Version = "IVRSystem_020";
21402148

21412149
}
21422150

@@ -2678,6 +2686,7 @@ namespace vr
26782686
//-----------------------------------------------------------------------------
26792687
// driver keys - These could be checked in any driver_<name> section
26802688
static const char * const k_pch_Driver_Enable_Bool = "enable";
2689+
static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority";
26812690

26822691
//-----------------------------------------------------------------------------
26832692
// web interface keys
@@ -3141,13 +3150,14 @@ class IVRCompositor
31413150
/** Returns true if the current process has the scene focus */
31423151
virtual bool CanRenderScene() = 0;
31433152

3144-
/** Creates a window on the primary monitor to display what is being shown in the headset. */
3153+
/** Opens the headset view (as either a window or docked widget depending on user's preferences) that displays what the user
3154+
* sees in the headset. */
31453155
virtual void ShowMirrorWindow() = 0;
31463156

3147-
/** Closes the mirror window. */
3157+
/** Closes the headset view, either as a window or docked widget. */
31483158
virtual void HideMirrorWindow() = 0;
31493159

3150-
/** Returns true if the mirror window is shown. */
3160+
/** Returns true if the headset view (either as a window or docked widget) is shown. */
31513161
virtual bool IsMirrorWindowVisible() = 0;
31523162

31533163
/** Writes back buffer and stereo left/right pair from the application to a 'screenshots' folder in the SteamVR runtime root. */
@@ -4271,6 +4281,8 @@ class IVRDriverManager
42714281
virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0;
42724282

42734283
virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0;
4284+
4285+
virtual bool IsEnabled( vr::DriverId_t nDriver ) const = 0;
42744286
};
42754287

42764288
static const char * const IVRDriverManager_Version = "IVRDriverManager_001";
@@ -4409,6 +4421,14 @@ namespace vr
44094421
char rchRenderModelComponentName[128];
44104422
};
44114423

4424+
struct InputBindingInfo_t
4425+
{
4426+
char rchDevicePathName[128];
4427+
char rchInputPathName[128];
4428+
char rchModeName[128];
4429+
char rchSlotName[128];
4430+
};
4431+
44124432
struct VRActiveActionSet_t
44134433
{
44144434
/** This is the handle of the action set to activate for this frame. */
@@ -4543,6 +4563,9 @@ namespace vr
45434563
/** Retrieves useful information for the origin of this action */
45444564
virtual EVRInputError GetOriginTrackedDeviceInfo( VRInputValueHandle_t origin, InputOriginInfo_t *pOriginInfo, uint32_t unOriginInfoSize ) = 0;
45454565

4566+
/** Retrieves useful information about the bindings for an action */
4567+
virtual EVRInputError GetActionBindingInfo( VRActionHandle_t action, InputBindingInfo_t *pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t *punReturnedBindingInfoCount ) = 0;
4568+
45464569
/** Shows the current binding for the action in-headset */
45474570
virtual EVRInputError ShowActionOrigins( VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle ) = 0;
45484571

@@ -4553,7 +4576,7 @@ namespace vr
45534576
virtual bool IsUsingLegacyInput() = 0;
45544577
};
45554578

4556-
static const char * const IVRInput_Version = "IVRInput_006";
4579+
static const char * const IVRInput_Version = "IVRInput_007";
45574580

45584581
} // namespace vr
45594582

@@ -4660,6 +4683,49 @@ namespace vr
46604683

46614684
static const char * const IVRSpatialAnchors_Version = "IVRSpatialAnchors_001";
46624685

4686+
} // namespace vr
4687+
4688+
// ivrdebug.h
4689+
namespace vr
4690+
{
4691+
enum EVRDebugError
4692+
{
4693+
VRDebugError_Success = 0,
4694+
VRDebugError_BadParameter
4695+
};
4696+
4697+
/** Handle for vr profiler events */
4698+
typedef uint64_t VrProfilerEventHandle_t;
4699+
4700+
class IVRDebug
4701+
{
4702+
public:
4703+
4704+
/** Create a vr profiler discrete event (point)
4705+
* The event will be associated with the message provided in pchMessage, and the current
4706+
* time will be used as the event timestamp. */
4707+
virtual EVRDebugError EmitVrProfilerEvent( const char *pchMessage ) = 0;
4708+
4709+
/** Create an vr profiler duration event (line)
4710+
* The current time will be used as the timestamp for the start of the line.
4711+
* On success, pHandleOut will contain a handle valid for terminating this event. */
4712+
virtual EVRDebugError BeginVrProfilerEvent( VrProfilerEventHandle_t *pHandleOut ) = 0;
4713+
4714+
/** Terminate a vr profiler event
4715+
* The event associated with hHandle will be considered completed when this method is called.
4716+
* The current time will be used assocaited to the termination time of the event, and
4717+
* pchMessage will be used as the event title. */
4718+
virtual EVRDebugError FinishVrProfilerEvent( VrProfilerEventHandle_t hHandle, const char *pchMessage ) = 0;
4719+
4720+
/** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k,
4721+
* but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated.
4722+
* The size of the response including its terminating null is returned. */
4723+
virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, VR_OUT_STRING() char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0;
4724+
4725+
};
4726+
4727+
static const char * const IVRDebug_Version = "IVRDebug_001";
4728+
46634729
} // namespace vr
46644730
// End
46654731

@@ -4929,6 +4995,17 @@ namespace vr
49294995
return m_pVRSpatialAnchors;
49304996
}
49314997

4998+
IVRDebug *VRDebug()
4999+
{
5000+
CheckClear();
5001+
if ( !m_pVRDebug )
5002+
{
5003+
EVRInitError eError;
5004+
m_pVRDebug = (IVRDebug *)VR_GetGenericInterface( IVRDebug_Version, &eError );
5005+
}
5006+
return m_pVRDebug;
5007+
}
5008+
49325009
IVRNotifications *VRNotifications()
49335010
{
49345011
CheckClear();
@@ -4957,6 +5034,7 @@ namespace vr
49575034
IVRInput *m_pVRInput;
49585035
IVRIOBuffer *m_pVRIOBuffer;
49595036
IVRSpatialAnchors *m_pVRSpatialAnchors;
5037+
IVRDebug *m_pVRDebug;
49605038
IVRNotifications *m_pVRNotifications;
49615039
};
49625040

@@ -4983,6 +5061,7 @@ namespace vr
49835061
inline IVRIOBuffer *VR_CALLTYPE VRIOBuffer() { return OpenVRInternal_ModuleContext().VRIOBuffer(); }
49845062
inline IVRSpatialAnchors *VR_CALLTYPE VRSpatialAnchors() { return OpenVRInternal_ModuleContext().VRSpatialAnchors(); }
49855063
inline IVRNotifications *VR_CALLTYPE VRNotifications() { return OpenVRInternal_ModuleContext().VRNotifications(); }
5064+
inline IVRDebug *VR_CALLTYPE VRDebug() { return OpenVRInternal_ModuleContext().VRDebug(); }
49865065

49875066
inline void COpenVRContext::Clear()
49885067
{
@@ -5003,6 +5082,7 @@ namespace vr
50035082
m_pVRIOBuffer = nullptr;
50045083
m_pVRSpatialAnchors = nullptr;
50055084
m_pVRNotifications = nullptr;
5085+
m_pVRDebug = nullptr;
50065086
}
50075087

50085088
VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal2( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo );

0 commit comments

Comments
 (0)