tangled
alpha
login
or
join now
matrixfurry.com
/
monado
0
fork
atom
The open source OpenXR runtime
0
fork
atom
overview
issues
pulls
pipelines
external, st/steamvr_drv: update OpenVR to 1.16.8
danwillm
3 years ago
75995fed
33d302d9
+1434
-225
3 changed files
expand all
collapse all
unified
split
src
external
openvr_includes
CHANGELOG.md
openvr_driver.h
xrt
state_trackers
steamvr_drv
ovrd_driver.cpp
+1
src/external/openvr_includes/CHANGELOG.md
···
1
1
# Current version
2
2
3
3
* Synced on 2020-06-10 `OpenVR SDK 1.12.5`
4
4
+
* Synced on 2022-07-27 `OpenVR SDK 1.16.8`
+1428
-221
src/external/openvr_includes/openvr_driver.h
···
11
11
12
12
13
13
14
14
-
// vrtypes.h
15
15
-
#ifndef _INCLUDE_VRTYPES_H
16
16
-
#define _INCLUDE_VRTYPES_H
14
14
+
// version.h
17
15
18
18
-
// Forward declarations to avoid requiring vulkan.h
19
19
-
struct VkDevice_T;
20
20
-
struct VkPhysicalDevice_T;
21
21
-
struct VkInstance_T;
22
22
-
struct VkQueue_T;
16
16
+
namespace vr
17
17
+
{
18
18
+
static const uint32_t k_nSteamVRVersionMajor = 1;
19
19
+
static const uint32_t k_nSteamVRVersionMinor = 16;
20
20
+
static const uint32_t k_nSteamVRVersionBuild = 8;
21
21
+
} // namespace vr
22
22
+
23
23
+
// public_vrtypes.h
23
24
24
24
-
// Forward declarations to avoid requiring d3d12.h
25
25
-
struct ID3D12Resource;
26
26
-
struct ID3D12CommandQueue;
25
25
+
#ifndef _INCLUDE_CORE_VRTYPES_PUBLIC_H
26
26
+
#define _INCLUDE_CORE_VRTYPES_PUBLIC_H
27
27
28
28
namespace vr
29
29
{
30
30
#pragma pack( push, 8 )
31
31
-
32
32
-
typedef void* glSharedTextureHandle_t;
33
33
-
typedef int32_t glInt_t;
34
34
-
typedef uint32_t glUInt_t;
35
31
36
32
// right-handed system
37
33
// +y is up
···
43
39
float m[3][4];
44
40
};
45
41
42
42
+
struct HmdMatrix33_t
43
43
+
{
44
44
+
float m[3][3];
45
45
+
};
46
46
+
46
47
struct HmdMatrix44_t
47
48
{
48
49
float m[4][4];
···
73
74
double w, x, y, z;
74
75
};
75
76
77
77
+
struct HmdQuaternionf_t
78
78
+
{
79
79
+
float w, x, y, z;
80
80
+
};
81
81
+
76
82
struct HmdColor_t
77
83
{
78
84
float r, g, b, a;
···
89
95
HmdVector2_t vBottomRight;
90
96
};
91
97
92
92
-
/** Used to return the post-distortion UVs for each color channel.
93
93
-
* UVs range from 0 to 1 with 0,0 in the upper left corner of the
98
98
+
/** Holds the transform for a single bone */
99
99
+
struct VRBoneTransform_t
100
100
+
{
101
101
+
HmdVector4_t position;
102
102
+
HmdQuaternionf_t orientation;
103
103
+
};
104
104
+
105
105
+
#pragma pack( pop )
106
106
+
107
107
+
} // namespace vr
108
108
+
109
109
+
#endif
110
110
+
111
111
+
// vrtypes.h
112
112
+
113
113
+
#ifndef _INCLUDE_VRTYPES_H
114
114
+
#define _INCLUDE_VRTYPES_H
115
115
+
116
116
+
// Forward declarations to avoid requiring vulkan.h
117
117
+
struct VkDevice_T;
118
118
+
struct VkPhysicalDevice_T;
119
119
+
struct VkInstance_T;
120
120
+
struct VkQueue_T;
121
121
+
122
122
+
// Forward declarations to avoid requiring d3d12.h
123
123
+
struct ID3D12Resource;
124
124
+
struct ID3D12CommandQueue;
125
125
+
126
126
+
namespace vr
127
127
+
{
128
128
+
#pragma pack( push, 8 )
129
129
+
130
130
+
/** A handle for a spatial anchor. This handle is only valid during the session it was created in.
131
131
+
* Anchors that live beyond one session should be saved by their string descriptors. */
132
132
+
typedef uint32_t SpatialAnchorHandle_t;
133
133
+
134
134
+
typedef void* glSharedTextureHandle_t;
135
135
+
typedef int32_t glInt_t;
136
136
+
typedef uint32_t glUInt_t;
137
137
+
138
138
+
139
139
+
/** Used to return the post-distortion UVs for each color channel.
140
140
+
* UVs range from 0 to 1 with 0,0 in the upper left corner of the
94
141
* source render target. The 0,0 to 1,1 range covers a single eye. */
95
142
struct DistortionCoordinates_t
96
143
{
···
107
154
108
155
enum ETextureType
109
156
{
157
157
+
TextureType_Invalid = -1, // Handle has been invalidated
110
158
TextureType_DirectX = 0, // Handle is an ID3D11Texture
111
159
TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags
112
160
TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure
113
113
-
TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef
161
161
+
TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef, deprecated in favor of TextureType_Metal on supported platforms
114
162
TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure
115
115
-
TextureType_DXGISharedHandle = 5, // Handle is a HANDLE DXGI share handle, only supported for Overlay render targets.
163
163
+
TextureType_DXGISharedHandle = 5, // Handle is a HANDLE DXGI share handle, only supported for Overlay render targets.
116
164
// this texture is used directly by our renderer, so only perform atomic (copyresource or resolve) on it
165
165
+
TextureType_Metal = 6, // Handle is a MTLTexture conforming to the MTLSharedTexture protocol. Textures submitted to IVRCompositor::Submit which
166
166
+
// are of type MTLTextureType2DArray assume layer 0 is the left eye texture (vr::EVREye::Eye_left), layer 1 is the right
167
167
+
// eye texture (vr::EVREye::Eye_Right)
117
168
};
118
169
119
170
enum EColorSpace
···
143
194
144
195
TrackingResult_Running_OK = 200,
145
196
TrackingResult_Running_OutOfRange = 201,
197
197
+
198
198
+
TrackingResult_Fallback_RotationOnly = 300,
146
199
};
147
200
148
201
typedef uint32_t DriverId_t;
···
166
219
TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers
167
220
TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points
168
221
TrackedDeviceClass_DisplayRedirect = 5, // Accessories that aren't necessarily tracked themselves, but may redirect video output from other tracked devices
222
222
+
223
223
+
TrackedDeviceClass_Max
169
224
};
170
225
171
226
···
176
231
TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand
177
232
TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand
178
233
TrackedControllerRole_OptOut = 3, // Tracked device is opting out of left/right hand selection
179
179
-
TrackedControllerRole_Max = 4
234
234
+
TrackedControllerRole_Treadmill = 4, // Tracked device is a treadmill or other locomotion device
235
235
+
TrackedControllerRole_Stylus = 5, // Tracked device is a stylus
236
236
+
TrackedControllerRole_Max = 5
180
237
};
181
238
182
239
240
240
+
/** Returns true if the tracked controller role is allowed to be a hand */
241
241
+
inline bool IsRoleAllowedAsHand( ETrackedControllerRole eRole )
242
242
+
{
243
243
+
switch ( eRole )
244
244
+
{
245
245
+
case TrackedControllerRole_Invalid:
246
246
+
case TrackedControllerRole_LeftHand:
247
247
+
case TrackedControllerRole_RightHand:
248
248
+
return true;
249
249
+
default:
250
250
+
return false;
251
251
+
}
252
252
+
}
253
253
+
254
254
+
183
255
/** describes a single pose for a tracked object */
184
256
struct TrackedDevicePose_t
185
257
{
···
203
275
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.
204
276
};
205
277
278
278
+
enum EAdditionalRadioFeatures
279
279
+
{
280
280
+
AdditionalRadioFeatures_None = 0x00000000,
281
281
+
AdditionalRadioFeatures_HTCLinkBox = 0x00000001,
282
282
+
AdditionalRadioFeatures_InternalDongle = 0x00000002,
283
283
+
AdditionalRadioFeatures_ExternalDongle = 0x00000004,
284
284
+
};
285
285
+
206
286
typedef uint64_t WebConsoleHandle_t;
207
287
#define INVALID_WEB_CONSOLE_HANDLE ((vr::WebConsoleHandle_t)0)
208
288
···
222
302
static const PropertyTypeTag_t k_unUint64PropertyTag = 3;
223
303
static const PropertyTypeTag_t k_unBoolPropertyTag = 4;
224
304
static const PropertyTypeTag_t k_unStringPropertyTag = 5;
305
305
+
static const PropertyTypeTag_t k_unErrorPropertyTag = 6;
306
306
+
static const PropertyTypeTag_t k_unDoublePropertyTag = 7;
225
307
226
308
static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20;
227
309
static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21;
228
310
static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22;
229
311
static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23;
312
312
+
static const PropertyTypeTag_t k_unHmdVector2PropertyTag = 24;
313
313
+
static const PropertyTypeTag_t k_unHmdQuadPropertyTag = 25;
230
314
231
315
static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30;
232
316
static const PropertyTypeTag_t k_unPathHandleInfoTag = 31;
···
234
318
static const PropertyTypeTag_t k_unInputValuePropertyTag = 33;
235
319
static const PropertyTypeTag_t k_unWildcardPropertyTag = 34;
236
320
static const PropertyTypeTag_t k_unHapticVibrationPropertyTag = 35;
321
321
+
static const PropertyTypeTag_t k_unSkeletonPropertyTag = 36;
322
322
+
323
323
+
static const PropertyTypeTag_t k_unSpatialAnchorPosePropertyTag = 40;
324
324
+
static const PropertyTypeTag_t k_unJsonPropertyTag = 41;
325
325
+
static const PropertyTypeTag_t k_unActiveActionSetPropertyTag = 42;
237
326
238
327
static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000;
239
328
static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000;
···
287
376
Prop_NeverTracked_Bool = 1038, // Used for devices that will never have a valid pose by design
288
377
Prop_NumCameras_Int32 = 1039,
289
378
Prop_CameraFrameLayout_Int32 = 1040, // EVRTrackedCameraFrameLayout value
379
379
+
Prop_CameraStreamFormat_Int32 = 1041, // ECameraVideoStreamFormat value
380
380
+
Prop_AdditionalDeviceSettingsPath_String = 1042, // driver-relative path to additional device and global configuration settings
381
381
+
Prop_Identifiable_Bool = 1043, // Whether device supports being identified from vrmonitor (e.g. blink LED, vibrate haptics, etc)
382
382
+
Prop_BootloaderVersion_Uint64 = 1044,
383
383
+
Prop_AdditionalSystemReportData_String = 1045, // additional string to include in system reports about a tracked device
384
384
+
Prop_CompositeFirmwareVersion_String = 1046, // additional FW components from a device that gets propagated into reports
385
385
+
Prop_Firmware_RemindUpdate_Bool = 1047,
386
386
+
Prop_PeripheralApplicationVersion_Uint64 = 1048,
387
387
+
Prop_ManufacturerSerialNumber_String = 1049,
388
388
+
Prop_ComputedSerialNumber_String = 1050,
389
389
+
Prop_EstimatedDeviceFirstUseTime_Int32 = 1051,
290
390
291
391
// Properties that are unique to TrackedDeviceClass_HMD
292
392
Prop_ReportsTimeSinceVSync_Bool = 2000,
293
393
Prop_SecondsFromVsyncToPhotons_Float = 2001,
294
394
Prop_DisplayFrequency_Float = 2002,
295
395
Prop_UserIpdMeters_Float = 2003,
296
296
-
Prop_CurrentUniverseId_Uint64 = 2004,
297
297
-
Prop_PreviousUniverseId_Uint64 = 2005,
396
396
+
Prop_CurrentUniverseId_Uint64 = 2004,
397
397
+
Prop_PreviousUniverseId_Uint64 = 2005,
298
398
Prop_DisplayFirmwareVersion_Uint64 = 2006,
299
399
Prop_IsOnDesktop_Bool = 2007,
300
400
Prop_DisplayMCType_Int32 = 2008,
···
341
441
Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, // placeholder icon for "left" controller if not yet detected/loaded
342
442
Prop_NamedIconPathControllerRightDeviceOff_String = 2052, // placeholder icon for "right" controller if not yet detected/loaded
343
443
Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded
344
344
-
Prop_DoNotApplyPrediction_Bool = 2054,
444
444
+
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
345
445
Prop_CameraToHeadTransforms_Matrix34_Array = 2055,
346
446
Prop_DistortionMeshResolution_Int32 = 2056, // custom resolution of compositor calls to IVRSystem::ComputeDistortion
347
447
Prop_DriverIsDrawingControllers_Bool = 2057,
···
350
450
Prop_MinimumIpdStepMeters_Float = 2060,
351
451
Prop_AudioBridgeFirmwareVersion_Uint64 = 2061,
352
452
Prop_ImageBridgeFirmwareVersion_Uint64 = 2062,
453
453
+
Prop_ImuToHeadTransform_Matrix34 = 2063,
454
454
+
Prop_ImuFactoryGyroBias_Vector3 = 2064,
455
455
+
Prop_ImuFactoryGyroScale_Vector3 = 2065,
456
456
+
Prop_ImuFactoryAccelerometerBias_Vector3 = 2066,
457
457
+
Prop_ImuFactoryAccelerometerScale_Vector3 = 2067,
458
458
+
// reserved 2068
459
459
+
Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069,
460
460
+
Prop_AdditionalRadioFeatures_Uint64 = 2070,
461
461
+
Prop_CameraWhiteBalance_Vector4_Array = 2071, // Prop_NumCameras_Int32-sized array of float[4] RGBG white balance calibration data (max size is vr::k_unMaxCameras)
462
462
+
Prop_CameraDistortionFunction_Int32_Array = 2072, // Prop_NumCameras_Int32-sized array of vr::EVRDistortionFunctionType values (max size is vr::k_unMaxCameras)
463
463
+
Prop_CameraDistortionCoefficients_Float_Array = 2073, // Prop_NumCameras_Int32-sized array of double[vr::k_unMaxDistortionFunctionParameters] (max size is vr::k_unMaxCameras)
464
464
+
Prop_ExpectedControllerType_String = 2074,
465
465
+
Prop_HmdTrackingStyle_Int32 = 2075, // one of EHmdTrackingStyle
466
466
+
Prop_DriverProvidedChaperoneVisibility_Bool = 2076,
467
467
+
Prop_HmdColumnCorrectionSettingPrefix_String = 2077,
468
468
+
Prop_CameraSupportsCompatibilityModes_Bool = 2078,
469
469
+
Prop_SupportsRoomViewDepthProjection_Bool = 2079,
470
470
+
Prop_DisplayAvailableFrameRates_Float_Array = 2080, // populated by compositor from actual EDID list when available from GPU driver
471
471
+
Prop_DisplaySupportsMultipleFramerates_Bool = 2081, // if this is true but Prop_DisplayAvailableFrameRates_Float_Array is empty, explain to user
472
472
+
Prop_DisplayColorMultLeft_Vector3 = 2082,
473
473
+
Prop_DisplayColorMultRight_Vector3 = 2083,
474
474
+
Prop_DisplaySupportsRuntimeFramerateChange_Bool = 2084,
475
475
+
Prop_DisplaySupportsAnalogGain_Bool = 2085,
476
476
+
Prop_DisplayMinAnalogGain_Float = 2086,
477
477
+
Prop_DisplayMaxAnalogGain_Float = 2087,
478
478
+
Prop_CameraExposureTime_Float = 2088,
479
479
+
Prop_CameraGlobalGain_Float = 2089,
480
480
+
// Prop_DashboardLayoutPathName_String = 2090, // DELETED
481
481
+
Prop_DashboardScale_Float = 2091,
482
482
+
Prop_IpdUIRangeMinMeters_Float = 2100,
483
483
+
Prop_IpdUIRangeMaxMeters_Float = 2101,
484
484
+
Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102,
485
485
+
Prop_Hmd_SupportsMicMonitoring_Bool = 2103,
486
486
+
487
487
+
// Driver requested mura correction properties
488
488
+
Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200,
489
489
+
Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201,
490
490
+
Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202,
491
491
+
Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203,
492
492
+
Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204,
493
493
+
Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205,
494
494
+
Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206,
495
495
+
Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207,
496
496
+
Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208,
497
497
+
498
498
+
Prop_Audio_DefaultPlaybackDeviceId_String = 2300,
499
499
+
Prop_Audio_DefaultRecordingDeviceId_String = 2301,
500
500
+
Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302,
501
501
+
Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303,
353
502
354
503
// Properties that are unique to TrackedDeviceClass_Controller
355
504
Prop_AttachedDeviceId_String = 3000,
···
369
518
Prop_TrackingRangeMinimumMeters_Float = 4004,
370
519
Prop_TrackingRangeMaximumMeters_Float = 4005,
371
520
Prop_ModeLabel_String = 4006,
521
521
+
Prop_CanWirelessIdentify_Bool = 4007, // volatile, based on radio presence and fw discovery
522
522
+
Prop_Nonce_Int32 = 4008,
372
523
373
524
// Properties that are used for user interface like icons names
374
525
Prop_IconPathName_String = 5000, // DEPRECATED. Value not referenced. Now expected to be part of icon path properties.
···
380
531
Prop_NamedIconPathDeviceNotReady_String = 5006, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
381
532
Prop_NamedIconPathDeviceStandby_String = 5007, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
382
533
Prop_NamedIconPathDeviceAlertLow_String = 5008, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
534
534
+
Prop_NamedIconPathDeviceStandbyAlert_String = 5009, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
383
535
384
536
// Properties that are used by helpers, but are opaque to applications
385
537
Prop_DisplayHiddenArea_Binary_Start = 5100,
386
538
Prop_DisplayHiddenArea_Binary_End = 5150,
387
539
Prop_ParentContainer = 5151,
540
540
+
Prop_OverrideContainer_Uint64 = 5152,
388
541
389
542
// Properties that are unique to drivers
390
543
Prop_UserConfigPath_String = 6000,
···
394
547
Prop_HasCameraComponent_Bool = 6004,
395
548
Prop_HasDriverDirectModeComponent_Bool = 6005,
396
549
Prop_HasVirtualDisplayComponent_Bool = 6006,
550
550
+
Prop_HasSpatialAnchorsSupport_Bool = 6007,
397
551
398
552
// Properties that are set internally based on other information provided by drivers
399
553
Prop_ControllerType_String = 7000,
400
400
-
Prop_LegacyInputProfile_String = 7001,
554
554
+
//Prop_LegacyInputProfile_String = 7001, // This is no longer used. See "legacy_binding" in the input profile instead.
555
555
+
Prop_ControllerHandSelectionPriority_Int32 = 7002, // Allows hand assignments to prefer some controllers over others. High numbers are selected over low numbers
401
556
402
557
// Vendors are free to expose private debug data in this reserved region
403
558
Prop_VendorSpecific_Reserved_Start = 10000,
404
559
Prop_VendorSpecific_Reserved_End = 10999,
405
405
-
560
560
+
406
561
Prop_TrackedDeviceProperty_Max = 1000000,
407
562
};
408
563
···
425
580
TrackedProp_PermissionDenied = 10,
426
581
TrackedProp_InvalidOperation = 11,
427
582
TrackedProp_CannotWriteToWildcards = 12,
583
583
+
TrackedProp_IPCReadFailure = 13,
584
584
+
TrackedProp_OutOfMemory = 14,
585
585
+
TrackedProp_InvalidContainer = 15,
428
586
};
587
587
+
588
588
+
/** Used to drive certain text in the UI when talking about the tracking system for the HMD */
589
589
+
enum EHmdTrackingStyle
590
590
+
{
591
591
+
HmdTrackingStyle_Unknown = 0,
592
592
+
593
593
+
HmdTrackingStyle_Lighthouse = 1, // base stations and lasers
594
594
+
HmdTrackingStyle_OutsideInCameras = 2, // Cameras and LED, Rift 1 style
595
595
+
HmdTrackingStyle_InsideOutCameras = 3, // Cameras on HMD looking at the world
596
596
+
};
597
597
+
598
598
+
typedef uint64_t VRActionHandle_t;
599
599
+
typedef uint64_t VRActionSetHandle_t;
600
600
+
typedef uint64_t VRInputValueHandle_t;
601
601
+
602
602
+
static const VRActionHandle_t k_ulInvalidActionHandle = 0;
603
603
+
static const VRActionSetHandle_t k_ulInvalidActionSetHandle = 0;
604
604
+
static const VRInputValueHandle_t k_ulInvalidInputValueHandle = 0;
605
605
+
429
606
430
607
/** Allows the application to control what part of the provided texture will be used in the
431
608
* frame buffer. */
···
482
659
// Set to indicate that pTexture is a pointer to a VRTextureWithDepth_t.
483
660
// This flag can be combined with Submit_TextureWithPose to pass a VRTextureWithPoseAndDepth_t.
484
661
Submit_TextureWithDepth = 0x10,
662
662
+
663
663
+
// Set to indicate a discontinuity between this and the last frame.
664
664
+
// This will prevent motion smoothing from attempting to extrapolate using the pair.
665
665
+
Submit_FrameDiscontinuty = 0x20,
666
666
+
667
667
+
// Set to indicate that pTexture->handle is a contains VRVulkanTextureArrayData_t
668
668
+
Submit_VulkanTextureWithArrayData = 0x40,
669
669
+
670
670
+
// If the texture pointer passed in is an OpenGL Array texture, set this flag
671
671
+
Submit_GlArrayTexture = 0x80,
672
672
+
673
673
+
// Do not use
674
674
+
Submit_Reserved2 = 0x8000,
675
675
+
676
676
+
485
677
};
486
678
487
679
/** Data required for passing Vulkan textures to IVRCompositor::Submit.
488
488
-
* Be sure to call OpenVR_Shutdown before destroying these resources. */
680
680
+
* Be sure to call OpenVR_Shutdown before destroying these resources.
681
681
+
* Please see https://github.com/ValveSoftware/openvr/wiki/Vulkan for Vulkan-specific documentation */
489
682
struct VRVulkanTextureData_t
490
683
{
491
684
uint64_t m_nImage; // VkImage
···
495
688
VkQueue_T *m_pQueue;
496
689
uint32_t m_nQueueFamilyIndex;
497
690
uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount;
691
691
+
};
692
692
+
693
693
+
/** Data required for passing Vulkan texture arrays to IVRCompositor::Submit.
694
694
+
* Be sure to call OpenVR_Shutdown before destroying these resources.
695
695
+
* Please see https://github.com/ValveSoftware/openvr/wiki/Vulkan for Vulkan-specific documentation */
696
696
+
struct VRVulkanTextureArrayData_t : public VRVulkanTextureData_t
697
697
+
{
698
698
+
uint32_t m_unArrayIndex;
699
699
+
uint32_t m_unArraySize;
498
700
};
499
701
500
702
/** Data required for passing D3D12 textures to IVRCompositor::Submit.
···
545
747
VREvent_ButtonTouch = 202, // data is controller
546
748
VREvent_ButtonUntouch = 203, // data is controller
547
749
548
548
-
VREvent_DualAnalog_Press = 250, // data is dualAnalog
549
549
-
VREvent_DualAnalog_Unpress = 251, // data is dualAnalog
550
550
-
VREvent_DualAnalog_Touch = 252, // data is dualAnalog
551
551
-
VREvent_DualAnalog_Untouch = 253, // data is dualAnalog
552
552
-
VREvent_DualAnalog_Move = 254, // data is dualAnalog
553
553
-
VREvent_DualAnalog_ModeSwitch1 = 255, // data is dualAnalog
554
554
-
VREvent_DualAnalog_ModeSwitch2 = 256, // data is dualAnalog
555
555
-
VREvent_DualAnalog_Cancel = 257, // data is dualAnalog
750
750
+
// VREvent_DualAnalog_Press = 250, // No longer sent
751
751
+
// VREvent_DualAnalog_Unpress = 251, // No longer sent
752
752
+
// VREvent_DualAnalog_Touch = 252, // No longer sent
753
753
+
// VREvent_DualAnalog_Untouch = 253, // No longer sent
754
754
+
// VREvent_DualAnalog_Move = 254, // No longer sent
755
755
+
// VREvent_DualAnalog_ModeSwitch1 = 255, // No longer sent
756
756
+
// VREvent_DualAnalog_ModeSwitch2 = 256, // No longer sent
757
757
+
VREvent_Modal_Cancel = 257, // Sent to overlays with the
556
758
557
759
VREvent_MouseMove = 300, // data is mouse
558
760
VREvent_MouseButtonDown = 301, // data is mouse
559
761
VREvent_MouseButtonUp = 302, // data is mouse
560
762
VREvent_FocusEnter = 303, // data is overlay
561
763
VREvent_FocusLeave = 304, // data is overlay
562
562
-
VREvent_Scroll = 305, // data is mouse
764
764
+
VREvent_ScrollDiscrete = 305, // data is scroll
563
765
VREvent_TouchPadMove = 306, // data is mouse
564
766
VREvent_OverlayFocusChanged = 307, // data is overlay, global event
767
767
+
VREvent_ReloadOverlays = 308,
768
768
+
VREvent_ScrollSmooth = 309, // data is scroll
769
769
+
VREvent_LockMousePosition = 310,
770
770
+
VREvent_UnlockMousePosition = 311,
565
771
566
772
VREvent_InputFocusCaptured = 400, // data is process DEPRECATED
567
773
VREvent_InputFocusReleased = 401, // data is process DEPRECATED
568
568
-
VREvent_SceneFocusLost = 402, // data is process
569
569
-
VREvent_SceneFocusGained = 403, // data is process
774
774
+
// VREvent_SceneFocusLost = 402, // data is process
775
775
+
// VREvent_SceneFocusGained = 403, // data is process
570
776
VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor)
571
777
VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene
572
778
VREvent_InputFocusChanged = 406, // data is process
573
573
-
VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process
779
779
+
// VREvent_SceneApplicationSecondaryRenderingStarted = 407,
574
780
VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, // data is process
575
781
VREvent_ActionBindingReloaded = 409, // data is process - The App that action binds reloaded for
576
782
577
783
VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily
578
784
VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility
579
785
786
786
+
VREvent_SceneApplicationStateChanged = 412, // No data; but query VRApplications()->GetSceneApplicationState();
787
787
+
580
788
VREvent_ConsoleOpened = 420,
581
789
VREvent_ConsoleClosed = 421,
582
790
···
584
792
VREvent_OverlayHidden = 501,
585
793
VREvent_DashboardActivated = 502,
586
794
VREvent_DashboardDeactivated = 503,
587
587
-
VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay
795
795
+
//VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay - No longer sent
588
796
VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay
589
797
VREvent_ResetDashboard = 506, // Send to the overlay manager
590
590
-
VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID
798
798
+
//VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID -- no longer sent
591
799
VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading
592
800
VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it
593
801
VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it
···
611
819
VREvent_PrimaryDashboardDeviceChanged = 525,
612
820
VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled
613
821
VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled
822
822
+
VREvent_ShowUI = 528, // data is showUi
823
823
+
VREvent_ShowDevTools = 529, // data is showDevTools
824
824
+
VREvent_DesktopViewUpdating = 530,
825
825
+
VREvent_DesktopViewReady = 531,
614
826
615
827
VREvent_Notification_Shown = 600,
616
828
VREvent_Notification_Hidden = 601,
···
619
831
620
832
VREvent_Quit = 700, // data is process
621
833
VREvent_ProcessQuit = 701, // data is process
622
622
-
VREvent_QuitAborted_UserPrompt = 702, // data is process
834
834
+
//VREvent_QuitAborted_UserPrompt = 702, // data is process
623
835
VREvent_QuitAcknowledged = 703, // data is process
624
836
VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down
837
837
+
VREvent_RestartRequested = 705, // A driver or other component wants the user to restart SteamVR
625
838
626
626
-
VREvent_ChaperoneDataHasChanged = 800,
839
839
+
VREvent_ChaperoneDataHasChanged = 800, // this will never happen with the new chaperone system
627
840
VREvent_ChaperoneUniverseHasChanged = 801,
628
628
-
VREvent_ChaperoneTempDataHasChanged = 802,
841
841
+
VREvent_ChaperoneTempDataHasChanged = 802, // this will never happen with the new chaperone system
629
842
VREvent_ChaperoneSettingsHaveChanged = 803,
630
843
VREvent_SeatedZeroPoseReset = 804,
844
844
+
VREvent_ChaperoneFlushCache = 805, // Sent when the process needs to reload any cached data it retrieved from VRChaperone()
845
845
+
VREvent_ChaperoneRoomSetupStarting = 806, // Triggered by CVRChaperoneClient::RoomSetupStarting
846
846
+
VREvent_ChaperoneRoomSetupFinished = 807, // Triggered by CVRChaperoneClient::CommitWorkingCopy
847
847
+
VREvent_StandingZeroPoseReset = 808,
631
848
632
849
VREvent_AudioSettingsHaveChanged = 820,
633
850
634
634
-
VREvent_BackgroundSettingHasChanged = 850,
635
635
-
VREvent_CameraSettingsHaveChanged = 851,
636
636
-
VREvent_ReprojectionSettingHasChanged = 852,
637
637
-
VREvent_ModelSkinSettingsHaveChanged = 853,
638
638
-
VREvent_EnvironmentSettingsHaveChanged = 854,
639
639
-
VREvent_PowerSettingsHaveChanged = 855,
640
640
-
VREvent_EnableHomeAppSettingsHaveChanged = 856,
641
641
-
VREvent_SteamVRSectionSettingChanged = 857,
642
642
-
VREvent_LighthouseSectionSettingChanged = 858,
643
643
-
VREvent_NullSectionSettingChanged = 859,
644
644
-
VREvent_UserInterfaceSectionSettingChanged = 860,
645
645
-
VREvent_NotificationsSectionSettingChanged = 861,
646
646
-
VREvent_KeyboardSectionSettingChanged = 862,
647
647
-
VREvent_PerfSectionSettingChanged = 863,
648
648
-
VREvent_DashboardSectionSettingChanged = 864,
649
649
-
VREvent_WebInterfaceSectionSettingChanged = 865,
851
851
+
VREvent_BackgroundSettingHasChanged = 850,
852
852
+
VREvent_CameraSettingsHaveChanged = 851,
853
853
+
VREvent_ReprojectionSettingHasChanged = 852,
854
854
+
VREvent_ModelSkinSettingsHaveChanged = 853,
855
855
+
VREvent_EnvironmentSettingsHaveChanged = 854,
856
856
+
VREvent_PowerSettingsHaveChanged = 855,
857
857
+
VREvent_EnableHomeAppSettingsHaveChanged = 856,
858
858
+
VREvent_SteamVRSectionSettingChanged = 857,
859
859
+
VREvent_LighthouseSectionSettingChanged = 858,
860
860
+
VREvent_NullSectionSettingChanged = 859,
861
861
+
VREvent_UserInterfaceSectionSettingChanged = 860,
862
862
+
VREvent_NotificationsSectionSettingChanged = 861,
863
863
+
VREvent_KeyboardSectionSettingChanged = 862,
864
864
+
VREvent_PerfSectionSettingChanged = 863,
865
865
+
VREvent_DashboardSectionSettingChanged = 864,
866
866
+
VREvent_WebInterfaceSectionSettingChanged = 865,
867
867
+
VREvent_TrackersSectionSettingChanged = 866,
868
868
+
VREvent_LastKnownSectionSettingChanged = 867,
869
869
+
VREvent_DismissedWarningsSectionSettingChanged = 868,
870
870
+
VREvent_GpuSpeedSectionSettingChanged = 869,
871
871
+
VREvent_WindowsMRSectionSettingChanged = 870,
872
872
+
VREvent_OtherSectionSettingChanged = 871,
650
873
651
874
VREvent_StatusUpdate = 900,
652
875
···
661
884
VREvent_KeyboardCharInput = 1201,
662
885
VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard
663
886
664
664
-
VREvent_ApplicationTransitionStarted = 1300,
665
665
-
VREvent_ApplicationTransitionAborted = 1301,
666
666
-
VREvent_ApplicationTransitionNewAppStarted = 1302,
887
887
+
//VREvent_ApplicationTransitionStarted = 1300,
888
888
+
//VREvent_ApplicationTransitionAborted = 1301,
889
889
+
//VREvent_ApplicationTransitionNewAppStarted = 1302,
667
890
VREvent_ApplicationListUpdated = 1303,
668
891
VREvent_ApplicationMimeTypeLoad = 1304,
669
669
-
VREvent_ApplicationTransitionNewAppLaunchComplete = 1305,
892
892
+
// VREvent_ApplicationTransitionNewAppLaunchComplete = 1305,
670
893
VREvent_ProcessConnected = 1306,
671
894
VREvent_ProcessDisconnected = 1307,
672
895
673
673
-
VREvent_Compositor_MirrorWindowShown = 1400,
674
674
-
VREvent_Compositor_MirrorWindowHidden = 1401,
896
896
+
//VREvent_Compositor_MirrorWindowShown = 1400, // DEPRECATED
897
897
+
//VREvent_Compositor_MirrorWindowHidden = 1401, // DEPRECATED
675
898
VREvent_Compositor_ChaperoneBoundsShown = 1410,
676
899
VREvent_Compositor_ChaperoneBoundsHidden = 1411,
900
900
+
VREvent_Compositor_DisplayDisconnected = 1412,
901
901
+
VREvent_Compositor_DisplayReconnected = 1413,
902
902
+
VREvent_Compositor_HDCPError = 1414, // data is hdcpError
903
903
+
VREvent_Compositor_ApplicationNotResponding = 1415,
904
904
+
VREvent_Compositor_ApplicationResumed = 1416,
905
905
+
VREvent_Compositor_OutOfVideoMemory = 1417,
906
906
+
VREvent_Compositor_DisplayModeNotSupported = 1418, // k_pch_SteamVR_PreferredRefreshRate
907
907
+
VREvent_Compositor_StageOverrideReady = 1419,
677
908
678
909
VREvent_TrackedCamera_StartVideoStream = 1500,
679
910
VREvent_TrackedCamera_StopVideoStream = 1501,
···
687
918
688
919
VREvent_MessageOverlay_Closed = 1650,
689
920
VREvent_MessageOverlayCloseRequested = 1651,
690
690
-
921
921
+
691
922
VREvent_Input_HapticVibration = 1700, // data is hapticVibration
923
923
+
VREvent_Input_BindingLoadFailed = 1701, // data is inputBinding
924
924
+
VREvent_Input_BindingLoadSuccessful = 1702, // data is inputBinding
925
925
+
VREvent_Input_ActionManifestReloaded = 1703, // no data
926
926
+
VREvent_Input_ActionManifestLoadFailed = 1704, // data is actionManifest
927
927
+
VREvent_Input_ProgressUpdate = 1705, // data is progressUpdate
928
928
+
VREvent_Input_TrackerActivated = 1706,
929
929
+
VREvent_Input_BindingsUpdated = 1707,
930
930
+
VREvent_Input_BindingSubscriptionChanged = 1708,
931
931
+
932
932
+
VREvent_SpatialAnchors_PoseUpdated = 1800, // data is spatialAnchor. broadcast
933
933
+
VREvent_SpatialAnchors_DescriptorUpdated = 1801, // data is spatialAnchor. broadcast
934
934
+
VREvent_SpatialAnchors_RequestPoseUpdate = 1802, // data is spatialAnchor. sent to specific driver
935
935
+
VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, // data is spatialAnchor. sent to specific driver
936
936
+
937
937
+
VREvent_SystemReport_Started = 1900, // user or system initiated generation of a system report. broadcast
938
938
+
939
939
+
VREvent_Monitor_ShowHeadsetView = 2000, // data is process
940
940
+
VREvent_Monitor_HideHeadsetView = 2001, // data is process
692
941
693
942
// Vendors are free to expose private events in this reserved region
694
943
VREvent_VendorSpecific_Reserved_Start = 10000,
···
702
951
// VREvent_TrackedDeviceUserInteractionStarted fires when the devices transitions from Standby -> UserInteraction or Idle -> UserInteraction.
703
952
// VREvent_TrackedDeviceUserInteractionEnded fires when the devices transitions from UserInteraction_Timeout -> Idle
704
953
enum EDeviceActivityLevel
705
705
-
{
706
706
-
k_EDeviceActivityLevel_Unknown = -1,
954
954
+
{
955
955
+
k_EDeviceActivityLevel_Unknown = -1,
707
956
k_EDeviceActivityLevel_Idle = 0, // No activity for the last 10 seconds
708
708
-
k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now
957
957
+
k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now
709
958
k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds
710
959
k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management)
960
960
+
k_EDeviceActivityLevel_Idle_Timeout = 4,
711
961
};
712
962
713
963
···
722
972
k_EButton_DPad_Right = 5,
723
973
k_EButton_DPad_Down = 6,
724
974
k_EButton_A = 7,
725
725
-
975
975
+
726
976
k_EButton_ProximitySensor = 31,
727
977
728
978
k_EButton_Axis0 = 32,
···
736
986
k_EButton_SteamVR_Trigger = k_EButton_Axis1,
737
987
738
988
k_EButton_Dashboard_Back = k_EButton_Grip,
989
989
+
990
990
+
k_EButton_IndexController_A = k_EButton_Grip,
991
991
+
k_EButton_IndexController_B = k_EButton_ApplicationMenu,
992
992
+
k_EButton_IndexController_JoyStick = k_EButton_Axis3,
739
993
740
994
k_EButton_Max = 64
741
995
};
···
765
1019
uint32_t button; // EVRMouseButton enum
766
1020
};
767
1021
768
768
-
/** used for simulated mouse wheel scroll in overlay space */
1022
1022
+
/** used for simulated mouse wheel scroll */
769
1023
struct VREvent_Scroll_t
770
1024
{
771
771
-
float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe
772
772
-
uint32_t repeatCount;
1025
1025
+
float xdelta, ydelta;
1026
1026
+
uint32_t unused;
1027
1027
+
float viewportscale; // For scrolling on an overlay with laser mouse, this is the overlay's vertical size relative to the overlay height. Range: [0,1]
773
1028
};
774
1029
775
1030
/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger
···
806
1061
uint32_t pid;
807
1062
uint32_t oldPid;
808
1063
bool bForced;
1064
1064
+
// If the associated event was triggered by a connection loss
1065
1065
+
bool bConnectionLost;
809
1066
};
810
1067
811
1068
···
814
1071
{
815
1072
uint64_t overlayHandle;
816
1073
uint64_t devicePath;
1074
1074
+
uint64_t memoryBlockId;
817
1075
};
818
1076
819
1077
···
848
1106
uint64_t reserved1;
849
1107
uint64_t reserved2;
850
1108
uint64_t reserved3;
1109
1109
+
uint64_t reserved4;
1110
1110
+
uint64_t reserved5;
851
1111
};
852
1112
853
1113
struct VREvent_PerformanceTest_t
···
894
1154
ETrackedDeviceProperty prop;
895
1155
};
896
1156
897
897
-
enum EDualAnalogWhich
898
898
-
{
899
899
-
k_EDualAnalog_Left = 0,
900
900
-
k_EDualAnalog_Right = 1,
901
901
-
};
902
902
-
903
903
-
struct VREvent_DualAnalog_t
904
904
-
{
905
905
-
float x, y; // coordinates are -1..1 analog values
906
906
-
float transformedX, transformedY; // transformed by the center and radius numbers provided by the overlay
907
907
-
EDualAnalogWhich which;
908
908
-
};
909
909
-
910
1157
struct VREvent_HapticVibration_t
911
1158
{
912
1159
uint64_t containerHandle; // property container handle of the device with the haptic component
···
921
1168
WebConsoleHandle_t webConsoleHandle;
922
1169
};
923
1170
924
924
-
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
1171
1171
+
struct VREvent_InputBindingLoad_t
1172
1172
+
{
1173
1173
+
vr::PropertyContainerHandle_t ulAppContainer;
1174
1174
+
uint64_t pathMessage;
1175
1175
+
uint64_t pathUrl;
1176
1176
+
uint64_t pathControllerType;
1177
1177
+
};
1178
1178
+
1179
1179
+
struct VREvent_InputActionManifestLoad_t
1180
1180
+
{
1181
1181
+
uint64_t pathAppKey;
1182
1182
+
uint64_t pathMessage;
1183
1183
+
uint64_t pathMessageParam;
1184
1184
+
uint64_t pathManifestPath;
1185
1185
+
};
1186
1186
+
1187
1187
+
struct VREvent_SpatialAnchor_t
1188
1188
+
{
1189
1189
+
SpatialAnchorHandle_t unHandle;
1190
1190
+
};
1191
1191
+
1192
1192
+
struct VREvent_ProgressUpdate_t
1193
1193
+
{
1194
1194
+
uint64_t ulApplicationPropertyContainer;
1195
1195
+
uint64_t pathDevice;
1196
1196
+
uint64_t pathInputSource;
1197
1197
+
uint64_t pathProgressAction;
1198
1198
+
uint64_t pathIcon;
1199
1199
+
float fProgress;
1200
1200
+
};
1201
1201
+
1202
1202
+
enum EShowUIType
1203
1203
+
{
1204
1204
+
ShowUI_ControllerBinding = 0,
1205
1205
+
ShowUI_ManageTrackers = 1,
1206
1206
+
// ShowUI_QuickStart = 2, // Deprecated
1207
1207
+
ShowUI_Pairing = 3,
1208
1208
+
ShowUI_Settings = 4,
1209
1209
+
ShowUI_DebugCommands = 5,
1210
1210
+
ShowUI_FullControllerBinding = 6,
1211
1211
+
ShowUI_ManageDrivers = 7,
1212
1212
+
};
1213
1213
+
1214
1214
+
struct VREvent_ShowUI_t
1215
1215
+
{
1216
1216
+
EShowUIType eType;
1217
1217
+
};
1218
1218
+
1219
1219
+
struct VREvent_ShowDevTools_t
1220
1220
+
{
1221
1221
+
int32_t nBrowserIdentifier;
1222
1222
+
};
1223
1223
+
1224
1224
+
enum EHDCPError
1225
1225
+
{
1226
1226
+
HDCPError_None = 0,
1227
1227
+
HDCPError_LinkLost = 1,
1228
1228
+
HDCPError_Tampered = 2,
1229
1229
+
HDCPError_DeviceRevoked = 3,
1230
1230
+
HDCPError_Unknown = 4
1231
1231
+
};
1232
1232
+
1233
1233
+
struct VREvent_HDCPError_t
1234
1234
+
{
1235
1235
+
EHDCPError eCode;
1236
1236
+
};
1237
1237
+
925
1238
typedef union
926
1239
{
927
1240
VREvent_Reserved_t reserved;
···
944
1257
VREvent_EditingCameraSurface_t cameraSurface;
945
1258
VREvent_MessageOverlay_t messageOverlay;
946
1259
VREvent_Property_t property;
947
947
-
VREvent_DualAnalog_t dualAnalog;
948
1260
VREvent_HapticVibration_t hapticVibration;
949
1261
VREvent_WebConsole_t webConsole;
1262
1262
+
VREvent_InputBindingLoad_t inputBinding;
1263
1263
+
VREvent_InputActionManifestLoad_t actionManifest;
1264
1264
+
VREvent_SpatialAnchor_t spatialAnchor;
1265
1265
+
VREvent_ProgressUpdate_t progressUpdate;
1266
1266
+
VREvent_ShowUI_t showUi;
1267
1267
+
VREvent_ShowDevTools_t showDevTools;
1268
1268
+
VREvent_HDCPError_t hdcpError;
1269
1269
+
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
950
1270
} VREvent_Data_t;
951
1271
952
1272
953
953
-
#if defined(__linux__) || defined(__APPLE__)
954
954
-
// This structure was originally defined mis-packed on Linux, preserved for
955
955
-
// compatibility.
1273
1273
+
#if defined(__linux__) || defined(__APPLE__)
1274
1274
+
// This structure was originally defined mis-packed on Linux, preserved for
1275
1275
+
// compatibility.
956
1276
#pragma pack( push, 4 )
957
1277
#endif
958
1278
···
966
1286
VREvent_Data_t data;
967
1287
};
968
1288
969
969
-
#if defined(__linux__) || defined(__APPLE__)
1289
1289
+
#if defined(__linux__) || defined(__APPLE__)
970
1290
#pragma pack( pop )
971
1291
#endif
972
1292
1293
1293
+
typedef uint32_t VRComponentProperties;
1294
1294
+
1295
1295
+
enum EVRComponentProperty
1296
1296
+
{
1297
1297
+
VRComponentProperty_IsStatic = (1 << 0),
1298
1298
+
VRComponentProperty_IsVisible = (1 << 1),
1299
1299
+
VRComponentProperty_IsTouched = (1 << 2),
1300
1300
+
VRComponentProperty_IsPressed = (1 << 3),
1301
1301
+
VRComponentProperty_IsScrolled = (1 << 4),
1302
1302
+
VRComponentProperty_IsHighlighted = (1 << 5),
1303
1303
+
};
1304
1304
+
1305
1305
+
1306
1306
+
/** Describes state information about a render-model component, including transforms and other dynamic properties */
1307
1307
+
struct RenderModel_ComponentState_t
1308
1308
+
{
1309
1309
+
HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model
1310
1310
+
HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface )
1311
1311
+
VRComponentProperties uProperties;
1312
1312
+
};
1313
1313
+
1314
1314
+
973
1315
enum EVRInputError
974
1316
{
975
1317
VRInputError_None = 0,
···
982
1324
VRInputError_IPCError = 7,
983
1325
VRInputError_NoActiveActionSet = 8,
984
1326
VRInputError_InvalidDevice = 9,
1327
1327
+
VRInputError_InvalidSkeleton = 10,
1328
1328
+
VRInputError_InvalidBoneCount = 11,
1329
1329
+
VRInputError_InvalidCompressedData = 12,
1330
1330
+
VRInputError_NoData = 13,
1331
1331
+
VRInputError_BufferTooSmall = 14,
1332
1332
+
VRInputError_MismatchedActionManifest = 15,
1333
1333
+
VRInputError_MissingSkeletonData = 16,
1334
1334
+
VRInputError_InvalidBoneIndex = 17,
1335
1335
+
VRInputError_InvalidPriority = 18,
1336
1336
+
VRInputError_PermissionDenied = 19,
1337
1337
+
VRInputError_InvalidRenderModel = 20,
985
1338
};
986
1339
1340
1340
+
enum EVRSpatialAnchorError
1341
1341
+
{
1342
1342
+
VRSpatialAnchorError_Success = 0,
1343
1343
+
VRSpatialAnchorError_Internal = 1,
1344
1344
+
VRSpatialAnchorError_UnknownHandle = 2,
1345
1345
+
VRSpatialAnchorError_ArrayTooSmall = 3,
1346
1346
+
VRSpatialAnchorError_InvalidDescriptorChar = 4,
1347
1347
+
VRSpatialAnchorError_NotYetAvailable = 5,
1348
1348
+
VRSpatialAnchorError_NotAvailableInThisUniverse = 6,
1349
1349
+
VRSpatialAnchorError_PermanentlyUnavailable = 7,
1350
1350
+
VRSpatialAnchorError_WrongDriver = 8,
1351
1351
+
VRSpatialAnchorError_DescriptorTooLong = 9,
1352
1352
+
VRSpatialAnchorError_Unknown = 10,
1353
1353
+
VRSpatialAnchorError_NoRoomCalibration = 11,
1354
1354
+
VRSpatialAnchorError_InvalidArgument = 12,
1355
1355
+
VRSpatialAnchorError_UnknownDriver = 13,
1356
1356
+
};
987
1357
988
988
-
/** The mesh to draw into the stencil (or depth) buffer to perform
1358
1358
+
/** The mesh to draw into the stencil (or depth) buffer to perform
989
1359
* early stencil (or depth) kills of pixels that will never appear on the HMD.
990
990
-
* This mesh draws on all the pixels that will be hidden after distortion.
1360
1360
+
* This mesh draws on all the pixels that will be hidden after distortion.
991
1361
*
992
1362
* If the HMD does not provide a visible area mesh pVertexData will be
993
1363
* NULL and unTriangleCount will be 0. */
···
1008
1378
};
1009
1379
1010
1380
1011
1011
-
/** Identifies what kind of axis is on the controller at index n. Read this type
1381
1381
+
/** Identifies what kind of axis is on the controller at index n. Read this type
1012
1382
* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n );
1013
1383
*/
1014
1384
enum EVRControllerAxisType
···
1032
1402
static const uint32_t k_unControllerStateAxisCount = 5;
1033
1403
1034
1404
1035
1035
-
#if defined(__linux__) || defined(__APPLE__)
1036
1036
-
// This structure was originally defined mis-packed on Linux, preserved for
1037
1037
-
// compatibility.
1405
1405
+
#if defined(__linux__) || defined(__APPLE__)
1406
1406
+
// This structure was originally defined mis-packed on Linux, preserved for
1407
1407
+
// compatibility.
1038
1408
#pragma pack( push, 4 )
1039
1409
#endif
1040
1410
1041
1411
/** Holds all the state of a controller at one moment in time. */
1042
1412
struct VRControllerState001_t
1043
1413
{
1044
1044
-
// If packet num matches that on your prior call, then the controller state hasn't been changed since
1414
1414
+
// If packet num matches that on your prior call, then the controller state hasn't been changed since
1045
1415
// your last call and there is no need to process it
1046
1416
uint32_t unPacketNum;
1047
1417
···
1052
1422
// Axis data for the controller's analog inputs
1053
1423
VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ];
1054
1424
};
1055
1055
-
#if defined(__linux__) || defined(__APPLE__)
1425
1425
+
#if defined(__linux__) || defined(__APPLE__)
1056
1426
#pragma pack( pop )
1057
1427
#endif
1058
1428
···
1079
1449
COLLISION_BOUNDS_STYLE_NONE,
1080
1450
1081
1451
COLLISION_BOUNDS_STYLE_COUNT
1082
1082
-
};
1083
1083
-
1084
1084
-
/** Allows the application to customize how the overlay appears in the compositor */
1085
1085
-
struct Compositor_OverlaySettings
1086
1086
-
{
1087
1087
-
uint32_t size; // sizeof(Compositor_OverlaySettings)
1088
1088
-
bool curved, antialias;
1089
1089
-
float scale, distance, alpha;
1090
1090
-
float uOffset, vOffset, uScale, vScale;
1091
1091
-
float gridDivs, gridWidth, gridScale;
1092
1092
-
HmdMatrix44_t transform;
1093
1452
};
1094
1453
1095
1454
/** used to refer to a single VR overlay */
···
1127
1486
VROverlayError_TextureNotLocked = 33,
1128
1487
};
1129
1488
1130
1130
-
/** enum values to pass in to VR_Init to identify whether the application will
1489
1489
+
/** enum values to pass in to VR_Init to identify whether the application will
1131
1490
* draw a 3D scene. */
1132
1491
enum EVRApplicationType
1133
1492
{
1134
1134
-
VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries
1135
1135
-
VRApplication_Scene = 1, // Application will submit 3D frames
1493
1493
+
VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries
1494
1494
+
VRApplication_Scene = 1, // Application will submit 3D frames
1136
1495
VRApplication_Overlay = 2, // Application only interacts with overlays
1137
1496
VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not
1138
1497
// keep it running if everything else quits.
···
1140
1499
// interfaces (like IVRSettings and IVRApplications) but not hardware.
1141
1500
VRApplication_VRMonitor = 5, // Reserved for vrmonitor
1142
1501
VRApplication_SteamWatchdog = 6,// Reserved for Steam
1143
1143
-
VRApplication_Bootstrapper = 7, // Start up SteamVR
1502
1502
+
VRApplication_Bootstrapper = 7, // reserved for vrstartup
1503
1503
+
VRApplication_WebHelper = 8, // reserved for vrwebhelper
1504
1504
+
VRApplication_OpenXRInstance = 9, // reserved for openxr (created instance, but not session yet)
1505
1505
+
VRApplication_OpenXRScene = 10, // reserved for openxr (started session)
1506
1506
+
VRApplication_OpenXROverlay = 11, // reserved for openxr (started overlay session)
1507
1507
+
VRApplication_Prism = 12, // reserved for the vrprismhost process
1144
1508
1145
1509
VRApplication_Max
1146
1510
};
1147
1511
1148
1512
1513
1513
+
/** returns true if the specified application type is one of the
1514
1514
+
* OpenXR types */
1515
1515
+
inline bool IsOpenXRAppType( EVRApplicationType eType )
1516
1516
+
{
1517
1517
+
return eType == VRApplication_OpenXRInstance
1518
1518
+
|| eType == VRApplication_OpenXRScene
1519
1519
+
|| eType == VRApplication_OpenXROverlay;
1520
1520
+
}
1521
1521
+
1522
1522
+
1149
1523
/** error codes for firmware */
1150
1524
enum EVRFirmwareError
1151
1525
{
···
1166
1540
};
1167
1541
1168
1542
1543
1543
+
enum EVRSkeletalMotionRange
1544
1544
+
{
1545
1545
+
// The range of motion of the skeleton takes into account any physical limits imposed by
1546
1546
+
// the controller itself. This will tend to be the most accurate pose compared to the user's
1547
1547
+
// actual hand pose, but might not allow a closed fist for example
1548
1548
+
VRSkeletalMotionRange_WithController = 0,
1549
1549
+
1550
1550
+
// Retarget the range of motion provided by the input device to make the hand appear to move
1551
1551
+
// as if it was not holding a controller. eg: map "hand grasping controller" to "closed fist"
1552
1552
+
VRSkeletalMotionRange_WithoutController = 1,
1553
1553
+
};
1554
1554
+
1555
1555
+
enum EVRSkeletalTrackingLevel
1556
1556
+
{
1557
1557
+
// body part location can't be directly determined by the device. Any skeletal pose provided by
1558
1558
+
// the device is estimated by assuming the position required to active buttons, triggers, joysticks,
1559
1559
+
// or other input sensors.
1560
1560
+
// E.g. Vive Controller, Gamepad
1561
1561
+
VRSkeletalTracking_Estimated = 0,
1562
1562
+
1563
1563
+
// body part location can be measured directly but with fewer degrees of freedom than the actual body
1564
1564
+
// part. Certain body part positions may be unmeasured by the device and estimated from other input data.
1565
1565
+
// E.g. Index Controllers, gloves that only measure finger curl
1566
1566
+
VRSkeletalTracking_Partial = 1,
1567
1567
+
1568
1568
+
// Body part location can be measured directly throughout the entire range of motion of the body part.
1569
1569
+
// E.g. Mocap suit for the full body, gloves that measure rotation of each finger segment
1570
1570
+
VRSkeletalTracking_Full = 2,
1571
1571
+
1572
1572
+
VRSkeletalTrackingLevel_Count,
1573
1573
+
VRSkeletalTrackingLevel_Max = VRSkeletalTrackingLevel_Count - 1
1574
1574
+
};
1575
1575
+
1576
1576
+
1577
1577
+
/** Type used for referring to bones by their index */
1578
1578
+
typedef int32_t BoneIndex_t;
1579
1579
+
const BoneIndex_t k_unInvalidBoneIndex = -1;
1580
1580
+
1581
1581
+
1169
1582
/** error codes returned by Vr_Init */
1170
1583
1171
1584
// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp
···
1191
1604
VRInitError_Init_AppInfoInitFailed = 114,
1192
1605
VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver
1193
1606
VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup
1194
1194
-
VRInitError_Init_AnotherAppLaunching = 117,
1195
1195
-
VRInitError_Init_SettingsInitFailed = 118,
1607
1607
+
VRInitError_Init_AnotherAppLaunching = 117,
1608
1608
+
VRInitError_Init_SettingsInitFailed = 118,
1196
1609
VRInitError_Init_ShuttingDown = 119,
1197
1610
VRInitError_Init_TooManyObjects = 120,
1198
1611
VRInitError_Init_NoServerForBackgroundApp = 121,
···
1203
1616
VRInitError_Init_HmdNotFoundPresenceFailed = 126,
1204
1617
VRInitError_Init_VRMonitorNotFound = 127,
1205
1618
VRInitError_Init_VRMonitorStartupFailed = 128,
1206
1206
-
VRInitError_Init_LowPowerWatchdogNotSupported = 129,
1619
1619
+
VRInitError_Init_LowPowerWatchdogNotSupported = 129,
1207
1620
VRInitError_Init_InvalidApplicationType = 130,
1208
1621
VRInitError_Init_NotAvailableToWatchdogApps = 131,
1209
1622
VRInitError_Init_WatchdogDisabledInSettings = 132,
···
1216
1629
VRInitError_Init_FirmwareRecoveryBusy = 139,
1217
1630
VRInitError_Init_USBServiceBusy = 140,
1218
1631
VRInitError_Init_VRWebHelperStartupFailed = 141,
1632
1632
+
VRInitError_Init_TrackerManagerInitFailed = 142,
1633
1633
+
VRInitError_Init_AlreadyRunning = 143,
1634
1634
+
VRInitError_Init_FailedForVrMonitor = 144,
1635
1635
+
VRInitError_Init_PropertyManagerInitFailed = 145,
1636
1636
+
VRInitError_Init_WebServerFailed = 146,
1637
1637
+
VRInitError_Init_IllegalTypeTransition = 147,
1638
1638
+
VRInitError_Init_MismatchedRuntimes = 148,
1639
1639
+
VRInitError_Init_InvalidProcessId = 149,
1640
1640
+
VRInitError_Init_VRServiceStartupFailed = 150,
1641
1641
+
VRInitError_Init_PrismNeedsNewDrivers = 151,
1642
1642
+
VRInitError_Init_PrismStartupTimedOut = 152,
1643
1643
+
VRInitError_Init_CouldNotStartPrism = 153,
1644
1644
+
VRInitError_Init_CreateDriverDirectDeviceFailed = 154,
1645
1645
+
VRInitError_Init_PrismExitedUnexpectedly = 155,
1219
1646
1220
1647
VRInitError_Driver_Failed = 200,
1221
1648
VRInitError_Driver_Unknown = 201,
···
1230
1657
// VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons
1231
1658
VRInitError_Driver_HmdDriverIdOutOfBounds = 211,
1232
1659
VRInitError_Driver_HmdDisplayMirrored = 212,
1660
1660
+
VRInitError_Driver_HmdDisplayNotFoundLaptop = 213,
1661
1661
+
// Never make error 259 because we return it from main and it would conflict with STILL_ACTIVE
1233
1662
1234
1663
VRInitError_IPC_ServerInitFailed = 300,
1235
1664
VRInitError_IPC_ConnectFailed = 301,
···
1240
1669
VRInitError_IPC_CompositorConnectFailed = 306,
1241
1670
VRInitError_IPC_CompositorInvalidConnectResponse = 307,
1242
1671
VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308,
1672
1672
+
VRInitError_IPC_ConnectFailedAfterTargetExited = 309,
1673
1673
+
VRInitError_IPC_NamespaceUnavailable = 310,
1243
1674
1244
1244
-
VRInitError_Compositor_Failed = 400,
1245
1245
-
VRInitError_Compositor_D3D11HardwareRequired = 401,
1246
1246
-
VRInitError_Compositor_FirmwareRequiresUpdate = 402,
1247
1247
-
VRInitError_Compositor_OverlayInitFailed = 403,
1248
1248
-
VRInitError_Compositor_ScreenshotsInitFailed = 404,
1249
1249
-
VRInitError_Compositor_UnableToCreateDevice = 405,
1675
1675
+
VRInitError_Compositor_Failed = 400,
1676
1676
+
VRInitError_Compositor_D3D11HardwareRequired = 401,
1677
1677
+
VRInitError_Compositor_FirmwareRequiresUpdate = 402,
1678
1678
+
VRInitError_Compositor_OverlayInitFailed = 403,
1679
1679
+
VRInitError_Compositor_ScreenshotsInitFailed = 404,
1680
1680
+
VRInitError_Compositor_UnableToCreateDevice = 405,
1681
1681
+
VRInitError_Compositor_SharedStateIsNull = 406,
1682
1682
+
VRInitError_Compositor_NotificationManagerIsNull = 407,
1683
1683
+
VRInitError_Compositor_ResourceManagerClientIsNull = 408,
1684
1684
+
VRInitError_Compositor_MessageOverlaySharedStateInitFailure = 409,
1685
1685
+
VRInitError_Compositor_PropertiesInterfaceIsNull = 410,
1686
1686
+
VRInitError_Compositor_CreateFullscreenWindowFailed = 411,
1687
1687
+
VRInitError_Compositor_SettingsInterfaceIsNull = 412,
1688
1688
+
VRInitError_Compositor_FailedToShowWindow = 413,
1689
1689
+
VRInitError_Compositor_DistortInterfaceIsNull = 414,
1690
1690
+
VRInitError_Compositor_DisplayFrequencyFailure = 415,
1691
1691
+
VRInitError_Compositor_RendererInitializationFailed = 416,
1692
1692
+
VRInitError_Compositor_DXGIFactoryInterfaceIsNull = 417,
1693
1693
+
VRInitError_Compositor_DXGIFactoryCreateFailed = 418,
1694
1694
+
VRInitError_Compositor_DXGIFactoryQueryFailed = 419,
1695
1695
+
VRInitError_Compositor_InvalidAdapterDesktop = 420,
1696
1696
+
VRInitError_Compositor_InvalidHmdAttachment = 421,
1697
1697
+
VRInitError_Compositor_InvalidOutputDesktop = 422,
1698
1698
+
VRInitError_Compositor_InvalidDeviceProvided = 423,
1699
1699
+
VRInitError_Compositor_D3D11RendererInitializationFailed = 424,
1700
1700
+
VRInitError_Compositor_FailedToFindDisplayMode = 425,
1701
1701
+
VRInitError_Compositor_FailedToCreateSwapChain = 426,
1702
1702
+
VRInitError_Compositor_FailedToGetBackBuffer = 427,
1703
1703
+
VRInitError_Compositor_FailedToCreateRenderTarget = 428,
1704
1704
+
VRInitError_Compositor_FailedToCreateDXGI2SwapChain = 429,
1705
1705
+
VRInitError_Compositor_FailedtoGetDXGI2BackBuffer = 430,
1706
1706
+
VRInitError_Compositor_FailedToCreateDXGI2RenderTarget = 431,
1707
1707
+
VRInitError_Compositor_FailedToGetDXGIDeviceInterface = 432,
1708
1708
+
VRInitError_Compositor_SelectDisplayMode = 433,
1709
1709
+
VRInitError_Compositor_FailedToCreateNvAPIRenderTargets = 434,
1710
1710
+
VRInitError_Compositor_NvAPISetDisplayMode = 435,
1711
1711
+
VRInitError_Compositor_FailedToCreateDirectModeDisplay = 436,
1712
1712
+
VRInitError_Compositor_InvalidHmdPropertyContainer = 437,
1713
1713
+
VRInitError_Compositor_UpdateDisplayFrequency = 438,
1714
1714
+
VRInitError_Compositor_CreateRasterizerState = 439,
1715
1715
+
VRInitError_Compositor_CreateWireframeRasterizerState = 440,
1716
1716
+
VRInitError_Compositor_CreateSamplerState = 441,
1717
1717
+
VRInitError_Compositor_CreateClampToBorderSamplerState = 442,
1718
1718
+
VRInitError_Compositor_CreateAnisoSamplerState = 443,
1719
1719
+
VRInitError_Compositor_CreateOverlaySamplerState = 444,
1720
1720
+
VRInitError_Compositor_CreatePanoramaSamplerState = 445,
1721
1721
+
VRInitError_Compositor_CreateFontSamplerState = 446,
1722
1722
+
VRInitError_Compositor_CreateNoBlendState = 447,
1723
1723
+
VRInitError_Compositor_CreateBlendState = 448,
1724
1724
+
VRInitError_Compositor_CreateAlphaBlendState = 449,
1725
1725
+
VRInitError_Compositor_CreateBlendStateMaskR = 450,
1726
1726
+
VRInitError_Compositor_CreateBlendStateMaskG = 451,
1727
1727
+
VRInitError_Compositor_CreateBlendStateMaskB = 452,
1728
1728
+
VRInitError_Compositor_CreateDepthStencilState = 453,
1729
1729
+
VRInitError_Compositor_CreateDepthStencilStateNoWrite = 454,
1730
1730
+
VRInitError_Compositor_CreateDepthStencilStateNoDepth = 455,
1731
1731
+
VRInitError_Compositor_CreateFlushTexture = 456,
1732
1732
+
VRInitError_Compositor_CreateDistortionSurfaces = 457,
1733
1733
+
VRInitError_Compositor_CreateConstantBuffer = 458,
1734
1734
+
VRInitError_Compositor_CreateHmdPoseConstantBuffer = 459,
1735
1735
+
VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer = 460,
1736
1736
+
VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer = 461,
1737
1737
+
VRInitError_Compositor_CreateOverlayConstantBuffer = 462,
1738
1738
+
VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer = 463,
1739
1739
+
VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer = 464,
1740
1740
+
VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer = 465,
1741
1741
+
VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer = 466,
1742
1742
+
VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer = 467,
1743
1743
+
VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer = 468,
1744
1744
+
VRInitError_Compositor_CreateGeomConstantBuffer = 469,
1745
1745
+
VRInitError_Compositor_CreatePanelMaskConstantBuffer = 470,
1746
1746
+
VRInitError_Compositor_CreatePixelSimUBO = 471,
1747
1747
+
VRInitError_Compositor_CreateMSAARenderTextures = 472,
1748
1748
+
VRInitError_Compositor_CreateResolveRenderTextures = 473,
1749
1749
+
VRInitError_Compositor_CreateComputeResolveRenderTextures = 474,
1750
1750
+
VRInitError_Compositor_CreateDriverDirectModeResolveTextures = 475,
1751
1751
+
VRInitError_Compositor_OpenDriverDirectModeResolveTextures = 476,
1752
1752
+
VRInitError_Compositor_CreateFallbackSyncTexture = 477,
1753
1753
+
VRInitError_Compositor_ShareFallbackSyncTexture = 478,
1754
1754
+
VRInitError_Compositor_CreateOverlayIndexBuffer = 479,
1755
1755
+
VRInitError_Compositor_CreateOverlayVertexBuffer = 480,
1756
1756
+
VRInitError_Compositor_CreateTextVertexBuffer = 481,
1757
1757
+
VRInitError_Compositor_CreateTextIndexBuffer = 482,
1758
1758
+
VRInitError_Compositor_CreateMirrorTextures = 483,
1759
1759
+
VRInitError_Compositor_CreateLastFrameRenderTexture = 484,
1760
1760
+
VRInitError_Compositor_CreateMirrorOverlay = 485,
1761
1761
+
VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486,
1762
1762
+
VRInitError_Compositor_DisplayModeNotSupported = 487,
1763
1763
+
VRInitError_Compositor_CreateOverlayInvalidCall = 488,
1764
1764
+
VRInitError_Compositor_CreateOverlayAlreadyInitialized = 489,
1765
1765
+
VRInitError_Compositor_FailedToCreateMailbox = 490,
1766
1766
+
VRInitError_Compositor_WindowInterfaceIsNull = 491,
1767
1767
+
VRInitError_Compositor_SystemLayerCreateInstance = 492,
1768
1768
+
VRInitError_Compositor_SystemLayerCreateSession = 493,
1250
1769
1251
1770
VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
1252
1771
VRInitError_VendorSpecific_WindowsNotInDevMode = 1001,
···
1264
1783
VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111,
1265
1784
VRInitError_VendorSpecific_HmdFound_UserDataError = 1112,
1266
1785
VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
1786
1786
+
VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114,
1267
1787
1268
1788
VRInitError_Steam_SteamInstallationNotFound = 2000,
1789
1789
+
1790
1790
+
// Strictly a placeholder
1791
1791
+
VRInitError_LastError
1269
1792
};
1270
1793
1271
1794
enum EVRScreenshotType
···
1288
1811
{
1289
1812
VRTrackedCameraError_None = 0,
1290
1813
VRTrackedCameraError_OperationFailed = 100,
1291
1291
-
VRTrackedCameraError_InvalidHandle = 101,
1814
1814
+
VRTrackedCameraError_InvalidHandle = 101,
1292
1815
VRTrackedCameraError_InvalidFrameHeaderVersion = 102,
1293
1816
VRTrackedCameraError_OutOfHandles = 103,
1294
1817
VRTrackedCameraError_IPCFailure = 104,
···
1312
1835
EVRTrackedCameraFrameLayout_VerticalLayout = 0x0010, // Stereo frames are Top/Bottom (left/right)
1313
1836
EVRTrackedCameraFrameLayout_HorizontalLayout = 0x0020, // Stereo frames are Left/Right
1314
1837
};
1315
1315
-
1838
1838
+
1316
1839
enum EVRTrackedCameraFrameType
1317
1840
{
1318
1841
VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted.
···
1321
1844
MAX_CAMERA_FRAME_TYPES
1322
1845
};
1323
1846
1847
1847
+
enum EVRDistortionFunctionType
1848
1848
+
{
1849
1849
+
VRDistortionFunctionType_None,
1850
1850
+
VRDistortionFunctionType_FTheta,
1851
1851
+
VRDistortionFunctionType_Extended_FTheta,
1852
1852
+
MAX_DISTORTION_FUNCTION_TYPES,
1853
1853
+
};
1854
1854
+
1855
1855
+
static const uint32_t k_unMaxDistortionFunctionParameters = 8;
1856
1856
+
1324
1857
typedef uint64_t TrackedCameraHandle_t;
1325
1858
#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0)
1326
1859
···
1334
1867
1335
1868
uint32_t nFrameSequence;
1336
1869
1337
1337
-
TrackedDevicePose_t standingTrackedDevicePose;
1870
1870
+
TrackedDevicePose_t trackedDevicePose;
1871
1871
+
1872
1872
+
uint64_t ulFrameExposureTime; // mid-point of the exposure of the image in host system ticks
1338
1873
};
1339
1874
1340
1875
// Screenshot types
···
1342
1877
1343
1878
static const uint32_t k_unScreenshotHandleInvalid = 0;
1344
1879
1880
1880
+
/** Compositor frame timing reprojection flags. */
1881
1881
+
const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01;
1882
1882
+
const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02;
1883
1883
+
const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active,
1884
1884
+
// but does not indicate if reprojection actually happened or not.
1885
1885
+
// Use the ReprojectionReason flags above to check if reprojection
1886
1886
+
// was actually applied (i.e. scene texture was reused).
1887
1887
+
// NumFramePresents > 1 also indicates the scene texture was reused,
1888
1888
+
// and also the number of times that it was presented in total.
1889
1889
+
1890
1890
+
const uint32_t VRCompositor_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame
1891
1891
+
1892
1892
+
const uint32_t VRCompositor_PredictionMask = 0xF0; // The runtime may predict more than one frame (up to four) ahead if
1893
1893
+
// it detects the application is taking too long to render. These two
1894
1894
+
// bits will contain the count of additional frames (normally zero).
1895
1895
+
// Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from
1896
1896
+
// the latest frame timing entry.
1897
1897
+
1898
1898
+
const uint32_t VRCompositor_ThrottleMask = 0xF00; // Number of frames the compositor is throttling the application.
1899
1899
+
// Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from
1900
1900
+
// the latest frame timing entry.
1901
1901
+
1902
1902
+
#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 )
1903
1903
+
#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 8 )
1904
1904
+
1905
1905
+
/** Provides a single frame's timing information to the app */
1906
1906
+
struct Compositor_FrameTiming
1907
1907
+
{
1908
1908
+
uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming )
1909
1909
+
uint32_t m_nFrameIndex;
1910
1910
+
uint32_t m_nNumFramePresents; // number of times this frame was presented
1911
1911
+
uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to
1912
1912
+
uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out
1913
1913
+
uint32_t m_nReprojectionFlags;
1914
1914
+
1915
1915
+
/** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */
1916
1916
+
double m_flSystemTimeInSeconds;
1917
1917
+
1918
1918
+
/** These times may include work from other processes due to OS scheduling.
1919
1919
+
* The fewer packets of work these are broken up into, the less likely this will happen.
1920
1920
+
* GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started
1921
1921
+
* processing that work earlier in the frame. */
1922
1922
+
float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit)
1923
1923
+
float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window)
1924
1924
+
float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work
1925
1925
+
float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc.
1926
1926
+
float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame
1927
1927
+
float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time)
1928
1928
+
1929
1929
+
/** Miscellaneous measured intervals. */
1930
1930
+
float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses
1931
1931
+
float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long)
1932
1932
+
float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure)
1933
1933
+
float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue)
1934
1934
+
1935
1935
+
/** The following are all relative to this frame's SystemTimeInSeconds */
1936
1936
+
float m_flWaitGetPosesCalledMs;
1937
1937
+
float m_flNewPosesReadyMs;
1938
1938
+
float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit
1939
1939
+
float m_flCompositorUpdateStartMs;
1940
1940
+
float m_flCompositorUpdateEndMs;
1941
1941
+
float m_flCompositorRenderStartMs;
1942
1942
+
1943
1943
+
vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame
1944
1944
+
1945
1945
+
uint32_t m_nNumVSyncsReadyForUse;
1946
1946
+
uint32_t m_nNumVSyncsToFirstView;
1947
1947
+
};
1948
1948
+
1949
1949
+
/** Provides compositor benchmark results to the app */
1950
1950
+
struct Compositor_BenchmarkResults
1951
1951
+
{
1952
1952
+
float m_flMegaPixelsPerSecond; // Measurement of GPU MP/s performed by compositor benchmark
1953
1953
+
float m_flHmdRecommendedMegaPixelsPerSecond; // Recommended default MP/s given the HMD resolution, refresh, and panel mask.
1954
1954
+
};
1955
1955
+
1345
1956
/** Frame timing data provided by direct mode drivers. */
1346
1957
struct DriverDirectMode_FrameTiming
1347
1958
{
···
1351
1962
uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out (i.e. compositor missed vsync)
1352
1963
uint32_t m_nReprojectionFlags;
1353
1964
};
1965
1965
+
1966
1966
+
/** These flags will be set on DriverDirectMode_FrameTiming::m_nReprojectionFlags when IVRDriverDirectModeComponent::GetFrameTiming is called for drivers to optionally respond to. */
1967
1967
+
const uint32_t VRCompositor_ReprojectionMotion_Enabled = 0x100; // Motion Smoothing is enabled in the UI for the currently running application
1968
1968
+
const uint32_t VRCompositor_ReprojectionMotion_ForcedOn = 0x200; // Motion Smoothing is forced on in the UI for the currently running application
1969
1969
+
const uint32_t VRCompositor_ReprojectionMotion_AppThrottled = 0x400; // Application is requesting throttling via ForceInterleavedReprojectionOn
1970
1970
+
1354
1971
1355
1972
enum EVSync
1356
1973
{
···
1359
1976
VSync_NoWaitRender, // do not block following render work (allow to get started early)
1360
1977
};
1361
1978
1979
1979
+
enum EVRMuraCorrectionMode
1980
1980
+
{
1981
1981
+
EVRMuraCorrectionMode_Default = 0,
1982
1982
+
EVRMuraCorrectionMode_NoCorrection
1983
1983
+
};
1984
1984
+
1985
1985
+
/** raw IMU data provided by IVRIOBuffer from paths to tracked devices with IMUs */
1986
1986
+
enum Imu_OffScaleFlags
1987
1987
+
{
1988
1988
+
OffScale_AccelX = 0x01,
1989
1989
+
OffScale_AccelY = 0x02,
1990
1990
+
OffScale_AccelZ = 0x04,
1991
1991
+
OffScale_GyroX = 0x08,
1992
1992
+
OffScale_GyroY = 0x10,
1993
1993
+
OffScale_GyroZ = 0x20,
1994
1994
+
};
1995
1995
+
1996
1996
+
struct ImuSample_t
1997
1997
+
{
1998
1998
+
double fSampleTime;
1999
1999
+
HmdVector3d_t vAccel;
2000
2000
+
HmdVector3d_t vGyro;
2001
2001
+
uint32_t unOffScaleFlags;
2002
2002
+
};
2003
2003
+
1362
2004
#pragma pack( pop )
1363
2005
1364
2006
// figure out how to import from the VR API dll
1365
2007
#if defined(_WIN32)
1366
2008
1367
1367
-
#ifdef VR_API_EXPORT
1368
1368
-
#define VR_INTERFACE extern "C" __declspec( dllexport )
1369
1369
-
#else
1370
1370
-
#define VR_INTERFACE extern "C" __declspec( dllimport )
1371
1371
-
#endif
2009
2009
+
#if !defined(OPENVR_BUILD_STATIC)
2010
2010
+
#ifdef VR_API_EXPORT
2011
2011
+
#define VR_INTERFACE extern "C" __declspec( dllexport )
2012
2012
+
#else
2013
2013
+
#define VR_INTERFACE extern "C" __declspec( dllimport )
2014
2014
+
#endif
2015
2015
+
#else
2016
2016
+
#define VR_INTERFACE extern "C"
2017
2017
+
#endif
1372
2018
1373
2019
#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__)
1374
2020
1375
2021
#ifdef VR_API_EXPORT
1376
1376
-
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
2022
2022
+
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
1377
2023
#else
1378
1378
-
#define VR_INTERFACE extern "C"
2024
2024
+
#define VR_INTERFACE extern "C"
1379
2025
#endif
1380
2026
1381
2027
#else
1382
1382
-
#error "Unsupported Platform."
2028
2028
+
#error "Unsupported Platform."
1383
2029
#endif
1384
2030
1385
2031
1386
2032
#if defined( _WIN32 )
1387
1387
-
#define VR_CALLTYPE __cdecl
2033
2033
+
#define VR_CALLTYPE __cdecl
1388
2034
#else
1389
1389
-
#define VR_CALLTYPE
2035
2035
+
#define VR_CALLTYPE
1390
2036
#endif
1391
2037
1392
2038
} // namespace vr
1393
1393
-
1394
2039
#endif // _INCLUDE_VRTYPES_H
1395
1395
-
1396
2040
1397
2041
// vrannotation.h
2042
2042
+
1398
2043
#ifdef API_GEN
1399
2044
# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
1400
2045
#else
···
1414
2059
#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" )
1415
2060
1416
2061
// vrtrackedcameratypes.h
2062
2062
+
1417
2063
#ifndef _VRTRACKEDCAMERATYPES_H
1418
1418
-
#define _VRTRACKEDCAMERATYPES_H
2064
2064
+
#define _VRTRACKEDCAMERATYPES_H
1419
2065
1420
2066
namespace vr
1421
2067
{
···
1429
2075
CVS_FORMAT_NV12 = 2, // 12 bits per pixel
1430
2076
CVS_FORMAT_RGB24 = 3, // 24 bits per pixel
1431
2077
CVS_FORMAT_NV12_2 = 4, // 12 bits per pixel, 2x height
2078
2078
+
CVS_FORMAT_YUYV16 = 5, // 16 bits per pixel
2079
2079
+
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
2080
2080
+
CVS_FORMAT_MJPEG = 7, // variable-sized MJPEG Open DML format, see https://www.loc.gov/preservation/digital/formats/fdd/fdd000063.shtml
1432
2081
CVS_MAX_FORMATS
1433
2082
};
1434
2083
1435
2084
enum ECameraCompatibilityMode
1436
2085
{
1437
2086
CAMERA_COMPAT_MODE_BULK_DEFAULT = 0,
1438
1438
-
CAMERA_COMPAT_MODE_BULK_64K_DMA,
1439
1439
-
CAMERA_COMPAT_MODE_BULK_16K_DMA,
1440
1440
-
CAMERA_COMPAT_MODE_BULK_8K_DMA,
1441
1441
-
CAMERA_COMPAT_MODE_ISO_52FPS,
1442
1442
-
CAMERA_COMPAT_MODE_ISO_50FPS,
1443
1443
-
CAMERA_COMPAT_MODE_ISO_48FPS,
1444
1444
-
CAMERA_COMPAT_MODE_ISO_46FPS,
1445
1445
-
CAMERA_COMPAT_MODE_ISO_44FPS,
1446
1446
-
CAMERA_COMPAT_MODE_ISO_42FPS,
1447
1447
-
CAMERA_COMPAT_MODE_ISO_40FPS,
1448
1448
-
CAMERA_COMPAT_MODE_ISO_35FPS,
1449
1449
-
CAMERA_COMPAT_MODE_ISO_30FPS,
2087
2087
+
CAMERA_COMPAT_MODE_BULK_64K_DMA = 1,
2088
2088
+
CAMERA_COMPAT_MODE_BULK_16K_DMA = 2,
2089
2089
+
CAMERA_COMPAT_MODE_BULK_8K_DMA = 3,
2090
2090
+
CAMERA_COMPAT_MODE_ISO_52FPS = 4,
2091
2091
+
CAMERA_COMPAT_MODE_ISO_50FPS = 5,
2092
2092
+
CAMERA_COMPAT_MODE_ISO_48FPS = 6,
2093
2093
+
CAMERA_COMPAT_MODE_ISO_46FPS = 7,
2094
2094
+
CAMERA_COMPAT_MODE_ISO_44FPS = 8,
2095
2095
+
CAMERA_COMPAT_MODE_ISO_42FPS = 9,
2096
2096
+
CAMERA_COMPAT_MODE_ISO_40FPS = 10,
2097
2097
+
CAMERA_COMPAT_MODE_ISO_35FPS = 11,
2098
2098
+
CAMERA_COMPAT_MODE_ISO_30FPS = 12,
2099
2099
+
CAMERA_COMPAT_MODE_ISO_15FPS = 13,
1450
2100
MAX_CAMERA_COMPAT_MODES
1451
2101
};
1452
2102
1453
1453
-
enum ETrackedCameraRoomViewMode
2103
2103
+
enum ECameraRoomViewStyle
1454
2104
{
1455
1455
-
TRACKED_CAMERA_ROOMVIEW_MODE_DEFAULT = 0,
1456
1456
-
TRACKED_CAMERA_ROOMVIEW_MODE_EDGE_A,
1457
1457
-
TRACKED_CAMERA_ROOMVIEW_MODE_EDGE_B,
1458
1458
-
TRACKED_CAMERA_ROOMVIEW_MODE_VIDEO_TRANSLUSCENT,
1459
1459
-
TRACKED_CAMERA_ROOMVIEW_MODE_VIDEO_OPAQUE,
1460
1460
-
TRACKED_CAMERA_ROOMVIEW_MODE_COUNT,
2105
2105
+
CAMERA_ROOMVIEW_STYLE_DEFAULT = 0,
2106
2106
+
CAMERA_ROOMVIEW_STYLE_EDGE_A = 1,
2107
2107
+
CAMERA_ROOMVIEW_STYLE_EDGE_B = 2,
2108
2108
+
CAMERA_ROOMVIEW_STYLE_VIDEO_TRANSLUSCENT = 3,
2109
2109
+
CAMERA_ROOMVIEW_STYLE_VIDEO_OPAQUE = 4,
2110
2110
+
CAMERA_ROOMVIEW_STYLE_COUNT = 5,
1461
2111
};
1462
2112
1463
2113
#ifdef _MSC_VER
···
1466
2116
#define VR_CAMERA_DECL_ALIGN( x ) //
1467
2117
#endif
1468
2118
1469
1469
-
#define MAX_CAMERA_FRAME_SHARED_HANDLES 4
2119
2119
+
static const uint32_t k_unMaxCameras = 4;
2120
2120
+
static const uint32_t k_unMaxCameraFrameSharedHandles = 4;
1470
2121
1471
2122
VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t
1472
2123
{
···
1503
2154
1504
2155
double m_flSyncMarkerError;
1505
2156
1506
1506
-
TrackedDevicePose_t m_StandingTrackedDevicePose; // Supplied by HMD layer when used as a tracked camera
2157
2157
+
TrackedDevicePose_t m_RawTrackedDevicePose; // Raw-and-uncalibrated pose, supplied by HMD layer when used as a tracked camera
1507
2158
1508
2159
uint64_t m_pImageData;
1509
2160
};
···
1513
2164
}
1514
2165
1515
2166
#endif // _VRTRACKEDCAMERATYPES_H
2167
2167
+
1516
2168
// ivrsettings.h
2169
2169
+
2170
2170
+
#include <string>
2171
2171
+
1517
2172
namespace vr
1518
2173
{
1519
2174
enum EVRSettingsError
···
1533
2188
{
1534
2189
public:
1535
2190
virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0;
1536
1536
-
1537
1537
-
// Returns true if file sync occurred (force or settings dirty)
1538
1538
-
virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0;
1539
2191
1540
2192
virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0;
1541
2193
virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
···
1554
2206
};
1555
2207
1556
2208
//-----------------------------------------------------------------------------
1557
1557
-
static const char * const IVRSettings_Version = "IVRSettings_002";
2209
2209
+
static const char * const IVRSettings_Version = "IVRSettings_003";
2210
2210
+
2211
2211
+
class CVRSettingHelper
2212
2212
+
{
2213
2213
+
IVRSettings *m_pSettings;
2214
2214
+
public:
2215
2215
+
CVRSettingHelper( IVRSettings *pSettings )
2216
2216
+
{
2217
2217
+
m_pSettings = pSettings;
2218
2218
+
}
2219
2219
+
2220
2220
+
const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError )
2221
2221
+
{
2222
2222
+
return m_pSettings->GetSettingsErrorNameFromEnum( eError );
2223
2223
+
}
2224
2224
+
2225
2225
+
void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr )
2226
2226
+
{
2227
2227
+
m_pSettings->SetBool( pchSection, pchSettingsKey, bValue, peError );
2228
2228
+
}
2229
2229
+
2230
2230
+
void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr )
2231
2231
+
{
2232
2232
+
m_pSettings->SetInt32( pchSection, pchSettingsKey, nValue, peError );
2233
2233
+
}
2234
2234
+
void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr )
2235
2235
+
{
2236
2236
+
m_pSettings->SetFloat( pchSection, pchSettingsKey, flValue, peError );
2237
2237
+
}
2238
2238
+
void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr )
2239
2239
+
{
2240
2240
+
m_pSettings->SetString( pchSection, pchSettingsKey, pchValue, peError );
2241
2241
+
}
2242
2242
+
void SetString( const std::string & sSection, const std::string & sSettingsKey, const std::string & sValue, EVRSettingsError *peError = nullptr )
2243
2243
+
{
2244
2244
+
m_pSettings->SetString( sSection.c_str(), sSettingsKey.c_str(), sValue.c_str(), peError );
2245
2245
+
}
2246
2246
+
2247
2247
+
bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr )
2248
2248
+
{
2249
2249
+
return m_pSettings->GetBool( pchSection, pchSettingsKey, peError );
2250
2250
+
}
2251
2251
+
int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr )
2252
2252
+
{
2253
2253
+
return m_pSettings->GetInt32( pchSection, pchSettingsKey, peError );
2254
2254
+
}
2255
2255
+
float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr )
2256
2256
+
{
2257
2257
+
return m_pSettings->GetFloat( pchSection, pchSettingsKey, peError );
2258
2258
+
}
2259
2259
+
void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr )
2260
2260
+
{
2261
2261
+
m_pSettings->GetString( pchSection, pchSettingsKey, pchValue, unValueLen, peError );
2262
2262
+
}
2263
2263
+
std::string GetString( const std::string & sSection, const std::string & sSettingsKey, EVRSettingsError *peError = nullptr )
2264
2264
+
{
2265
2265
+
char buf[4096];
2266
2266
+
vr::EVRSettingsError eError;
2267
2267
+
m_pSettings->GetString( sSection.c_str(), sSettingsKey.c_str(), buf, sizeof( buf ), &eError );
2268
2268
+
if ( peError )
2269
2269
+
*peError = eError;
2270
2270
+
if ( eError == vr::VRSettingsError_None )
2271
2271
+
return buf;
2272
2272
+
else
2273
2273
+
return "";
2274
2274
+
}
2275
2275
+
2276
2276
+
void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr )
2277
2277
+
{
2278
2278
+
m_pSettings->RemoveSection( pchSection, peError );
2279
2279
+
}
2280
2280
+
void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr )
2281
2281
+
{
2282
2282
+
m_pSettings->RemoveKeyInSection( pchSection, pchSettingsKey, peError );
2283
2283
+
}
2284
2284
+
};
2285
2285
+
1558
2286
1559
2287
//-----------------------------------------------------------------------------
1560
2288
// steamvr keys
···
1575
2303
static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
1576
2304
static const char * const k_pch_SteamVR_GridColor_String = "gridColor";
1577
2305
static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
2306
2306
+
static const char * const k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor";
1578
2307
static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage";
2308
2308
+
static const char * const k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences";
1579
2309
static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
1580
1580
-
static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode";
1581
1581
-
static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid";
1582
1582
-
static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid";
1583
2310
static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
1584
2311
static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
1585
1585
-
static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
2312
2312
+
static const char * const k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement";
2313
2313
+
static const char * const k_pch_SteamVR_ShowBaseStationPowerManagementTip_Int32 = "ShowBaseStationPowerManagementTip";
1586
2314
static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
1587
2315
static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale";
1588
1588
-
static const char * const k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
1589
1589
-
static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
1590
1590
-
static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
2316
2316
+
static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution";
2317
2317
+
static const char * const k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing";
2318
2318
+
static const char * const k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride";
2319
2319
+
static const char * const k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle";
2320
2320
+
static const char * const k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict";
2321
2321
+
static const char * const k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync";
1591
2322
static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
1592
1592
-
static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
1593
1593
-
static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
2323
2323
+
static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView";
2324
2324
+
static const char * const k_pch_SteamVR_ShowLegacyMirrorView_Bool = "showLegacyMirrorView";
2325
2325
+
static const char * const k_pch_SteamVR_MirrorViewVisibility_Bool = "showMirrorView";
2326
2326
+
static const char * const k_pch_SteamVR_MirrorViewDisplayMode_Int32 = "mirrorViewDisplayMode";
2327
2327
+
static const char * const k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye";
1594
2328
static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
2329
2329
+
static const char * const k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized";
2330
2330
+
static const char * const k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph";
1595
2331
static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
1596
2332
static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
1597
2333
static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
···
1606
2342
static const char * const k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode";
1607
2343
static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver";
1608
2344
static const char * const k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor";
1609
1609
-
static const char * const k_pch_SteamVR_DebugInput = "debugInput";
1610
1610
-
static const char * const k_pch_SteamVR_LegacyInputRebinding = "legacyInputRebinding";
2345
2345
+
static const char * const k_pch_SteamVR_DebugInputBinding = "debugInputBinding";
2346
2346
+
static const char * const k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid";
2347
2347
+
static const char * const k_pch_SteamVR_RenderCameraMode = "renderCameraMode";
2348
2348
+
static const char * const k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling";
2349
2349
+
static const char * const k_pch_SteamVR_EnableSafeMode = "enableSafeMode";
2350
2350
+
static const char * const k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate";
2351
2351
+
static const char * const k_pch_SteamVR_LastVersionNotice = "lastVersionNotice";
2352
2352
+
static const char * const k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate";
2353
2353
+
static const char * const k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR";
2354
2354
+
static const char * const k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG";
2355
2355
+
static const char * const k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB";
2356
2356
+
static const char * const k_pch_SteamVR_CustomIconStyle_String = "customIconStyle";
2357
2357
+
static const char * const k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle";
2358
2358
+
static const char * const k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate";
2359
2359
+
static const char * const k_pch_SteamVR_AllowGlobalActionSetPriority = "globalActionSetPriority";
2360
2360
+
static const char * const k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2";
2361
2361
+
static const char * const k_pch_SteamVR_BlockOculusSDKOnOpenVRLaunchOption_Bool = "blockOculusSDKOnOpenVRLaunchOption";
2362
2362
+
static const char * const k_pch_SteamVR_BlockOculusSDKOnAllLaunches_Bool = "blockOculusSDKOnAllLaunches";
2363
2363
+
static const char * const k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility";
2364
2364
+
static const char * const k_pch_SteamVR_UsePrism_Bool = "usePrism";
2365
2365
+
2366
2366
+
//-----------------------------------------------------------------------------
2367
2367
+
// direct mode keys
2368
2368
+
static const char * const k_pch_DirectMode_Section = "direct_mode";
2369
2369
+
static const char * const k_pch_DirectMode_Enable_Bool = "enable";
2370
2370
+
static const char * const k_pch_DirectMode_Count_Int32 = "count";
2371
2371
+
static const char * const k_pch_DirectMode_EdidVid_Int32 = "edidVid";
2372
2372
+
static const char * const k_pch_DirectMode_EdidPid_Int32 = "edidPid";
1611
2373
1612
2374
//-----------------------------------------------------------------------------
1613
2375
// lighthouse keys
···
1620
2382
static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
1621
2383
static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth";
1622
2384
static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations";
2385
2385
+
static const char * const k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2";
2386
2386
+
static const char * const k_pch_Lighthouse_InactivityTimeoutForBaseStations_Int32 = "InactivityTimeoutForBaseStations";
2387
2387
+
static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback";
1623
2388
1624
2389
//-----------------------------------------------------------------------------
1625
2390
// null keys
···
1636
2401
static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency";
1637
2402
1638
2403
//-----------------------------------------------------------------------------
2404
2404
+
// Windows MR keys
2405
2405
+
static const char * const k_pch_WindowsMR_Section = "driver_holographic";
2406
2406
+
2407
2407
+
//-----------------------------------------------------------------------------
1639
2408
// user interface keys
1640
2409
static const char * const k_pch_UserInterface_Section = "userinterface";
1641
2410
static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
1642
2411
static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray";
2412
2412
+
static const char * const k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized";
1643
2413
static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots";
1644
2414
static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
1645
2415
···
1662
2432
//-----------------------------------------------------------------------------
1663
2433
// perf keys
1664
2434
static const char * const k_pch_Perf_Section = "perfcheck";
1665
1665
-
static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive";
1666
1666
-
static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD";
1667
1667
-
static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce";
2435
2435
+
static const char * const k_pch_Perf_PerfGraphInHMD_Bool = "perfGraphInHMD";
1668
2436
static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
1669
2437
static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
1670
2438
static const char * const k_pch_Perf_TestData_Float = "perfTestData";
1671
1671
-
static const char * const k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling";
2439
2439
+
static const char * const k_pch_Perf_GPUProfiling_Bool = "GPUProfiling";
1672
2440
1673
2441
//-----------------------------------------------------------------------------
1674
2442
// collision bounds keys
···
1678
2446
static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn";
1679
2447
static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn";
1680
2448
static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance";
2449
2449
+
static const char * const k_pch_CollisionBounds_WallHeight_Float = "CollisionBoundsWallHeight";
1681
2450
static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR";
1682
2451
static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG";
1683
2452
static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB";
1684
2453
static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA";
2454
2454
+
static const char * const k_pch_CollisionBounds_EnableDriverImport = "enableDriverBoundsImport";
1685
2455
1686
2456
//-----------------------------------------------------------------------------
1687
2457
// camera keys
1688
2458
static const char * const k_pch_Camera_Section = "camera";
1689
2459
static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera";
1690
1690
-
static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard";
2460
2460
+
static const char * const k_pch_Camera_ShowOnController_Bool = "showOnController";
1691
2461
static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds";
1692
1692
-
static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView";
2462
2462
+
static const char * const k_pch_Camera_RoomView_Int32 = "roomView";
1693
2463
static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR";
1694
2464
static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG";
1695
2465
static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB";
1696
2466
static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA";
1697
2467
static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength";
1698
1698
-
static const char * const k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode";
2468
2468
+
static const char * const k_pch_Camera_RoomViewStyle_Int32 = "roomViewStyle";
1699
2469
1700
2470
//-----------------------------------------------------------------------------
1701
2471
// audio keys
1702
2472
static const char * const k_pch_audio_Section = "audio";
1703
1703
-
static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice";
1704
1704
-
static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice";
1705
1705
-
static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice";
1706
1706
-
static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice";
1707
1707
-
static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice";
2473
2473
+
static const char * const k_pch_audio_SetOsDefaultPlaybackDevice_Bool = "setOsDefaultPlaybackDevice";
2474
2474
+
static const char * const k_pch_audio_EnablePlaybackDeviceOverride_Bool = "enablePlaybackDeviceOverride";
2475
2475
+
static const char * const k_pch_audio_PlaybackDeviceOverride_String = "playbackDeviceOverride";
2476
2476
+
static const char * const k_pch_audio_PlaybackDeviceOverrideName_String = "playbackDeviceOverrideName";
2477
2477
+
static const char * const k_pch_audio_SetOsDefaultRecordingDevice_Bool = "setOsDefaultRecordingDevice";
2478
2478
+
static const char * const k_pch_audio_EnableRecordingDeviceOverride_Bool = "enableRecordingDeviceOverride";
2479
2479
+
static const char * const k_pch_audio_RecordingDeviceOverride_String = "recordingDeviceOverride";
2480
2480
+
static const char * const k_pch_audio_RecordingDeviceOverrideName_String = "recordingDeviceOverrideName";
2481
2481
+
static const char * const k_pch_audio_EnablePlaybackMirror_Bool = "enablePlaybackMirror";
2482
2482
+
static const char * const k_pch_audio_PlaybackMirrorDevice_String = "playbackMirrorDevice";
2483
2483
+
static const char * const k_pch_audio_PlaybackMirrorDeviceName_String = "playbackMirrorDeviceName";
2484
2484
+
static const char * const k_pch_audio_OldPlaybackMirrorDevice_String = "onPlaybackMirrorDevice";
2485
2485
+
static const char * const k_pch_audio_ActiveMirrorDevice_String = "activePlaybackMirrorDevice";
2486
2486
+
static const char * const k_pch_audio_EnablePlaybackMirrorIndependentVolume_Bool = "enablePlaybackMirrorIndependentVolume";
2487
2487
+
static const char * const k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId";
1708
2488
static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
2489
2489
+
static const char * const k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput";
2490
2490
+
static const char * const k_pch_audio_MuteMicMonitor_Bool = "muteMicMonitor";
1709
2491
1710
2492
//-----------------------------------------------------------------------------
1711
2493
// power management keys
···
1722
2504
static const char * const k_pch_Dashboard_Section = "dashboard";
1723
2505
static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
1724
2506
static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
1725
1725
-
static const char * const k_pch_Dashboard_EnableWebUI = "webUI";
1726
1726
-
static const char * const k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools";
2507
2507
+
static const char * const k_pch_Dashboard_Position = "position";
2508
2508
+
static const char * const k_pch_Dashboard_DesktopScale = "desktopScale";
2509
2509
+
static const char * const k_pch_Dashboard_DashboardScale = "dashboardScale";
2510
2510
+
static const char * const k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer";
1727
2511
1728
2512
//-----------------------------------------------------------------------------
1729
2513
// model skin keys
···
1732
2516
//-----------------------------------------------------------------------------
1733
2517
// driver keys - These could be checked in any driver_<name> section
1734
2518
static const char * const k_pch_Driver_Enable_Bool = "enable";
2519
2519
+
static const char * const k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode";
2520
2520
+
static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority";
1735
2521
1736
2522
//-----------------------------------------------------------------------------
1737
2523
// web interface keys
1738
2524
static const char* const k_pch_WebInterface_Section = "WebInterface";
1739
1739
-
static const char* const k_pch_WebInterface_WebPort_String = "WebPort";
2525
2525
+
2526
2526
+
//-----------------------------------------------------------------------------
2527
2527
+
// vrwebhelper keys
2528
2528
+
static const char* const k_pch_VRWebHelper_Section = "VRWebHelper";
2529
2529
+
static const char* const k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled";
2530
2530
+
static const char* const k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort";
2531
2531
+
2532
2532
+
//-----------------------------------------------------------------------------
2533
2533
+
// tracking overrides - keys are device paths, values are the device paths their
2534
2534
+
// tracking/pose information overrides
2535
2535
+
static const char* const k_pch_TrackingOverride_Section = "TrackingOverrides";
2536
2536
+
2537
2537
+
//-----------------------------------------------------------------------------
2538
2538
+
// per-app keys - the section name for these is the app key itself. Some of these are prefixed by the controller type
2539
2539
+
static const char* const k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL";
2540
2540
+
static const char* const k_pch_App_BindingLegacyAPISuffix_String = "_legacy";
2541
2541
+
static const char* const k_pch_App_BindingSteamVRInputAPISuffix_String = "_steamvrinput";
2542
2542
+
static const char* const k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL";
2543
2543
+
static const char* const k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
2544
2544
+
static const char* const k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
2545
2545
+
static const char* const k_pch_App_DominantHand_Int32 = "DominantHand";
2546
2546
+
static const char* const k_pch_App_BlockOculusSDK_Bool = "blockOculusSDK";
2547
2547
+
2548
2548
+
//-----------------------------------------------------------------------------
2549
2549
+
// configuration for trackers
2550
2550
+
static const char * const k_pch_Trackers_Section = "trackers";
2551
2551
+
2552
2552
+
//-----------------------------------------------------------------------------
2553
2553
+
// configuration for desktop UI windows
2554
2554
+
static const char * const k_pch_DesktopUI_Section = "DesktopUI";
2555
2555
+
2556
2556
+
//-----------------------------------------------------------------------------
2557
2557
+
// Last known keys for righting recovery
2558
2558
+
static const char * const k_pch_LastKnown_Section = "LastKnown";
2559
2559
+
static const char* const k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer";
2560
2560
+
static const char* const k_pch_LastKnown_HMDModel_String = "HMDModel";
2561
2561
+
2562
2562
+
//-----------------------------------------------------------------------------
2563
2563
+
// Dismissed warnings
2564
2564
+
static const char * const k_pch_DismissedWarnings_Section = "DismissedWarnings";
2565
2565
+
2566
2566
+
//-----------------------------------------------------------------------------
2567
2567
+
// Input Settings
2568
2568
+
static const char * const k_pch_Input_Section = "input";
2569
2569
+
static const char* const k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation";
2570
2570
+
static const char* const k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation";
2571
2571
+
static const char* const k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone";
2572
2572
+
2573
2573
+
//-----------------------------------------------------------------------------
2574
2574
+
// Log of GPU performance
2575
2575
+
static const char * const k_pch_GpuSpeed_Section = "GpuSpeed";
1740
2576
1741
2577
} // namespace vr
1742
2578
1743
2579
// iservertrackeddevicedriver.h
2580
2580
+
1744
2581
namespace vr
1745
2582
{
1746
2583
···
1764
2601
* but instead an internal IMU or another reference point in the HMD.
1765
2602
* The following two transforms transform positions and orientations
1766
2603
* to app world space from driver world space,
1767
1767
-
* and to HMD head space from driver local body space.
2604
2604
+
* and to HMD head space from driver local body space.
1768
2605
*
1769
2606
* We maintain the driver pose state in its internal coordinate system,
1770
2607
* so we can do the pose prediction math without having to
···
1796
2633
/* Orientation of the tracker, represented as a quaternion */
1797
2634
vr::HmdQuaternion_t qRotation;
1798
2635
1799
1799
-
/* Angular velocity of the pose in axis-angle
2636
2636
+
/* Angular velocity of the pose in axis-angle
1800
2637
* representation. The direction is the angle of
1801
2638
* rotation and the magnitude is the angle around
1802
2639
* that axis in radians/second. */
1803
2640
double vecAngularVelocity[ 3 ];
1804
2641
1805
1805
-
/* Angular acceleration of the pose in axis-angle
2642
2642
+
/* Angular acceleration of the pose in axis-angle
1806
2643
* representation. The direction is the angle of
1807
2644
* rotation and the magnitude is the angle around
1808
2645
* that axis in radians/second^2. */
···
1862
2699
static const char *ITrackedDeviceServerDriver_Version = "ITrackedDeviceServerDriver_005";
1863
2700
1864
2701
}
2702
2702
+
1865
2703
// ivrdisplaycomponent.h
2704
2704
+
1866
2705
namespace vr
1867
2706
{
1868
2707
···
1908
2747
}
1909
2748
1910
2749
// ivrdriverdirectmodecomponent.h
2750
2750
+
1911
2751
namespace vr
1912
2752
{
1913
1913
-
2753
2753
+
enum VRSwapTextureFlag
2754
2754
+
{
2755
2755
+
// Specify that the shared texture resource was created with the SHARED_NTHANDLE option (Windows)
2756
2756
+
VRSwapTextureFlag_Shared_NTHandle = 1 << 0,
2757
2757
+
};
1914
2758
1915
2759
// ----------------------------------------------------------------------------------------------
1916
2760
// Purpose: This component is used for drivers that implement direct mode entirely on their own
1917
1917
-
// without allowing the VR Compositor to own the window/device. Chances are you don't
1918
1918
-
// need to implement this component in your driver.
2761
2761
+
// without allowing the VR Compositor to own the window/device.
1919
2762
// ----------------------------------------------------------------------------------------------
1920
2763
class IVRDriverDirectModeComponent
1921
2764
{
···
1925
2768
// Direct mode methods
1926
2769
// -----------------------------------
1927
2770
1928
1928
-
/** Specific to Oculus compositor support, textures supplied must be created using this method. */
1929
2771
struct SwapTextureSetDesc_t
1930
2772
{
1931
2773
uint32_t nWidth;
···
1933
2775
uint32_t nFormat;
1934
2776
uint32_t nSampleCount;
1935
2777
};
1936
1936
-
virtual void CreateSwapTextureSet( uint32_t unPid, const SwapTextureSetDesc_t *pSwapTextureSetDesc, vr::SharedTextureHandle_t( *pSharedTextureHandles )[ 3 ] ) {}
2778
2778
+
2779
2779
+
struct SwapTextureSet_t
2780
2780
+
{
2781
2781
+
vr::SharedTextureHandle_t rSharedTextureHandles[ 3 ];
2782
2782
+
uint32_t unTextureFlags;
2783
2783
+
};
2784
2784
+
2785
2785
+
/** Called to allocate textures for applications to render into. One of these per eye will be passed back to SubmitLayer each frame. */
2786
2786
+
virtual void CreateSwapTextureSet( uint32_t unPid, const SwapTextureSetDesc_t *pSwapTextureSetDesc, SwapTextureSet_t *pOutSwapTextureSet ) {}
1937
2787
1938
2788
/** Used to textures created using CreateSwapTextureSet. Only one of the set's handles needs to be used to destroy the entire set. */
1939
2789
virtual void DestroySwapTextureSet( vr::SharedTextureHandle_t sharedTextureHandle ) {}
···
1956
2806
1957
2807
// Projection matrix used to render the depth buffer.
1958
2808
vr::HmdMatrix44_t mProjection;
2809
2809
+
2810
2810
+
// Hmd pose used to render this layer.
2811
2811
+
vr::HmdMatrix34_t mHmdPose;
1959
2812
};
1960
1960
-
virtual void SubmitLayer( const SubmitLayerPerEye_t( &perEye )[ 2 ], const vr::HmdMatrix34_t *pPose ) {}
2813
2813
+
virtual void SubmitLayer( const SubmitLayerPerEye_t( &perEye )[ 2 ] ) {}
1961
2814
1962
2815
/** Submits queued layers for display. */
1963
2816
virtual void Present( vr::SharedTextureHandle_t syncTexture ) {}
···
1969
2822
virtual void GetFrameTiming( DriverDirectMode_FrameTiming *pFrameTiming ) {}
1970
2823
};
1971
2824
1972
1972
-
static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_005";
2825
2825
+
static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_007";
1973
2826
1974
2827
}
1975
2828
1976
2829
// ivrcameracomponent.h
2830
2830
+
1977
2831
namespace vr
1978
2832
{
1979
2833
//-----------------------------------------------------------------------------
···
2006
2860
virtual bool SetAutoExposure( bool bEnable ) = 0;
2007
2861
virtual bool PauseVideoStream() = 0;
2008
2862
virtual bool ResumeVideoStream() = 0;
2009
2009
-
virtual bool GetCameraDistortion( float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0;
2010
2010
-
virtual bool GetCameraProjection( vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0;
2863
2863
+
virtual bool GetCameraDistortion( uint32_t nCameraIndex, float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0;
2864
2864
+
virtual bool GetCameraProjection( uint32_t nCameraIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0;
2011
2865
virtual bool SetFrameRate( int nISPFrameRate, int nSensorFrameRate ) = 0;
2012
2866
virtual bool SetCameraVideoSinkCallback( vr::ICameraVideoSinkCallback *pCameraVideoSinkCallback ) = 0;
2013
2867
virtual bool GetCameraCompatibilityMode( vr::ECameraCompatibilityMode *pCameraCompatibilityMode ) = 0;
2014
2868
virtual bool SetCameraCompatibilityMode( vr::ECameraCompatibilityMode nCameraCompatibilityMode ) = 0;
2015
2869
virtual bool GetCameraFrameBounds( vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pLeft, uint32_t *pTop, uint32_t *pWidth, uint32_t *pHeight ) = 0;
2016
2016
-
virtual bool GetCameraIntrinsics( vr::EVRTrackedCameraFrameType eFrameType, HmdVector2_t *pFocalLength, HmdVector2_t *pCenter ) = 0;
2870
2870
+
virtual bool GetCameraIntrinsics( uint32_t nCameraIndex, vr::EVRTrackedCameraFrameType eFrameType, HmdVector2_t *pFocalLength, HmdVector2_t *pCenter, vr::EVRDistortionFunctionType *peDistortionType, double rCoefficients[ k_unMaxDistortionFunctionParameters ] ) = 0;
2017
2871
};
2018
2872
2019
2019
-
static const char *IVRCameraComponent_Version = "IVRCameraComponent_002";
2873
2873
+
static const char *IVRCameraComponent_Version = "IVRCameraComponent_003";
2020
2874
}
2875
2875
+
2021
2876
// itrackeddevicedriverprovider.h
2877
2877
+
2022
2878
namespace vr
2023
2879
{
2024
2880
···
2026
2882
struct TrackedDeviceDriverInfo_t;
2027
2883
struct DriverPose_t;
2028
2884
2029
2029
-
/** This interface is provided by vrserver to allow the driver to notify
2885
2885
+
/** This interface is provided by vrserver to allow the driver to notify
2030
2886
* the system when something changes about a device. These changes must
2031
2887
* not change the serial number or class of the device because those values
2032
2888
* are permanently associated with the device's index. */
···
2101
2957
2102
2958
static const char *IVRWatchdogProvider_Version = "IVRWatchdogProvider_001";
2103
2959
2960
2960
+
2961
2961
+
2962
2962
+
2963
2963
+
/** This is an optional interface drivers may implement. It will be loaded in vrcompositor.exe */
2964
2964
+
class IVRCompositorPluginProvider
2965
2965
+
{
2966
2966
+
public:
2967
2967
+
/** initializes the driver when used to load compositor plugins */
2968
2968
+
virtual EVRInitError Init( IVRDriverContext *pDriverContext ) = 0;
2969
2969
+
2970
2970
+
/** cleans up the driver right before it is unloaded */
2971
2971
+
virtual void Cleanup() = 0;
2972
2972
+
2973
2973
+
/** Returns the versions of interfaces used by this driver */
2974
2974
+
virtual const char * const *GetInterfaceVersions() = 0;
2975
2975
+
2976
2976
+
/** Requests a component interface of the driver for specific functionality. The driver should return NULL
2977
2977
+
* if the requested interface or version is not supported. */
2978
2978
+
virtual void *GetComponent( const char *pchComponentNameAndVersion ) = 0;
2979
2979
+
};
2980
2980
+
2981
2981
+
static const char *IVRCompositorPluginProvider_Version = "IVRCompositorPluginProvider_001";
2982
2982
+
2104
2983
}
2984
2984
+
2105
2985
// ivrproperties.h
2986
2986
+
2106
2987
#include <string>
2107
2988
#include <vector>
2108
2989
2109
2990
namespace vr
2110
2991
{
2992
2992
+
2993
2993
+
/** This container is automatically created before a display redirect device is activated.
2994
2994
+
* Any properties in this container will be returned when that property is read from the HMD's
2995
2995
+
* property container. */
2996
2996
+
static const PropertyContainerHandle_t k_ulDisplayRedirectContainer = 0x600000003;
2111
2997
2112
2998
enum EPropertyWriteType
2113
2999
{
···
2154
3040
2155
3041
/** Returns a container handle given a tracked device index */
2156
3042
virtual PropertyContainerHandle_t TrackedDeviceToPropertyContainer( TrackedDeviceIndex_t nDevice ) = 0;
2157
2157
-
2158
3043
};
2159
3044
2160
3045
static const char * const IVRProperties_Version = "IVRProperties_001";
···
2170
3055
float GetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
2171
3056
int32_t GetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
2172
3057
uint64_t GetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
3058
3058
+
HmdVector2_t GetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
3059
3059
+
HmdVector3_t GetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
3060
3060
+
HmdVector4_t GetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
3061
3061
+
double GetDoubleProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
2173
3062
2174
3063
/** Returns a single typed property. If the device index is not valid or the property is not a string type this function will
2175
3064
* return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
···
2195
3084
ETrackedPropertyError SetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, float fNewValue );
2196
3085
ETrackedPropertyError SetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, int32_t nNewValue );
2197
3086
ETrackedPropertyError SetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, uint64_t ulNewValue );
3087
3087
+
ETrackedPropertyError SetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector2_t & vNewValue );
3088
3088
+
ETrackedPropertyError SetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector3_t & vNewValue );
3089
3089
+
ETrackedPropertyError SetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector4_t & vNewValue );
3090
3090
+
ETrackedPropertyError SetDoubleProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, double vNewValue );
2198
3091
2199
3092
/** Sets a string property. The new value will be returned on any subsequent call to get this property in any process. */
2200
3093
ETrackedPropertyError SetStringProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const char *pchNewValue );
···
2372
3265
return GetPropertyHelper<bool>( ulContainerHandle, prop, pError, false, k_unBoolPropertyTag );
2373
3266
}
2374
3267
2375
2375
-
2376
3268
inline float CVRPropertyHelpers::GetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError )
2377
3269
{
2378
3270
return GetPropertyHelper<float>( ulContainerHandle, prop, pError, 0.f, k_unFloatPropertyTag );
3271
3271
+
}
3272
3272
+
3273
3273
+
inline double CVRPropertyHelpers::GetDoubleProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError )
3274
3274
+
{
3275
3275
+
return GetPropertyHelper<double>( ulContainerHandle, prop, pError, 0., k_unDoublePropertyTag );
2379
3276
}
2380
3277
2381
3278
inline int32_t CVRPropertyHelpers::GetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError )
···
2388
3285
return GetPropertyHelper<uint64_t>( ulContainerHandle, prop, pError, 0, k_unUint64PropertyTag );
2389
3286
}
2390
3287
3288
3288
+
inline HmdVector2_t CVRPropertyHelpers::GetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError )
3289
3289
+
{
3290
3290
+
HmdVector2_t defaultval = { 0 };
3291
3291
+
return GetPropertyHelper<HmdVector2_t>( ulContainerHandle, prop, pError, defaultval, k_unHmdVector2PropertyTag );
3292
3292
+
}
3293
3293
+
3294
3294
+
inline HmdVector3_t CVRPropertyHelpers::GetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError )
3295
3295
+
{
3296
3296
+
HmdVector3_t defaultval = { 0 };
3297
3297
+
return GetPropertyHelper<HmdVector3_t>( ulContainerHandle, prop, pError, defaultval, k_unHmdVector3PropertyTag );
3298
3298
+
}
3299
3299
+
3300
3300
+
inline HmdVector4_t CVRPropertyHelpers::GetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError )
3301
3301
+
{
3302
3302
+
HmdVector4_t defaultval = { 0 };
3303
3303
+
return GetPropertyHelper<HmdVector4_t>( ulContainerHandle, prop, pError, defaultval, k_unHmdVector4PropertyTag );
3304
3304
+
}
3305
3305
+
2391
3306
inline ETrackedPropertyError CVRPropertyHelpers::SetBoolProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, bool bNewValue )
2392
3307
{
2393
3308
return SetProperty( ulContainerHandle, prop, &bNewValue, sizeof( bNewValue ), k_unBoolPropertyTag );
···
2398
3313
return SetProperty( ulContainerHandle, prop, &fNewValue, sizeof( fNewValue ), k_unFloatPropertyTag );
2399
3314
}
2400
3315
3316
3316
+
inline ETrackedPropertyError CVRPropertyHelpers::SetDoubleProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, double fNewValue )
3317
3317
+
{
3318
3318
+
return SetProperty( ulContainerHandle, prop, &fNewValue, sizeof( fNewValue ), k_unDoublePropertyTag );
3319
3319
+
}
3320
3320
+
2401
3321
inline ETrackedPropertyError CVRPropertyHelpers::SetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, int32_t nNewValue )
2402
3322
{
2403
3323
return SetProperty( ulContainerHandle, prop, &nNewValue, sizeof( nNewValue ), k_unInt32PropertyTag );
···
2408
3328
return SetProperty( ulContainerHandle, prop, &ulNewValue, sizeof( ulNewValue ), k_unUint64PropertyTag );
2409
3329
}
2410
3330
3331
3331
+
inline ETrackedPropertyError CVRPropertyHelpers::SetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector2_t & vNewValue )
3332
3332
+
{
3333
3333
+
return SetProperty( ulContainerHandle, prop, ( void * ) &vNewValue, sizeof( HmdVector2_t ), k_unHmdVector2PropertyTag );
3334
3334
+
}
3335
3335
+
3336
3336
+
inline ETrackedPropertyError CVRPropertyHelpers::SetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector3_t & vNewValue )
3337
3337
+
{
3338
3338
+
return SetProperty( ulContainerHandle, prop, ( void * ) &vNewValue, sizeof( HmdVector3_t ), k_unHmdVector3PropertyTag );
3339
3339
+
}
3340
3340
+
3341
3341
+
inline ETrackedPropertyError CVRPropertyHelpers::SetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector4_t & vNewValue )
3342
3342
+
{
3343
3343
+
return SetProperty( ulContainerHandle, prop, ( void * ) &vNewValue, sizeof( HmdVector4_t ), k_unHmdVector4PropertyTag );
3344
3344
+
}
3345
3345
+
2411
3346
/** Sets the error return value for a property. This value will be returned on all subsequent requests to get the property */
2412
3347
inline ETrackedPropertyError CVRPropertyHelpers::SetPropertyError( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError eError )
2413
3348
{
···
2495
3430
2496
3431
2497
3432
// ivrdriverinput.h
3433
3433
+
2498
3434
namespace vr
2499
3435
{
2500
3436
···
2533
3469
/** Creates a haptic component for the device */
2534
3470
virtual EVRInputError CreateHapticComponent( PropertyContainerHandle_t ulContainer, const char *pchName, VRInputComponentHandle_t *pHandle ) = 0;
2535
3471
3472
3472
+
/** Creates a skeleton component. */
3473
3473
+
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;
3474
3474
+
3475
3475
+
/** Updates a skeleton component. */
3476
3476
+
virtual EVRInputError UpdateSkeletonComponent( VRInputComponentHandle_t ulComponent, EVRSkeletalMotionRange eMotionRange, const VRBoneTransform_t *pTransforms, uint32_t unTransformCount ) = 0;
3477
3477
+
2536
3478
};
2537
3479
2538
2538
-
static const char * const IVRDriverInput_Version = "IVRDriverInput_001";
3480
3480
+
static const char * const IVRDriverInput_Version = "IVRDriverInput_003";
2539
3481
2540
3482
} // namespace vr
2541
3483
2542
3484
// ivrdriverlog.h
3485
3485
+
2543
3486
namespace vr
2544
3487
{
2545
3488
···
2554
3497
static const char *IVRDriverLog_Version = "IVRDriverLog_001";
2555
3498
2556
3499
}
3500
3500
+
2557
3501
// ivrserverdriverhost.h
3502
3502
+
2558
3503
namespace vr
2559
3504
{
2560
3505
···
2562
3507
struct TrackedDeviceDriverInfo_t;
2563
3508
struct DriverPose_t;
2564
3509
2565
2565
-
/** This interface is provided by vrserver to allow the driver to notify
3510
3510
+
/** This interface is provided by vrserver to allow the driver to notify
2566
3511
* the system when something changes about a device. These changes must
2567
3512
* not change the serial number or class of the device because those values
2568
3513
* are permanently associated with the device's index. */
···
2597
3542
* other properties can be looked up via IVRProperties. */
2598
3543
virtual void GetRawTrackedDevicePoses( float fPredictedSecondsFromNow, TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0;
2599
3544
2600
2600
-
/** Notifies the server that a tracked device's display component transforms have been updated. */
2601
2601
-
virtual void TrackedDeviceDisplayTransformUpdated( uint32_t unWhichDevice, HmdMatrix34_t eyeToHeadLeft, HmdMatrix34_t eyeToHeadRight ) = 0;
3545
3545
+
/** Requests that SteamVR be restarted. The provided reason will be displayed to the user and should be in the current locale. */
3546
3546
+
virtual void RequestRestart( const char *pchLocalizedReason, const char *pchExecutableToStart, const char *pchArguments, const char *pchWorkingDirectory ) = 0;
3547
3547
+
3548
3548
+
/** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame.
3549
3549
+
* Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */
3550
3550
+
virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0;
3551
3551
+
3552
3552
+
/** Notifies the server that a tracked device's display component transforms have been updated.
3553
3553
+
* only permitted on devices of the HMD class. */
3554
3554
+
virtual void SetDisplayEyeToHead( uint32_t unWhichDevice, const HmdMatrix34_t & eyeToHeadLeft, const HmdMatrix34_t & eyeToHeadRight ) = 0;
3555
3555
+
3556
3556
+
/** Notifies the server that a tracked device's display projection has changed.
3557
3557
+
* only permitted on devices of the HMD class. */
3558
3558
+
virtual void SetDisplayProjectionRaw( uint32_t unWhichDevice, const HmdRect2_t & eyeLeft, const HmdRect2_t & eyeRight ) = 0;
3559
3559
+
3560
3560
+
/** Notifies the server that a tracked device's recommended render target resolution has changed.
3561
3561
+
* only permitted on devices of the HMD class. */
3562
3562
+
virtual void SetRecommendedRenderTargetSize( uint32_t unWhichDevice, uint32_t nWidth, uint32_t nHeight ) = 0;
3563
3563
+
};
3564
3564
+
3565
3565
+
static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_006";
3566
3566
+
3567
3567
+
}
3568
3568
+
3569
3569
+
// ivrcompositordriverhost.h
3570
3570
+
3571
3571
+
namespace vr
3572
3572
+
{
3573
3573
+
3574
3574
+
class IVRCompositorDriverHost
3575
3575
+
{
3576
3576
+
public:
3577
3577
+
/** Returns true and fills the event with the next event on the queue if there is one. If there are no events
3578
3578
+
* this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */
3579
3579
+
virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0;
2602
3580
};
2603
3581
2604
2604
-
static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_005";
3582
3582
+
static const char *IVRCompositorDriverHost_Version = "IVRCompositorDriverHost_001";
2605
3583
2606
3584
}
2607
3585
2608
3586
// ivrhiddenarea.h
3587
3587
+
2609
3588
namespace vr
2610
3589
{
2611
3590
···
2660
3639
}
2661
3640
2662
3641
}
3642
3642
+
2663
3643
// ivrwatchdoghost.h
3644
3644
+
2664
3645
namespace vr
2665
3646
{
2666
3647
···
2670
3651
public:
2671
3652
/** Client drivers in watchdog mode should call this when they have received a signal from hardware that should
2672
3653
* cause SteamVR to start */
2673
2673
-
virtual void WatchdogWakeUp() = 0;
3654
3654
+
virtual void WatchdogWakeUp( vr::ETrackedDeviceClass eDeviceClass ) = 0;
2674
3655
};
2675
3656
2676
2676
-
static const char *IVRWatchdogHost_Version = "IVRWatchdogHost_001";
3657
3657
+
static const char *IVRWatchdogHost_Version = "IVRWatchdogHost_002";
2677
3658
2678
2678
-
}
3659
3659
+
};
2679
3660
2680
3661
2681
3662
2682
3663
// ivrvirtualdisplay.h
3664
3664
+
2683
3665
namespace vr
2684
3666
{
2685
3667
struct PresentInfo_t
···
2708
3690
};
2709
3691
2710
3692
static const char *IVRVirtualDisplay_Version = "IVRVirtualDisplay_002";
2711
2711
-
2712
2712
-
/** Returns the current IVRVirtualDisplay pointer or NULL the interface could not be found. */
2713
2713
-
VR_INTERFACE vr::IVRVirtualDisplay *VR_CALLTYPE VRVirtualDisplay();
2714
3693
}
2715
3694
2716
3695
2717
3696
// ivrresources.h
3697
3697
+
2718
3698
namespace vr
2719
3699
{
2720
3700
···
2731
3711
virtual uint32_t LoadSharedResource( const char *pchResourceName, char *pchBuffer, uint32_t unBufferLen ) = 0;
2732
3712
2733
3713
/** Provides the full path to the specified resource. Resource names can include named directories for
2734
2734
-
* drivers and other things, and this resolves all of those and returns the actual physical path.
3714
3714
+
* drivers and other things, and this resolves all of those and returns the actual physical path.
2735
3715
* pchResourceTypeDirectory is the subdirectory of resources to look in. */
2736
3716
virtual uint32_t GetResourceFullPath( const char *pchResourceName, const char *pchResourceTypeDirectory, VR_OUT_STRING() char *pchPathBuffer, uint32_t unBufferLen ) = 0;
2737
3717
};
···
2740
3720
2741
3721
2742
3722
}
3723
3723
+
3724
3724
+
// ivriobuffer.h
3725
3725
+
3726
3726
+
namespace vr
3727
3727
+
{
3728
3728
+
3729
3729
+
typedef uint64_t IOBufferHandle_t;
3730
3730
+
static const uint64_t k_ulInvalidIOBufferHandle = 0;
3731
3731
+
3732
3732
+
enum EIOBufferError
3733
3733
+
{
3734
3734
+
IOBuffer_Success = 0,
3735
3735
+
IOBuffer_OperationFailed = 100,
3736
3736
+
IOBuffer_InvalidHandle = 101,
3737
3737
+
IOBuffer_InvalidArgument = 102,
3738
3738
+
IOBuffer_PathExists = 103,
3739
3739
+
IOBuffer_PathDoesNotExist = 104,
3740
3740
+
IOBuffer_Permission = 105,
3741
3741
+
};
3742
3742
+
3743
3743
+
enum EIOBufferMode
3744
3744
+
{
3745
3745
+
IOBufferMode_Read = 0x0001,
3746
3746
+
IOBufferMode_Write = 0x0002,
3747
3747
+
IOBufferMode_Create = 0x0200,
3748
3748
+
};
3749
3749
+
3750
3750
+
// ----------------------------------------------------------------------------------------------
3751
3751
+
// Purpose:
3752
3752
+
// ----------------------------------------------------------------------------------------------
3753
3753
+
class IVRIOBuffer
3754
3754
+
{
3755
3755
+
public:
3756
3756
+
/** opens an existing or creates a new IOBuffer of unSize bytes */
3757
3757
+
virtual vr::EIOBufferError Open( const char *pchPath, vr::EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, vr::IOBufferHandle_t *pulBuffer ) = 0;
3758
3758
+
3759
3759
+
/** closes a previously opened or created buffer */
3760
3760
+
virtual vr::EIOBufferError Close( vr::IOBufferHandle_t ulBuffer ) = 0;
3761
3761
+
3762
3762
+
/** reads up to unBytes from buffer into *pDst, returning number of bytes read in *punRead */
3763
3763
+
virtual vr::EIOBufferError Read( vr::IOBufferHandle_t ulBuffer, void *pDst, uint32_t unBytes, uint32_t *punRead ) = 0;
3764
3764
+
3765
3765
+
/** writes unBytes of data from *pSrc into a buffer. */
3766
3766
+
virtual vr::EIOBufferError Write( vr::IOBufferHandle_t ulBuffer, void *pSrc, uint32_t unBytes ) = 0;
3767
3767
+
3768
3768
+
/** retrieves the property container of an buffer. */
3769
3769
+
virtual vr::PropertyContainerHandle_t PropertyContainer( vr::IOBufferHandle_t ulBuffer ) = 0;
3770
3770
+
3771
3771
+
/** inexpensively checks for readers to allow writers to fast-fail potentially expensive copies and writes. */
3772
3772
+
virtual bool HasReaders( vr::IOBufferHandle_t ulBuffer ) = 0;
3773
3773
+
};
3774
3774
+
3775
3775
+
static const char *IVRIOBuffer_Version = "IVRIOBuffer_002";
3776
3776
+
}
3777
3777
+
2743
3778
// ivrdrivermanager.h
3779
3779
+
2744
3780
namespace vr
2745
3781
{
2746
3782
···
2753
3789
virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0;
2754
3790
2755
3791
virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0;
3792
3792
+
3793
3793
+
virtual bool IsEnabled( vr::DriverId_t nDriver ) const = 0;
2756
3794
};
2757
3795
2758
3796
static const char * const IVRDriverManager_Version = "IVRDriverManager_001";
···
2761
3799
2762
3800
2763
3801
3802
3802
+
// ivrdriverspatialanchors.h
3803
3803
+
3804
3804
+
namespace vr
3805
3805
+
{
3806
3806
+
struct SpatialAnchorDriverPose_t
3807
3807
+
{
3808
3808
+
/** This position is in the same "world" space (+Y up) as provided by DriverPose_t. */
3809
3809
+
vr::HmdQuaternion_t qWorldRotation;
3810
3810
+
vr::HmdVector3d_t vWorldTranslation;
3811
3811
+
3812
3812
+
/** The pose will automatically start returning VRSpatialAnchorError_NotAvailableInThisUniverse
3813
3813
+
* if this is nonzero and does not match the current universe ID. */
3814
3814
+
uint64_t ulRequiredUniverseId;
3815
3815
+
3816
3816
+
/** When this time expires, SteamVR will start generating
3817
3817
+
* VREvent_SpatialAnchors_RequestPoseUpdate when the pose is read by an application
3818
3818
+
* to let the driver know it is still worth updating.
3819
3819
+
* You can use this facility in several ways:
3820
3820
+
* 1. Set to -1 to never receive an update request for this pose. The driver
3821
3821
+
* may still update poses at any time.
3822
3822
+
* 2. Set to 0 to always receive an update request *after* each time the pose
3823
3823
+
* is read. The rate of requests could be very high if the application gets
3824
3824
+
* the pose at framerate.
3825
3825
+
* 3. If the driver knows there is no reason to update the pose for some amount of
3826
3826
+
* time, it can set that time here and receive the update request reminder later.
3827
3827
+
* 4. If the driver plans to automatically update this pose for some amount of time
3828
3828
+
* (as it gets better information about the virtual location of this anchor) it can
3829
3829
+
* set that duration here to indicate that no "update requested" reminders are needed.
3830
3830
+
* When that automatic update period expires, any future interest in the pose will
3831
3831
+
* be indicated by a pose update request.
3832
3832
+
* The driver may always update the pose, including during the valid duration. */
3833
3833
+
double fValidDuration; // seconds
3834
3834
+
};
3835
3835
+
3836
3836
+
class IVRDriverSpatialAnchors
3837
3837
+
{
3838
3838
+
public:
3839
3839
+
3840
3840
+
/* NOTE: You must declare support for spatial anchors in your driver manifest. Add
3841
3841
+
* "spatialAnchorsSupport": true to your manifest. Without that setting, SteamVR
3842
3842
+
* will short-circuit anchor requests from applications and provide a generic descriptor
3843
3843
+
* that does not have any of the advantages of true spatial anchors. */
3844
3844
+
3845
3845
+
/* The driver should monitor for events VREvent_SpatialAnchors_RequestPoseUpdate (for new
3846
3846
+
* descriptors from applications that need UpdateSpatialAnchorPose()) and for
3847
3847
+
* VREvent_SpatialAnchors_RequestDescriptorUpdate (for new poses that need UpdateSpatialAnchorDescriptor()).
3848
3848
+
* For automatic pose updates over time, the driver should keep track of the handles it
3849
3849
+
* has seen and provide updates when conditions change. If the driver uses fValidDuration,
3850
3850
+
* it may wait for VREvent_SpatialAnchors_RequestPoseUpdate instead of keeping track itself. */
3851
3851
+
3852
3852
+
/** Update a pose for a spatial anchor. Should be called when an event notifies the driver that a
3853
3853
+
* new descriptor has been registered by an application. May be called for any anchor whenever the
3854
3854
+
* driver has better information about the best virtual coordinate to represent the anchor. Should
3855
3855
+
* be called on all active handles whenever driver state changes in a way that changes how physical
3856
3856
+
* world locations map to virtual coordinates (e.g. anything that would cause a universe ID change).
3857
3857
+
* This fires an event when it is called for the first time (to alert whoever submitted the descriptor). */
3858
3858
+
virtual EVRSpatialAnchorError UpdateSpatialAnchorPose( SpatialAnchorHandle_t unHandle, const SpatialAnchorDriverPose_t *pPose ) = 0;
3859
3859
+
3860
3860
+
/** Invalidate any pose associated with the handle and cause future calls to GetSpatialAnchorPose (on
3861
3861
+
* both the client and driver side) to return the specified error. eError must be one of
3862
3862
+
* VRSpatialAnchorError_NotYetAvailable, VRSpatialAnchorError_NotAvailableInThisUniverse, or
3863
3863
+
* VRSpatialAnchorError_PermanentlyUnavailable */
3864
3864
+
virtual EVRSpatialAnchorError SetSpatialAnchorPoseError( SpatialAnchorHandle_t unHandle, EVRSpatialAnchorError eError, double fValidDuration ) = 0;
3865
3865
+
3866
3866
+
/** Update the descriptor for a spatial anchor. Should be called when an event notifies the driver
3867
3867
+
* that a new pose has been registered by an application. May be called for any anchor whenever the
3868
3868
+
* driver has better or additional information it wants to include in the anchor descriptor. Note,
3869
3869
+
* however, that the application may never fetch the updated anchor descriptor and may request the
3870
3870
+
* original descriptor in a future session having ignored the update.
3871
3871
+
* The supplied descriptor should be only the driver's opaque internal data, not the decorated form that
3872
3872
+
* is used by clients (wrapped by runtime metadata). The descriptor must not contain non-ASCII characters or
3873
3873
+
* the two special characters ~ or "
3874
3874
+
* This fires an event every time it is called. */
3875
3875
+
virtual EVRSpatialAnchorError UpdateSpatialAnchorDescriptor( SpatialAnchorHandle_t unHandle, const char *pchDescriptor ) = 0;
3876
3876
+
3877
3877
+
/** Get the pose for a given handle. */
3878
3878
+
virtual EVRSpatialAnchorError GetSpatialAnchorPose( SpatialAnchorHandle_t unHandle, SpatialAnchorDriverPose_t *pDriverPoseOut ) = 0;
3879
3879
+
3880
3880
+
/** Get the descriptor for a given handle. This will be VRSpatialAnchorError_NotYetAvailable for handles
3881
3881
+
* where the driver has not yet built a descriptor. It will be the application-supplied descriptor for previously
3882
3882
+
* saved anchors that the application is requesting poses for. If the driver has called UpdateSpatialAnchorDescriptor()
3883
3883
+
* already in this session, it will be the descriptor provided by the driver.
3884
3884
+
* If bDecorated, returns the descriptor wrapped with runtime metadata suitable for a client to save. Else returns only
3885
3885
+
* the driver's opaque internal data.
3886
3886
+
*/
3887
3887
+
virtual EVRSpatialAnchorError GetSpatialAnchorDescriptor( SpatialAnchorHandle_t unHandle, VR_OUT_STRING() char *pchDescriptorOut, uint32_t *punDescriptorBufferLenInOut, bool bDecorated ) = 0;
3888
3888
+
3889
3889
+
};
3890
3890
+
3891
3891
+
static const char * const IVRDriverSpatialAnchors_Version = "IVRDriverSpatialAnchors_001";
3892
3892
+
3893
3893
+
} // namespace vr
3894
3894
+
2764
3895
2765
3896
2766
3897
namespace vr
2767
3898
{
3899
3899
+
#if !defined( OPENVR_INTERFACE_INTERNAL )
2768
3900
static const char * const k_InterfaceVersions[] =
2769
3901
{
2770
3902
IVRSettings_Version,
···
2777
3909
IVRVirtualDisplay_Version,
2778
3910
IVRDriverManager_Version,
2779
3911
IVRResources_Version,
3912
3912
+
IVRCompositorPluginProvider_Version,
2780
3913
nullptr
2781
3914
};
2782
3915
···
2794
3927
2795
3928
EVRInitError InitServer();
2796
3929
EVRInitError InitWatchdog();
3930
3930
+
EVRInitError InitCompositor();
2797
3931
2798
3932
IVRSettings *VRSettings()
2799
3933
{
···
2849
3983
return m_pVRWatchdogHost;
2850
3984
}
2851
3985
3986
3986
+
IVRCompositorDriverHost *VRCompositorDriverHost()
3987
3987
+
{
3988
3988
+
if ( m_pVRCompositorDriverHost == nullptr )
3989
3989
+
{
3990
3990
+
EVRInitError eError;
3991
3991
+
m_pVRCompositorDriverHost = ( IVRCompositorDriverHost * )VRDriverContext()->GetGenericInterface( IVRCompositorDriverHost_Version, &eError );
3992
3992
+
}
3993
3993
+
return m_pVRCompositorDriverHost;
3994
3994
+
}
3995
3995
+
2852
3996
IVRDriverLog *VRDriverLog()
2853
3997
{
2854
3998
if ( m_pVRDriverLog == nullptr )
···
2894
4038
return m_pVRDriverInput;
2895
4039
}
2896
4040
4041
4041
+
IVRIOBuffer *VRIOBuffer()
4042
4042
+
{
4043
4043
+
if ( !m_pVRIOBuffer )
4044
4044
+
{
4045
4045
+
EVRInitError eError;
4046
4046
+
m_pVRIOBuffer = (IVRIOBuffer *)VRDriverContext()->GetGenericInterface( IVRIOBuffer_Version, &eError );
4047
4047
+
}
4048
4048
+
return m_pVRIOBuffer;
4049
4049
+
}
4050
4050
+
4051
4051
+
IVRDriverSpatialAnchors *VRDriverSpatialAnchors()
4052
4052
+
{
4053
4053
+
if ( !m_pVRDriverSpatialAnchors )
4054
4054
+
{
4055
4055
+
EVRInitError eError;
4056
4056
+
m_pVRDriverSpatialAnchors = (IVRDriverSpatialAnchors *)VRDriverContext()->GetGenericInterface( IVRDriverSpatialAnchors_Version, &eError );
4057
4057
+
}
4058
4058
+
return m_pVRDriverSpatialAnchors;
4059
4059
+
}
4060
4060
+
2897
4061
private:
2898
4062
CVRPropertyHelpers m_propertyHelpers;
2899
4063
CVRHiddenAreaHelpers m_hiddenAreaHelpers;
···
2902
4066
IVRProperties *m_pVRProperties;
2903
4067
IVRServerDriverHost *m_pVRServerDriverHost;
2904
4068
IVRWatchdogHost *m_pVRWatchdogHost;
4069
4069
+
IVRCompositorDriverHost *m_pVRCompositorDriverHost;
2905
4070
IVRDriverLog *m_pVRDriverLog;
2906
4071
IVRDriverManager *m_pVRDriverManager;
2907
4072
IVRResources *m_pVRResources;
2908
4073
IVRDriverInput *m_pVRDriverInput;
4074
4074
+
IVRIOBuffer *m_pVRIOBuffer;
4075
4075
+
IVRDriverSpatialAnchors *m_pVRDriverSpatialAnchors;
2909
4076
};
2910
4077
2911
4078
inline COpenVRDriverContext &OpenVRInternal_ModuleServerDriverContext()
···
2921
4088
inline IVRDriverLog *VR_CALLTYPE VRDriverLog() { return OpenVRInternal_ModuleServerDriverContext().VRDriverLog(); }
2922
4089
inline IVRServerDriverHost *VR_CALLTYPE VRServerDriverHost() { return OpenVRInternal_ModuleServerDriverContext().VRServerDriverHost(); }
2923
4090
inline IVRWatchdogHost *VR_CALLTYPE VRWatchdogHost() { return OpenVRInternal_ModuleServerDriverContext().VRWatchdogHost(); }
4091
4091
+
inline IVRCompositorDriverHost *VR_CALLTYPE VRCompositorDriverHost() { return OpenVRInternal_ModuleServerDriverContext().VRCompositorDriverHost(); }
2924
4092
inline DriverHandle_t VR_CALLTYPE VRDriverHandle() { return OpenVRInternal_ModuleServerDriverContext().VRDriverHandle(); }
2925
4093
inline IVRDriverManager *VR_CALLTYPE VRDriverManager() { return OpenVRInternal_ModuleServerDriverContext().VRDriverManager(); }
2926
4094
inline IVRResources *VR_CALLTYPE VRResources() { return OpenVRInternal_ModuleServerDriverContext().VRResources(); }
2927
4095
inline IVRDriverInput *VR_CALLTYPE VRDriverInput() { return OpenVRInternal_ModuleServerDriverContext().VRDriverInput(); }
4096
4096
+
inline IVRIOBuffer *VR_CALLTYPE VRIOBuffer() { return OpenVRInternal_ModuleServerDriverContext().VRIOBuffer(); }
4097
4097
+
inline IVRDriverSpatialAnchors *VR_CALLTYPE VRDriverSpatialAnchors() { return OpenVRInternal_ModuleServerDriverContext().VRDriverSpatialAnchors(); }
2928
4098
2929
4099
inline void COpenVRDriverContext::Clear()
2930
4100
{
2931
4101
m_pVRSettings = nullptr;
2932
4102
m_pVRProperties = nullptr;
2933
4103
m_pVRServerDriverHost = nullptr;
2934
2934
-
m_pVRDriverLog = nullptr;
2935
4104
m_pVRWatchdogHost = nullptr;
4105
4105
+
m_pVRCompositorDriverHost = nullptr;
4106
4106
+
m_pVRDriverLog = nullptr;
2936
4107
m_pVRDriverManager = nullptr;
2937
4108
m_pVRResources = nullptr;
2938
4109
m_pVRDriverInput = nullptr;
4110
4110
+
m_pVRIOBuffer = nullptr;
4111
4111
+
m_pVRDriverSpatialAnchors = nullptr;
2939
4112
}
2940
4113
2941
4114
inline EVRInitError COpenVRDriverContext::InitServer()
···
2961
4134
return VRInitError_None;
2962
4135
}
2963
4136
4137
4137
+
inline EVRInitError COpenVRDriverContext::InitCompositor()
4138
4138
+
{
4139
4139
+
Clear();
4140
4140
+
if ( !VRCompositorDriverHost()
4141
4141
+
|| !VRSettings()
4142
4142
+
|| !VRProperties()
4143
4143
+
|| !VRDriverLog()
4144
4144
+
|| !VRDriverManager()
4145
4145
+
|| !VRResources() )
4146
4146
+
return VRInitError_Init_InterfaceNotFound;
4147
4147
+
return VRInitError_None;
4148
4148
+
}
4149
4149
+
2964
4150
inline EVRInitError InitServerDriverContext( IVRDriverContext *pContext )
2965
4151
{
2966
4152
VRDriverContext() = pContext;
···
2971
4157
{
2972
4158
VRDriverContext() = pContext;
2973
4159
return OpenVRInternal_ModuleServerDriverContext().InitWatchdog();
4160
4160
+
}
4161
4161
+
4162
4162
+
inline EVRInitError InitCompositorDriverContext( IVRDriverContext *pContext )
4163
4163
+
{
4164
4164
+
VRDriverContext() = pContext;
4165
4165
+
return OpenVRInternal_ModuleServerDriverContext().InitCompositor();
2974
4166
}
2975
4167
2976
4168
inline void CleanupDriverContext()
···
2998
4190
2999
4191
#define VR_CLEANUP_WATCHDOG_DRIVER_CONTEXT() \
3000
4192
vr::CleanupDriverContext();
4193
4193
+
4194
4194
+
#define VR_INIT_COMPOSITOR_DRIVER_CONTEXT( pContext ) \
4195
4195
+
{ \
4196
4196
+
vr::EVRInitError eError = vr::InitCompositorDriverContext( pContext ); \
4197
4197
+
if( eError != vr::VRInitError_None ) \
4198
4198
+
return eError; \
4199
4199
+
}
4200
4200
+
4201
4201
+
#define VR_CLEANUP_COMPOSITOR_DRIVER_CONTEXT() \
4202
4202
+
vr::CleanupDriverContext();
4203
4203
+
4204
4204
+
4205
4205
+
#endif // OPENVR_INTERFACE_INTERNAL
4206
4206
+
3001
4207
}
3002
4208
// End
3003
4209
3004
4210
#endif // _OPENVR_DRIVER_API
3005
4211
4212
4212
+
+5
-4
src/xrt/state_trackers/steamvr_drv/ovrd_driver.cpp
···
885
885
create_translation_rotation_matrix(&m_view_pose[0], &left);
886
886
vr::HmdMatrix34_t right;
887
887
create_translation_rotation_matrix(&m_view_pose[1], &right);
888
888
-
vr::VRServerDriverHost()->TrackedDeviceDisplayTransformUpdated(m_trackedDeviceIndex, left, right);
888
888
+
889
889
+
vr::VRServerDriverHost()->SetDisplayEyeToHead(m_trackedDeviceIndex, left, right);
889
890
890
891
891
892
m_poseUpdateThread = new std::thread(&CDeviceDriver_Monado::PoseUpdateThreadFunction, this);
···
1304
1305
1305
1306
/*
1306
1307
*
1307
1307
-
* Whatchdog code
1308
1308
+
* Watchdog code
1308
1309
*
1309
1310
*/
1310
1311
···
1338
1339
// on windows send the event when the Y key is pressed.
1339
1340
if ((0x01 & GetAsyncKeyState('Y')) != 0) {
1340
1341
// Y key was pressed.
1341
1341
-
vr::VRWatchdogHost()->WatchdogWakeUp();
1342
1342
+
vr::VRWatchdogHost()->WatchdogWakeUp(vr::TrackedDeviceClass_HMD);
1342
1343
}
1343
1344
std::this_thread::sleep_for(std::chrono::microseconds(500));
1344
1345
#else
1345
1346
ovrd_log("Watchdog wakeup\n");
1346
1347
// for the other platforms, just send one every five seconds
1347
1348
std::this_thread::sleep_for(std::chrono::seconds(1));
1348
1348
-
vr::VRWatchdogHost()->WatchdogWakeUp();
1349
1349
+
vr::VRWatchdogHost()->WatchdogWakeUp(vr::ETrackedDeviceClass::TrackedDeviceClass_HMD);
1349
1350
#endif
1350
1351
}
1351
1352