Skip to content

Commit

Permalink
OpenVR SDK 1.5.17
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
JoeLudwig committed Jul 5, 2019
1 parent 02bc73b commit cdaf2b3
Show file tree
Hide file tree
Showing 22 changed files with 924 additions and 48 deletions.
Binary file modified bin/linux32/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux32/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/osx32/libopenvr_api.dylib
Binary file not shown.
Binary file not shown.
Binary file modified bin/win32/openvr_api.dll
Binary file not shown.
Binary file modified bin/win32/openvr_api.pdb
Binary file not shown.
Binary file modified bin/win64/openvr_api.dll
Binary file not shown.
Binary file modified bin/win64/openvr_api.pdb
Binary file not shown.
114 changes: 97 additions & 17 deletions headers/openvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
namespace vr
{
static const uint32_t k_nSteamVRVersionMajor = 1;
static const uint32_t k_nSteamVRVersionMinor = 4;
static const uint32_t k_nSteamVRVersionBuild = 18;
static const uint32_t k_nSteamVRVersionMinor = 5;
static const uint32_t k_nSteamVRVersionBuild = 17;
} // namespace vr

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

// Properties that are unique to TrackedDeviceClass_HMD
Prop_ReportsTimeSinceVSync_Bool = 2000,
Expand Down Expand Up @@ -408,7 +409,7 @@ enum ETrackedDeviceProperty
Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, // placeholder icon for "left" controller if not yet detected/loaded
Prop_NamedIconPathControllerRightDeviceOff_String = 2052, // placeholder icon for "right" controller if not yet detected/loaded
Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded
Prop_DoNotApplyPrediction_Bool = 2054,
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
Prop_CameraToHeadTransforms_Matrix34_Array = 2055,
Prop_DistortionMeshResolution_Int32 = 2056, // custom resolution of compositor calls to IVRSystem::ComputeDistortion
Prop_DriverIsDrawingControllers_Bool = 2057,
Expand All @@ -429,6 +430,9 @@ enum ETrackedDeviceProperty
Prop_CameraDistortionFunction_Int32_Array = 2072, // Prop_NumCameras_Int32-sized array of vr::EVRDistortionFunctionType values (max size is vr::k_unMaxCameras)
Prop_CameraDistortionCoefficients_Float_Array = 2073, // Prop_NumCameras_Int32-sized array of double[vr::k_unMaxDistortionFunctionParameters] (max size is vr::k_unMaxCameras)
Prop_ExpectedControllerType_String = 2074,
Prop_HmdTrackingStyle_Int32 = 2075, // one of EHmdTrackingStyle
Prop_DriverProvidedChaperoneVisibility_Bool = 2076,


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

/** Used to drive certain text in the UI when talking about the tracking system for the HMD */
enum EHmdTrackingStyle
{
HmdTrackingStyle_Unknown = 0,

HmdTrackingStyle_Lighthouse = 1, // base stations and lasers
HmdTrackingStyle_OutsideInCameras = 2, // Cameras and LED, Rift 1 style
HmdTrackingStyle_InsideOutCameras = 3, // Cameras on HMD looking at the world
};

typedef uint64_t VRActionHandle_t;
typedef uint64_t VRActionSetHandle_t;
Expand Down Expand Up @@ -1110,6 +1123,7 @@ enum EShowUIType
// ShowUI_QuickStart = 2, // Deprecated
ShowUI_Pairing = 3,
ShowUI_Settings = 4,
ShowUI_DebugCommands = 5,
};

struct VREvent_ShowUI_t
Expand Down Expand Up @@ -1625,6 +1639,8 @@ enum EVRInitError
VRInitError_Compositor_CreateTextIndexBuffer = 482,
VRInitError_Compositor_CreateMirrorTextures = 483,
VRInitError_Compositor_CreateLastFrameRenderTexture = 484,
VRInitError_Compositor_CreateMirrorOverlay = 485,
VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486,

VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
VRInitError_VendorSpecific_WindowsNotInDevMode = 1001,
Expand All @@ -1642,6 +1658,7 @@ enum EVRInitError
VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111,
VRInitError_VendorSpecific_HmdFound_UserDataError = 1112,
VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114,

VRInitError_Steam_SteamInstallationNotFound = 2000,

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

// ------------------------------------
// Debug Methods
// ------------------------------------

/** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k,
* but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated.
* The size of the response including its terminating null is returned. */
virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, VR_OUT_STRING() char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0;

// ------------------------------------
// Firmware methods
// ------------------------------------
Expand All @@ -2136,7 +2144,7 @@ class IVRSystem

};

static const char * const IVRSystem_Version = "IVRSystem_019";
static const char * const IVRSystem_Version = "IVRSystem_020";

}

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

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

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

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

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

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

virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0;

virtual bool IsEnabled( vr::DriverId_t nDriver ) const = 0;
};

static const char * const IVRDriverManager_Version = "IVRDriverManager_001";
Expand Down Expand Up @@ -4409,6 +4421,14 @@ namespace vr
char rchRenderModelComponentName[128];
};

struct InputBindingInfo_t
{
char rchDevicePathName[128];
char rchInputPathName[128];
char rchModeName[128];
char rchSlotName[128];
};

struct VRActiveActionSet_t
{
/** This is the handle of the action set to activate for this frame. */
Expand Down Expand Up @@ -4543,6 +4563,9 @@ namespace vr
/** Retrieves useful information for the origin of this action */
virtual EVRInputError GetOriginTrackedDeviceInfo( VRInputValueHandle_t origin, InputOriginInfo_t *pOriginInfo, uint32_t unOriginInfoSize ) = 0;

/** Retrieves useful information about the bindings for an action */
virtual EVRInputError GetActionBindingInfo( VRActionHandle_t action, InputBindingInfo_t *pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t *punReturnedBindingInfoCount ) = 0;

/** Shows the current binding for the action in-headset */
virtual EVRInputError ShowActionOrigins( VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle ) = 0;

Expand All @@ -4553,7 +4576,7 @@ namespace vr
virtual bool IsUsingLegacyInput() = 0;
};

static const char * const IVRInput_Version = "IVRInput_006";
static const char * const IVRInput_Version = "IVRInput_007";

} // namespace vr

Expand Down Expand Up @@ -4660,6 +4683,49 @@ namespace vr

static const char * const IVRSpatialAnchors_Version = "IVRSpatialAnchors_001";

} // namespace vr

// ivrdebug.h
namespace vr
{
enum EVRDebugError
{
VRDebugError_Success = 0,
VRDebugError_BadParameter
};

/** Handle for vr profiler events */
typedef uint64_t VrProfilerEventHandle_t;

class IVRDebug
{
public:

/** Create a vr profiler discrete event (point)
* The event will be associated with the message provided in pchMessage, and the current
* time will be used as the event timestamp. */
virtual EVRDebugError EmitVrProfilerEvent( const char *pchMessage ) = 0;

/** Create an vr profiler duration event (line)
* The current time will be used as the timestamp for the start of the line.
* On success, pHandleOut will contain a handle valid for terminating this event. */
virtual EVRDebugError BeginVrProfilerEvent( VrProfilerEventHandle_t *pHandleOut ) = 0;

/** Terminate a vr profiler event
* The event associated with hHandle will be considered completed when this method is called.
* The current time will be used assocaited to the termination time of the event, and
* pchMessage will be used as the event title. */
virtual EVRDebugError FinishVrProfilerEvent( VrProfilerEventHandle_t hHandle, const char *pchMessage ) = 0;

/** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k,
* but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated.
* The size of the response including its terminating null is returned. */
virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, VR_OUT_STRING() char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0;

};

static const char * const IVRDebug_Version = "IVRDebug_001";

} // namespace vr
// End

Expand Down Expand Up @@ -4929,6 +4995,17 @@ namespace vr
return m_pVRSpatialAnchors;
}

IVRDebug *VRDebug()
{
CheckClear();
if ( !m_pVRDebug )
{
EVRInitError eError;
m_pVRDebug = (IVRDebug *)VR_GetGenericInterface( IVRDebug_Version, &eError );
}
return m_pVRDebug;
}

IVRNotifications *VRNotifications()
{
CheckClear();
Expand Down Expand Up @@ -4957,6 +5034,7 @@ namespace vr
IVRInput *m_pVRInput;
IVRIOBuffer *m_pVRIOBuffer;
IVRSpatialAnchors *m_pVRSpatialAnchors;
IVRDebug *m_pVRDebug;
IVRNotifications *m_pVRNotifications;
};

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

inline void COpenVRContext::Clear()
{
Expand All @@ -5003,6 +5082,7 @@ namespace vr
m_pVRIOBuffer = nullptr;
m_pVRSpatialAnchors = nullptr;
m_pVRNotifications = nullptr;
m_pVRDebug = nullptr;
}

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

0 comments on commit cdaf2b3

Please sign in to comment.