@@ -111,10 +111,11 @@ enum EVREye
111
111
Eye_Right = 1
112
112
};
113
113
114
- enum EGraphicsAPIConvention
114
+ enum ETextureType
115
115
{
116
- API_DirectX = 0 , // Normalized Z goes from 0 at the viewer to 1 at the far clip plane
117
- API_OpenGL = 1 , // Normalized Z goes from 1 at the viewer to -1 at the far clip plane
116
+ TextureType_DirectX = 0 , // Handle is an ID3D11Texture
117
+ TextureType_OpenGL = 1 , // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags
118
+ TextureType_Vulkan = 2 , // Handle is a pointer to a VRVulkanTextureData_t structure
118
119
};
119
120
120
121
enum EColorSpace
@@ -126,8 +127,8 @@ enum EColorSpace
126
127
127
128
struct Texture_t
128
129
{
129
- void * handle; // Native d3d texture pointer or GL texture id.
130
- EGraphicsAPIConvention eType;
130
+ void * handle; // See ETextureType definition above
131
+ ETextureType eType;
131
132
EColorSpace eColorSpace;
132
133
};
133
134
@@ -161,11 +162,8 @@ enum ETrackedDeviceClass
161
162
TrackedDeviceClass_Invalid = 0 , // the ID was not valid.
162
163
TrackedDeviceClass_HMD = 1 , // Head-Mounted Displays
163
164
TrackedDeviceClass_Controller = 2 , // Tracked controllers
165
+ TrackedDeviceClass_GenericTracker = 3 , // Generic trackers, similar to controllers
164
166
TrackedDeviceClass_TrackingReference = 4 , // Camera and base stations that serve as tracking reference points
165
-
166
- TrackedDeviceClass_Count, // This isn't a class that will ever be returned. It is used for allocating arrays and such
167
-
168
- TrackedDeviceClass_Other = 1000 ,
169
167
};
170
168
171
169
@@ -198,14 +196,16 @@ enum ETrackingUniverseOrigin
198
196
{
199
197
TrackingUniverseSeated = 0 , // Poses are provided relative to the seated zero pose
200
198
TrackingUniverseStanding = 1 , // Poses are provided relative to the safe bounds configured by the user
201
- TrackingUniverseRawAndUncalibrated = 2 , // Poses are provided in the coordinate system defined by the driver. You probably don't want this one.
199
+ 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.
202
200
};
203
201
204
202
205
203
/* * Each entry in this enum represents a property that can be retrieved about a
206
204
* tracked device. Many fields are only valid for one ETrackedDeviceClass. */
207
205
enum ETrackedDeviceProperty
208
206
{
207
+ Prop_Invalid = 0 ,
208
+
209
209
// general properties that apply to all device classes
210
210
Prop_TrackingSystemName_String = 1000 ,
211
211
Prop_ModelNumber_String = 1001 ,
@@ -333,6 +333,7 @@ enum ETrackedPropertyError
333
333
TrackedProp_ValueNotProvidedByDevice = 7 ,
334
334
TrackedProp_StringExceedsMaximumLength = 8 ,
335
335
TrackedProp_NotYetAvailable = 9 , // The property value isn't known yet, but is expected soon. Call again later.
336
+ TrackedProp_PermissionDenied = 10 ,
336
337
};
337
338
338
339
/* * Allows the application to control what part of the provided texture will be used in the
@@ -358,13 +359,13 @@ enum EVRSubmitFlags
358
359
// If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag.
359
360
Submit_GlRenderBuffer = 0x02 ,
360
361
361
- // Handle is pointer to VulkanData_t
362
- Submit_VulkanTexture = 0x04 ,
362
+ // Do not use
363
+ Submit_Reserved = 0x04 ,
363
364
};
364
365
365
366
/* * Data required for passing Vulkan textures to IVRCompositor::Submit.
366
367
* Be sure to call OpenVR_Shutdown before destroying these resources. */
367
- struct VulkanData_t
368
+ struct VRVulkanTextureData_t
368
369
{
369
370
uint64_t m_nImage; // VkImage
370
371
VkDevice_T *m_pDevice;
@@ -517,6 +518,8 @@ enum EVREventType
517
518
VREvent_PerformanceTest_EnableCapture = 1600 ,
518
519
VREvent_PerformanceTest_DisableCapture = 1601 ,
519
520
VREvent_PerformanceTest_FidelityLevel = 1602 ,
521
+
522
+ VREvent_MessageOverlay_Closed = 1650 ,
520
523
521
524
// Vendors are free to expose private events in this reserved region
522
525
VREvent_VendorSpecific_Reserved_Start = 10000 ,
@@ -703,6 +706,11 @@ struct VREvent_EditingCameraSurface_t
703
706
uint32_t nVisualMode;
704
707
};
705
708
709
+ struct VREvent_MessageOverlay_t
710
+ {
711
+ uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum
712
+ };
713
+
706
714
/* * NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
707
715
typedef union
708
716
{
@@ -724,6 +732,7 @@ typedef union
724
732
VREvent_ScreenshotProgress_t screenshotProgress;
725
733
VREvent_ApplicationLaunch_t applicationLaunch;
726
734
VREvent_EditingCameraSurface_t cameraSurface;
735
+ VREvent_MessageOverlay_t messageOverlay;
727
736
} VREvent_Data_t;
728
737
729
738
/* * An event posted by the server to all running applications */
@@ -944,6 +953,8 @@ enum EVRInitError
944
953
VRInitError_Init_InvalidApplicationType = 130 ,
945
954
VRInitError_Init_NotAvailableToWatchdogApps = 131 ,
946
955
VRInitError_Init_WatchdogDisabledInSettings = 132 ,
956
+ VRInitError_Init_VRDashboardNotFound = 133 ,
957
+ VRInitError_Init_VRDashboardStartupFailed = 134 ,
947
958
948
959
VRInitError_Driver_Failed = 200 ,
949
960
VRInitError_Driver_Unknown = 201 ,
@@ -1131,7 +1142,7 @@ class IVRSystem
1131
1142
virtual void GetRecommendedRenderTargetSize ( uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
1132
1143
1133
1144
/* * The projection matrix for the specified eye */
1134
- virtual HmdMatrix44_t GetProjectionMatrix ( EVREye eEye, float fNearZ , float fFarZ , EGraphicsAPIConvention eProjType ) = 0;
1145
+ virtual HmdMatrix44_t GetProjectionMatrix ( EVREye eEye, float fNearZ , float fFarZ ) = 0;
1135
1146
1136
1147
/* * The components necessary to build your own projection matrix in case your
1137
1148
* application is doing something fancy like infinite Z */
@@ -1384,7 +1395,7 @@ class IVRSystem
1384
1395
1385
1396
};
1386
1397
1387
- static const char * const IVRSystem_Version = " IVRSystem_014 " ;
1398
+ static const char * const IVRSystem_Version = " IVRSystem_015 " ;
1388
1399
1389
1400
}
1390
1401
@@ -1640,7 +1651,6 @@ namespace vr
1640
1651
1641
1652
// -----------------------------------------------------------------------------
1642
1653
// steamvr keys
1643
-
1644
1654
static const char * const k_pch_SteamVR_Section = " steamvr" ;
1645
1655
static const char * const k_pch_SteamVR_RequireHmd_String = " requireHmd" ;
1646
1656
static const char * const k_pch_SteamVR_ForcedDriverKey_String = " forcedDriver" ;
@@ -1677,27 +1687,26 @@ namespace vr
1677
1687
static const char * const k_pch_SteamVR_ShowMirrorView_Bool = " showMirrorView" ;
1678
1688
static const char * const k_pch_SteamVR_MirrorViewGeometry_String = " mirrorViewGeometry" ;
1679
1689
static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = " startMonitorFromAppLaunch" ;
1690
+ static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = " startCompositorFromAppLaunch" ;
1691
+ static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = " startDashboardFromAppLaunch" ;
1692
+ static const char * const k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = " startOverlayAppsFromDashboard" ;
1680
1693
static const char * const k_pch_SteamVR_EnableHomeApp = " enableHomeApp" ;
1681
1694
static const char * const k_pch_SteamVR_SetInitialDefaultHomeApp = " setInitialDefaultHomeApp" ;
1682
1695
static const char * const k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = " CycleBackgroundImageTimeSec" ;
1683
1696
static const char * const k_pch_SteamVR_RetailDemo_Bool = " retailDemo" ;
1684
1697
static const char * const k_pch_SteamVR_IpdOffset_Float = " ipdOffset" ;
1685
1698
1686
-
1687
1699
// -----------------------------------------------------------------------------
1688
1700
// lighthouse keys
1689
-
1690
1701
static const char * const k_pch_Lighthouse_Section = " driver_lighthouse" ;
1691
1702
static const char * const k_pch_Lighthouse_DisableIMU_Bool = " disableimu" ;
1692
1703
static const char * const k_pch_Lighthouse_UseDisambiguation_String = " usedisambiguation" ;
1693
1704
static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = " disambiguationdebug" ;
1694
-
1695
1705
static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = " primarybasestation" ;
1696
1706
static const char * const k_pch_Lighthouse_DBHistory_Bool = " dbhistory" ;
1697
1707
1698
1708
// -----------------------------------------------------------------------------
1699
1709
// null keys
1700
-
1701
1710
static const char * const k_pch_Null_Section = " driver_null" ;
1702
1711
static const char * const k_pch_Null_EnableNullDriver_Bool = " enable" ;
1703
1712
static const char * const k_pch_Null_SerialNumber_String = " serialNumber" ;
@@ -1830,7 +1839,7 @@ enum ChaperoneCalibrationState
1830
1839
1831
1840
// Errors
1832
1841
ChaperoneCalibrationState_Error = 200 , // The UniverseID is invalid
1833
- ChaperoneCalibrationState_Error_BaseStationUninitalized = 201 , // Tracking center hasn't be calibrated for at least one of the base stations
1842
+ ChaperoneCalibrationState_Error_BaseStationUninitialized = 201 , // Tracking center hasn't be calibrated for at least one of the base stations
1834
1843
ChaperoneCalibrationState_Error_BaseStationConflict = 202 , // Tracking center is calibrated, but base stations disagree on the tracking space
1835
1844
ChaperoneCalibrationState_Error_PlayAreaInvalid = 203 , // Play Area hasn't been calibrated for the current tracking center
1836
1845
ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204 , // Collision Bounds haven't been calibrated for the current tracking center
@@ -2236,9 +2245,20 @@ class IVRCompositor
2236
2245
virtual bool ReleaseSharedGLTexture ( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
2237
2246
virtual void LockGLSharedTextureForAccess ( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
2238
2247
virtual void UnlockGLSharedTextureForAccess ( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
2248
+
2249
+ /* * [Vulkan Only]
2250
+ * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
2251
+ * null. The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */
2252
+ virtual uint32_t GetVulkanInstanceExtensionsRequired ( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0;
2253
+
2254
+ /* * [Vulkan only]
2255
+ * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
2256
+ * null. The string will be a space separated list of required device extensions to enable in VkCreateDevice */
2257
+ virtual uint32_t GetVulkanDeviceExtensionsRequired ( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0;
2258
+
2239
2259
};
2240
2260
2241
- static const char * const IVRCompositor_Version = " IVRCompositor_018 " ;
2261
+ static const char * const IVRCompositor_Version = " IVRCompositor_019 " ;
2242
2262
2243
2263
} // namespace vr
2244
2264
@@ -2414,6 +2434,20 @@ namespace vr
2414
2434
// If this is set on an overlay owned by the scene application that overlay
2415
2435
// will be sorted with the "Other" overlays on top of all other scene overlays
2416
2436
VROverlayFlags_SortWithNonSceneOverlays = 14 ,
2437
+
2438
+ // If set, the overlay will be shown in the dashboard, otherwise it will be hidden.
2439
+ VROverlayFlags_VisibleInDashboard = 15 ,
2440
+ };
2441
+
2442
+ enum VRMessageOverlayResponse
2443
+ {
2444
+ VRMessageOverlayResponse_ButtonPress_0 = 0 ,
2445
+ VRMessageOverlayResponse_ButtonPress_1 = 1 ,
2446
+ VRMessageOverlayResponse_ButtonPress_2 = 2 ,
2447
+ VRMessageOverlayResponse_ButtonPress_3 = 3 ,
2448
+ VRMessageOverlayResponse_CouldntFindSystemOverlay = 4 ,
2449
+ VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5 ,
2450
+ VRMessageOverlayResponse_ApplicationQuit = 6
2417
2451
};
2418
2452
2419
2453
struct VROverlayIntersectionParams_t
@@ -2731,7 +2765,7 @@ namespace vr
2731
2765
* pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *.
2732
2766
* pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle.
2733
2767
*/
2734
- virtual EVROverlayError GetOverlayTexture ( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, EGraphicsAPIConvention *pAPI , EColorSpace *pColorSpace ) = 0;
2768
+ virtual EVROverlayError GetOverlayTexture ( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType , EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds ) = 0;
2735
2769
2736
2770
/* * Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object,
2737
2771
* so only do it once you stop rendering this texture.
@@ -2794,9 +2828,18 @@ namespace vr
2794
2828
/* * Sets a list of primitives to be used for controller ray intersection
2795
2829
* typically the size of the underlying UI in pixels (not in world space). */
2796
2830
virtual EVROverlayError SetOverlayIntersectionMask ( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof ( VROverlayIntersectionMaskPrimitive_t ) ) = 0;
2831
+
2832
+ virtual EVROverlayError GetOverlayFlags ( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0;
2833
+
2834
+ // ---------------------------------------------
2835
+ // Message box methods
2836
+ // ---------------------------------------------
2837
+
2838
+ /* * Show the message overlay. This will block and return you a result. **/
2839
+ virtual VRMessageOverlayResponse ShowMessageOverlay ( const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text = nullptr , const char * pchButton2Text = nullptr , const char * pchButton3Text = nullptr ) = 0;
2797
2840
};
2798
2841
2799
- static const char * const IVROverlay_Version = " IVROverlay_013 " ;
2842
+ static const char * const IVROverlay_Version = " IVROverlay_014 " ;
2800
2843
2801
2844
} // namespace vr
2802
2845
@@ -3041,7 +3084,7 @@ class IVRTrackedCamera
3041
3084
/* * Gets size of the image frame. */
3042
3085
virtual vr::EVRTrackedCameraError GetCameraFrameSize ( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0;
3043
3086
3044
- virtual vr::EVRTrackedCameraError GetCameraIntrinisics ( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0;
3087
+ virtual vr::EVRTrackedCameraError GetCameraIntrinsics ( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0;
3045
3088
3046
3089
virtual vr::EVRTrackedCameraError GetCameraProjection ( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0;
3047
3090
@@ -3062,7 +3105,12 @@ class IVRTrackedCamera
3062
3105
/* * Gets size of the image frame. */
3063
3106
virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize ( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
3064
3107
3065
- /* * Access a shared D3D11 texture for the specified tracked camera stream */
3108
+ /* * Access a shared D3D11 texture for the specified tracked camera stream.
3109
+ * The camera frame type VRTrackedCameraFrameType_Undistorted is not supported directly as a shared texture. It is an interior subregion of the shared texture VRTrackedCameraFrameType_MaximumUndistorted.
3110
+ * Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with
3111
+ * VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded
3112
+ * by the alpha channel having a zero component. The valid regions all have a non-zero alpha component. The subregion as described by VRTrackedCameraFrameType_Undistorted
3113
+ * guarantees a rectangle where all pixels are valid. */
3066
3114
virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11 ( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0;
3067
3115
3068
3116
/* * Access a shared GL texture for the specified tracked camera stream */
@@ -3263,7 +3311,6 @@ namespace vr
3263
3311
// They will go away in the future.
3264
3312
typedef EVRInitError HmdError;
3265
3313
typedef EVREye Hmd_Eye;
3266
- typedef EGraphicsAPIConvention GraphicsAPIConvention;
3267
3314
typedef EColorSpace ColorSpace;
3268
3315
typedef ETrackingResult HmdTrackingResult;
3269
3316
typedef ETrackedDeviceClass TrackedDeviceClass;
0 commit comments