Skip to content

Commit f51d87e

Browse files
committed
# OpenVR SDK 2.2.3
* New VREvent_DesktopMightBeVisible: Sent when any known desktop related overlay is visible * New VREvent_DesktopMightBeHidden: Sent when all known desktop related overlays are hidden IVRCompositor: * Added SubmitWithArrayIndex. IVRDisplayComponent: * Add documentation on the new ComputeInverseDistortion method. IVRChaperone: * Amend comments about GetPlayAreaRect to the correct description of its behavior. * Add documentation on the chaperone json file. [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 8643635]
1 parent 15f0838 commit f51d87e

33 files changed

+422
-45
lines changed

bin/linux32/libopenvr_api.so

24 Bytes
Binary file not shown.

bin/linux32/libopenvr_api.so.dbg

324 Bytes
Binary file not shown.

bin/linux64/libopenvr_api.so

0 Bytes
Binary file not shown.

bin/linux64/libopenvr_api.so.dbg

240 Bytes
Binary file not shown.

bin/linuxarm64/libopenvr_api.so

0 Bytes
Binary file not shown.

bin/linuxarm64/libopenvr_api.so.dbg

328 Bytes
Binary file not shown.

bin/linuxarm64/libopenvr_api_unity.so

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

bin/win32/openvr_api.dll

0 Bytes
Binary file not shown.

bin/win32/openvr_api.dll.sig

0 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.dll.sig

0 Bytes
Binary file not shown.

bin/win64/openvr_api.pdb

0 Bytes
Binary file not shown.

codegen/api_shared.py

+4
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,12 @@ def outputinterfaces(namespace, data):
522522
paramlist.append('ref ' + paramtype + ' ' + param['paramname'])
523523
else:
524524
paramlist.append(paramtype + ' ' + param['paramname'])
525+
if(paramtype == 'bool'):
526+
paramlist[-1] = '[MarshalAs(UnmanagedType.I1)] ' + paramlist[-1];
525527

526528
print("\t\t[UnmanagedFunctionPointer(CallingConvention.StdCall)]")
529+
if(returntype == 'bool'):
530+
print("\t\t[return: MarshalAs(UnmanagedType.I1)]")
527531
print("\t\tinternal delegate "+returntype+" _"+methodname+"("+", ".join(paramlist)+");")
528532
print("\t\t[MarshalAs(UnmanagedType.FunctionPtr)]")
529533
print("\t\tinternal _"+methodname+" "+methodname+";\n")

codegen/openvr_capi.h.py

+6
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,12 @@ def OutputStructFields(struct):
241241
VREvent_InputBindingLoad_t inputBinding;
242242
VREvent_InputActionManifestLoad_t actionManifest;
243243
VREvent_SpatialAnchor_t spatialAnchor;
244+
VREvent_ProgressUpdate_t progressUpdate;
245+
VREvent_ShowUI_t showUi;
246+
VREvent_ShowDevTools_t showDevTools;
247+
VREvent_HDCPError_t hdcpError;
248+
VREvent_AudioVolumeControl_t audioVolumeControl;
249+
VREvent_AudioMuteControl_t audioMuteControl;
244250
} VREvent_Data_t;
245251
246252
#if defined(__linux__) || defined(__APPLE__)

codegen/openvr_interop.cs.py

+2
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@
101101
[FieldOffset(0)] public VREvent_ShowUI_t showUi;
102102
[FieldOffset(0)] public VREvent_ShowDevTools_t showDevTools;
103103
[FieldOffset(0)] public VREvent_HDCPError_t hdcpError;
104+
[FieldOffset(0)] public VREvent_AudioVolumeControl_t audioVolumeControl;
105+
[FieldOffset(0)] public VREvent_AudioMuteControl_t audioMuteControl;
104106
[FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be at the end due to a mono bug
105107
}
106108
""")

docs/Driver_API_Documentation.md

+97
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
- [Binding Duplication](#binding-duplication)
7979
- [Emulateable Devices](#emulateable-devices)
8080
- [Render Models](#render-models)
81+
- [Chaperone](#chaperone)
8182
- [Building & Development Environment](#building--development-environment)
8283
- [Debugging SteamVR with Visual Studio](#debugging-steamvr-with-visual-studio)
8384
- [Further Examples](#further-examples)
@@ -1171,6 +1172,26 @@ right and covers a single eye.
11711172
* `float fU` - The current U coordinate.
11721173
* `float fV` - The current V coordinate.
11731174

1175+
```c++
1176+
virtual bool ComputeInverseDistortion( HmdVector2_t *pResult, EVREye eEye, uint32_t unChannel, float fU, float fV ) = 0;
1177+
```
1178+
`ComputeInverseDistortion` is called by the runtime to get the result of the inverse distortion function for the specified eye,
1179+
channel and uv.
1180+
1181+
Drivers **may** return false from this method to indicate that the runtime should infer an estimate from
1182+
the result returned by `IVRDisplayComponent::ComputeDistortion`.
1183+
1184+
Returning true from method indicates to the runtime that it should not try to estimate the inverse, and instead use the
1185+
values provided by the driver.
1186+
1187+
* `HmdVector2_t *pResult` - Driver should write into this with the result for the specified UV.
1188+
* `EVREye eEye` - The eye to get the distortion for. The possible options are:
1189+
* `Eye_Left` - The left eye.
1190+
* `Eye_Right` - The right eye.
1191+
* `uint32_t unChannel` - Which channel is requested. 0 for red, 1 for blue, 2 for green.
1192+
* `float fU` - The current U coordinate.
1193+
* `float fV` - The current V coordinate.
1194+
11741195
#### IVRDriverDirectModeComponent
11751196
11761197
`IVRDriverDirectModeComponent` is used for drivers that implement direct mode entirely on their own without allowing the
@@ -3486,6 +3507,82 @@ will be set in the override property container.
34863507
* `legacy_buttons` - `[ 0, 1, 2, 32, 33 ]`
34873508
* `legacy_axis` - `[ 1, 3, 0, 0, 0 ]`
34883509

3510+
## Chaperone
3511+
3512+
The SteamVR Chaperone system provides visible boundaries for users when inside VR, which should be
3513+
shown at the edges of the play space to avoid collisions with other objects.
3514+
3515+
The chaperone system is also responsible for keeping track of the relation between the driver's raw
3516+
tracking space (the tracking space in which the driver provides poses to the runtime through
3517+
`IVRServerDriverHost::TrackedDevicePoseUpdate`) and the seated and standing universe origins that applications
3518+
query poses relative to.
3519+
3520+
A description of each of the universes is below, along with their corresponding json property:
3521+
3522+
* `TrackingUniverseSeated (seated)` - Useful for applications that need to render content relative to the user's resting head position, such as presenting a cockpit view in simulators.
3523+
* `TrackingUniverseStanding (standing)` - This is some point on the floor of the tracking space, where y = 0 **must** always be the floor in this tracking space. Useful for applications that want to render content that should scale to the user's real world setup, such as placing the floor at the same location.
3524+
* "Setup standing (setup_standing2)" - An origin from the raw tracking space. This is some point on the floor which is the center of the play space. The universe is not visible to applications, but the driver **may** choose to use it to break the dependency between where the standing origin should be, and where SteamVR should place the collision bounds relative to. It is optional for the driver to provide this, and if ommitted, it will default to being the same as the standing universe.
3525+
3526+
Any driver that provides its own tracking solution **should** provide its own chaperone setup.
3527+
3528+
A driver provides its chaperone setup as a json file. A driver **may** either provide an absolute path
3529+
to the chaperone json file it wishes to present to SteamVR, or provide a json string by setting
3530+
the `Prop_DriverProvidedChaperoneJson_String` property of the HMD container.
3531+
3532+
A driver **may** provide multiple "universes", where (in this context), a universe represents a different
3533+
location in the real world that requires a separate chaperone setup, such as switching to a different room.
3534+
3535+
SteamVR only allows one chaperone universe to be active at a time. A driver **must** specify the
3536+
universe that it wishes to use by setting the `Prop_CurrentUniverseId_Uint64` property to the universe id
3537+
it wises to use (more details below).
3538+
3539+
The provided json **must** be valid, with no trailing commas, but **may** contain comments prefixed by `//`.
3540+
3541+
* `json_id` - **required**. Set to `chaperone_info`.
3542+
* `version` - **required**. Current chaperone json version is `5`.
3543+
* `time` - **required**. The ISO timestamp when the chaperone file was last modified.
3544+
* `universes` - A json array containing json objects that contain:
3545+
* `collision_bounds` - An array that contains sets of polygons (An array that **should**
3546+
contain arrays that contains arrays of 4 elements (the polygons),
3547+
where each element is an array that contains the x,y,z positions of each vertex).
3548+
Collision bounds are relative to the **setup standing** play space.
3549+
Drivers **should** provide 4 vertices per face they are drawing. Drivers **should**
3550+
provide vertices that are all on the same vertical plane as eachother.
3551+
* `play_area` - An array that contains two values: `[width, height]` of the play space.
3552+
The width and height are driver-defined, but **should** represent largest rectangle that
3553+
can represent the playable area.
3554+
* `<seated/standing/setup_standing2>` - A json object that represents the relation between the driver's raw
3555+
tracking space and the specified universe origin. Drivers **must** provide seated and standing relations,
3556+
but **may** omit the setup standing universe. In this case, the setup standing universe will be
3557+
set to what was set for the standing property (see next paragraph). Each **must** contain the following properties:
3558+
* `translation` - The position offset between the raw origin and the universe's origin
3559+
* `yaw` - The rotation on the x,z plane between the raw space and universe's space
3560+
* `universeID` - The id of the universe. This **must** be a uint32 number and **must** be
3561+
unique for each different universe.
3562+
3563+
The driver **must** either:
3564+
1. Set both the setup standing and standing origins.
3565+
* In this case, the setup standing origin is treated as the center of the play area. The standing origin is free to be placed elsewhere
3566+
2. Set only the standing origin.
3567+
* In this case, the standing origin is treated as the center of the play area.
3568+
3569+
### Recentering
3570+
3571+
The recentering feature in SteamVR allows the user to update the standing and seated universe positions
3572+
while inside SteamVR. This can be useful to reposition your height in a cockpit, or to reposition
3573+
room-scale content relative to a different real-world position.
3574+
3575+
Initially, the transforms for the standing and seated universes are set by the driver provided chaperone file.
3576+
When a user requests a recenter, SteamVR updates the standing and seated transforms it holds in memory,
3577+
and will attempt to update the seated universe (and only seated universe) in the chaperone file if
3578+
the driver provided one, and that file is writeable. SteamVR **will not** attempt to modify the standing transform.
3579+
3580+
If a driver wants to configure the way recentering is handled,
3581+
it **may** configure the `Prop_Driver_RecenterSupport_Int32` property with one of the following values:
3582+
* `k_EVRDriverRecenterSupport_SteamVRHandlesRecenter` - Default. SteamVR shows a recenter but and will do the above when a user requests a recenter.
3583+
* `k_EVRDriverRecenterSupport_NoRecenter` - Recentering is not supported and no recenter button will be shown in the UI.
3584+
* `k_EVRDriverRecenterSupport_DriverHandlesRecenter` - A recenter button is shown and an event **will** be triggered for the driver to handle the recenter, but SteamVR will do no additional processing.
3585+
34893586
## Render Models
34903587

34913588
A render model is a 3D model that represents a device in VR. A render model **should** provide a graphical

headers/openvr.h

+59-15
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
namespace vr
1717
{
1818
static const uint32_t k_nSteamVRVersionMajor = 2;
19-
static const uint32_t k_nSteamVRVersionMinor = 0;
20-
static const uint32_t k_nSteamVRVersionBuild = 10;
19+
static const uint32_t k_nSteamVRVersionMinor = 2;
20+
static const uint32_t k_nSteamVRVersionBuild = 3;
2121
} // namespace vr
2222

2323
// public_vrtypes.h
@@ -531,6 +531,7 @@ enum ETrackedDeviceProperty
531531
Prop_Hmd_SupportsHDR10_Bool = 2093,
532532
Prop_Hmd_EnableParallelRenderCameras_Bool = 2094,
533533
Prop_DriverProvidedChaperoneJson_String = 2095, // higher priority than Prop_DriverProvidedChaperonePath_String
534+
Prop_ForceSystemLayerUseAppPoses_Bool = 2096,
534535

535536
Prop_IpdUIRangeMinMeters_Float = 2100,
536537
Prop_IpdUIRangeMaxMeters_Float = 2101,
@@ -547,6 +548,10 @@ enum ETrackedDeviceProperty
547548
Prop_DSCSliceCount_Int32 = 2111,
548549
Prop_DSCBPPx16_Int32 = 2112,
549550

551+
Prop_Hmd_MaxDistortedTextureWidth_Int32 = 2113,
552+
Prop_Hmd_MaxDistortedTextureHeight_Int32 = 2114,
553+
Prop_Hmd_AllowSupersampleFiltering_Bool = 2115,
554+
550555
// Driver requested mura correction properties
551556
Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200,
552557
Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201,
@@ -558,10 +563,16 @@ enum ETrackedDeviceProperty
558563
Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207,
559564
Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208,
560565

561-
Prop_Audio_DefaultPlaybackDeviceId_String = 2300,
562-
Prop_Audio_DefaultRecordingDeviceId_String = 2301,
563-
Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302,
564-
Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303,
566+
Prop_Audio_DefaultPlaybackDeviceId_String = 2300,
567+
Prop_Audio_DefaultRecordingDeviceId_String = 2301,
568+
Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302,
569+
Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303,
570+
Prop_Audio_DriverManagesPlaybackVolumeControl_Bool = 2304,
571+
Prop_Audio_DriverPlaybackVolume_Float = 2305,
572+
Prop_Audio_DriverPlaybackMute_Bool = 2306,
573+
Prop_Audio_DriverManagesRecordingVolumeControl_Bool = 2307,
574+
Prop_Audio_DriverRecordingVolume_Float = 2308,
575+
Prop_Audio_DriverRecordingMute_Bool = 2309,
565576

566577
// Properties that are unique to TrackedDeviceClass_Controller
567578
Prop_AttachedDeviceId_String = 3000,
@@ -610,7 +621,8 @@ enum ETrackedDeviceProperty
610621
Prop_HasCameraComponent_Bool = 6004,
611622
Prop_HasDriverDirectModeComponent_Bool = 6005,
612623
Prop_HasVirtualDisplayComponent_Bool = 6006,
613-
Prop_HasSpatialAnchorsSupport_Bool = 6007,
624+
Prop_HasSpatialAnchorsSupport_Bool = 6007,
625+
Prop_SupportsXrTextureSets_Bool = 6008,
614626

615627
// Properties that are set internally based on other information provided by drivers
616628
Prop_ControllerType_String = 7000,
@@ -870,6 +882,9 @@ enum EVREventType
870882

871883
VREvent_DashboardThumbChanged = 535, // Sent when a dashboard thumbnail image changes
872884

885+
VREvent_DesktopMightBeVisible = 536, // Sent when any known desktop related overlay is visible
886+
VREvent_DesktopMightBeHidden = 537, // Sent when all known desktop related overlays are hidden
887+
873888
VREvent_Notification_Shown = 600,
874889
VREvent_Notification_Hidden = 601,
875890
VREvent_Notification_BeginInteraction = 602,
@@ -990,6 +1005,11 @@ enum EVREventType
9901005
VREvent_Monitor_ShowHeadsetView = 2000, // data is process
9911006
VREvent_Monitor_HideHeadsetView = 2001, // data is process
9921007

1008+
VREvent_Audio_SetSpeakersVolume = 2100,
1009+
VREvent_Audio_SetSpeakersMute = 2101,
1010+
VREvent_Audio_SetMicrophoneVolume = 2102,
1011+
VREvent_Audio_SetMicrophoneMute = 2103,
1012+
9931013
// Vendors are free to expose private events in this reserved region
9941014
VREvent_VendorSpecific_Reserved_Start = 10000,
9951015
VREvent_VendorSpecific_Reserved_End = 19999,
@@ -1302,6 +1322,16 @@ struct VREvent_HDCPError_t
13021322
EHDCPError eCode;
13031323
};
13041324

1325+
struct VREvent_AudioVolumeControl_t
1326+
{
1327+
float fVolumeLevel;
1328+
};
1329+
1330+
struct VREvent_AudioMuteControl_t
1331+
{
1332+
bool bMute;
1333+
};
1334+
13051335
typedef union
13061336
{
13071337
VREvent_Reserved_t reserved;
@@ -1333,7 +1363,9 @@ typedef union
13331363
VREvent_ShowUI_t showUi;
13341364
VREvent_ShowDevTools_t showDevTools;
13351365
VREvent_HDCPError_t hdcpError;
1336-
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
1366+
VREvent_AudioVolumeControl_t audioVolumeControl;
1367+
VREvent_AudioMuteControl_t audioMuteControl;
1368+
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */
13371369
} VREvent_Data_t;
13381370

13391371

@@ -1865,6 +1897,7 @@ enum EVRInitError
18651897
VRInitError_Compositor_CannotConnectToDisplayServer = 497,
18661898
VRInitError_Compositor_GnomeNoDRMLeasing = 498,
18671899
VRInitError_Compositor_FailedToInitializeEncoder = 499,
1900+
VRInitError_Compositor_CreateBlurTexture = 500,
18681901

18691902
VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
18701903
VRInitError_VendorSpecific_WindowsNotInDevMode = 1001,
@@ -2882,6 +2915,11 @@ namespace vr
28822915
static const char * const k_pch_SteamVR_UsePrism_Bool = "usePrism";
28832916
static const char * const k_pch_SteamVR_AllowFallbackMirrorWindowLinux_Bool = "allowFallbackMirrorWindowLinux";
28842917

2918+
//-----------------------------------------------------------------------------
2919+
// openxr keys
2920+
static const char * const k_pch_OpenXR_Section = "openxr";
2921+
static const char * const k_pch_OpenXR_MetaUnityPluginCompatibility_Int32 = "metaUnityPluginCompatibility";
2922+
28852923
//-----------------------------------------------------------------------------
28862924
// direct mode keys
28872925
static const char * const k_pch_DirectMode_Section = "direct_mode";
@@ -3145,12 +3183,16 @@ class IVRChaperone
31453183
* Tracking space center (0,0,0) is the center of the Play Area. **/
31463184
virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0;
31473185

3148-
/** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds).
3149-
* Corners are in counter-clockwise order.
3150-
* Standing center (0,0,0) is the center of the Play Area.
3151-
* It's a rectangle.
3152-
* 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis.
3153-
* Height of every corner is 0Y (on the floor). **/
3186+
/** Returns a quad describing the Play Area (formerly named Soft Bounds).
3187+
* The corners form a rectangle.
3188+
* Corners are in counter-clockwise order, starting at the front-right.
3189+
* The positions are given relative to the standing origin.
3190+
* The center of the rectangle is the center of the user's calibrated play space, not necessarily the standing
3191+
* origin.
3192+
* The Play Area's forward direction goes from its center through the mid-point of a line drawn between the
3193+
* first and second corner.
3194+
* The quad lies on the XZ plane (height = 0y), with 2 sides parallel to the X-axis and two sides parallel
3195+
* to the Z-axis of the user's calibrated Play Area. **/
31543196
virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0;
31553197

31563198
/** Reload Chaperone data from the .vrchap file on disk. */
@@ -3452,6 +3494,8 @@ class IVRCompositor
34523494
* - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again)
34533495
*/
34543496
virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0;
3497+
virtual EVRCompositorError SubmitWithArrayIndex( EVREye eEye, const Texture_t *pTexture, uint32_t unTextureArrayIndex,
3498+
const VRTextureBounds_t *pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0;
34553499

34563500
/** Clears the frame that was sent with the last call to Submit. This will cause the
34573501
* compositor to show the grid until Submit is called again. */
@@ -3631,7 +3675,7 @@ class IVRCompositor
36313675
virtual EVRCompositorError GetPosesForFrame( uint32_t unPosePredictionID, VR_ARRAY_COUNT( unPoseArrayCount ) TrackedDevicePose_t* pPoseArray, uint32_t unPoseArrayCount ) = 0;
36323676
};
36333677

3634-
static const char * const IVRCompositor_Version = "IVRCompositor_027";
3678+
static const char * const IVRCompositor_Version = "IVRCompositor_028";
36353679

36363680
} // namespace vr
36373681

0 commit comments

Comments
 (0)