Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/openvr.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Selan <jeremys@valvesoftware.com>2016-12-12 23:01:31 +0300
committerJeremy Selan <jeremys@valvesoftware.com>2016-12-12 23:01:31 +0300
commit9d48ccf90d709382a137de9bc429aab5f7cea5de (patch)
tree90deeca90eacd72e234cdcceea2a1a0734660d89
parent84e877f1e099173378759189609b90870f422130 (diff)
OpenVR SDK 1.0.5v1.0.5
General: * Added final support for submitting Vulkan overlays and eye images. See this document for more information: https://github.com/ValveSoftware/openvr/wiki/Vulkan * Added TextureType_Vulkan, VRVulkanTextureData_t * Rename EGraphicsAPIConvention -> ETextureType. * New synchronous MessageOverlay API. Use IVROverlay::ShowMessageOverlay to display a message with up to four buttons. * Added ETrackedDeviceClass, GenericTracker * Added ETrackedPropertyError, PermissionDenied IVRSystem (v15): * GetProjectionMatrix signature change, removed EGraphicsAPIConvention eProjType IVRCompositor (v19): * Added GetVulkanInstanceExtensionsRequired, GetVulkanDeviceExtensionsRequired IVROverlay (v14): * Added VROverlayFlags_VisibleInDashboard * GetOverlayTexture signature change (includes overlay texture bounds) * Added GetOverlayFlags * Added ShowMessageOverlay IVRTrackedCamera (v13): * Renamed GetCameraIntrinsics [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 3739504]
-rwxr-xr-xbin/linux64/libopenvr_api.sobin394088 -> 394088 bytes
-rwxr-xr-xbin/linux64/libopenvr_api.so.dbgbin3165767 -> 3166719 bytes
-rwxr-xr-xbin/osx32/libopenvr_api.dylibbin308788 -> 308788 bytes
-rw-r--r--bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylibbin2184089 -> 2188041 bytes
-rw-r--r--bin/win32/openvr_api.dllbin267040 -> 267040 bytes
-rw-r--r--bin/win32/openvr_api.pdbbin4526080 -> 4599808 bytes
-rw-r--r--bin/win64/openvr_api.dllbin314656 -> 314656 bytes
-rw-r--r--bin/win64/openvr_api.pdbbin4304896 -> 4386816 bytes
-rw-r--r--headers/openvr.h101
-rw-r--r--headers/openvr_api.cs112
-rw-r--r--headers/openvr_api.json104
-rw-r--r--headers/openvr_capi.h64
-rw-r--r--headers/openvr_driver.h45
-rwxr-xr-xlib/linux64/libopenvr_api.sobin3158647 -> 3159591 bytes
-rw-r--r--lib/win32/openvr_api.libbin5750 -> 5750 bytes
-rw-r--r--lib/win64/openvr_api.libbin5668 -> 5668 bytes
-rw-r--r--samples/bin/linux64/libopenvr_api.sobin394088 -> 394088 bytes
-rw-r--r--samples/bin/osx32/libopenvr_api.dylibbin308788 -> 308788 bytes
-rw-r--r--samples/bin/win32/openvr_api.dllbin267040 -> 267040 bytes
-rw-r--r--samples/bin/win64/openvr_api.dllbin314656 -> 314656 bytes
-rw-r--r--samples/hellovr_opengl/hellovr_opengl_main.cpp8
-rw-r--r--unity_package/Assets/Plugins/openvr_api.cs112
-rw-r--r--unity_package/Assets/SteamVR/Scripts/SteamVR.cs6
-rw-r--r--unity_package/Assets/SteamVR/Scripts/SteamVR_Camera.cs2
-rw-r--r--unity_package/Assets/SteamVR/Scripts/SteamVR_GameView.cs2
-rw-r--r--unity_package/Assets/SteamVR/Scripts/SteamVR_LoadLevel.cs6
-rw-r--r--unity_package/Assets/SteamVR/Scripts/SteamVR_Overlay.cs2
-rw-r--r--unity_package/Assets/SteamVR/Scripts/SteamVR_RenderModel.cs28
-rw-r--r--unity_package/Assets/SteamVR/Scripts/SteamVR_Skybox.cs2
-rw-r--r--unity_package/Assets/SteamVR/Scripts/SteamVR_TrackedCamera.cs4
30 files changed, 441 insertions, 157 deletions
diff --git a/bin/linux64/libopenvr_api.so b/bin/linux64/libopenvr_api.so
index a7d57c6..7b6f2d2 100755
--- a/bin/linux64/libopenvr_api.so
+++ b/bin/linux64/libopenvr_api.so
Binary files differ
diff --git a/bin/linux64/libopenvr_api.so.dbg b/bin/linux64/libopenvr_api.so.dbg
index cc7976f..c100646 100755
--- a/bin/linux64/libopenvr_api.so.dbg
+++ b/bin/linux64/libopenvr_api.so.dbg
Binary files differ
diff --git a/bin/osx32/libopenvr_api.dylib b/bin/osx32/libopenvr_api.dylib
index 2ac282b..647ec3f 100755
--- a/bin/osx32/libopenvr_api.dylib
+++ b/bin/osx32/libopenvr_api.dylib
Binary files differ
diff --git a/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib b/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib
index f10a99a..67ae4da 100644
--- a/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib
+++ b/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib
Binary files differ
diff --git a/bin/win32/openvr_api.dll b/bin/win32/openvr_api.dll
index 0b0cc0e..7aa2b99 100644
--- a/bin/win32/openvr_api.dll
+++ b/bin/win32/openvr_api.dll
Binary files differ
diff --git a/bin/win32/openvr_api.pdb b/bin/win32/openvr_api.pdb
index f477abc..a5d24ae 100644
--- a/bin/win32/openvr_api.pdb
+++ b/bin/win32/openvr_api.pdb
Binary files differ
diff --git a/bin/win64/openvr_api.dll b/bin/win64/openvr_api.dll
index 8b33ebb..bbcccde 100644
--- a/bin/win64/openvr_api.dll
+++ b/bin/win64/openvr_api.dll
Binary files differ
diff --git a/bin/win64/openvr_api.pdb b/bin/win64/openvr_api.pdb
index bde2843..b2e1f15 100644
--- a/bin/win64/openvr_api.pdb
+++ b/bin/win64/openvr_api.pdb
Binary files differ
diff --git a/headers/openvr.h b/headers/openvr.h
index d9d7dee..6617b4d 100644
--- a/headers/openvr.h
+++ b/headers/openvr.h
@@ -111,10 +111,11 @@ enum EVREye
Eye_Right = 1
};
-enum EGraphicsAPIConvention
+enum ETextureType
{
- API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane
- API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane
+ TextureType_DirectX = 0, // Handle is an ID3D11Texture
+ TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags
+ TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure
};
enum EColorSpace
@@ -126,8 +127,8 @@ enum EColorSpace
struct Texture_t
{
- void* handle; // Native d3d texture pointer or GL texture id.
- EGraphicsAPIConvention eType;
+ void* handle; // See ETextureType definition above
+ ETextureType eType;
EColorSpace eColorSpace;
};
@@ -161,11 +162,8 @@ enum ETrackedDeviceClass
TrackedDeviceClass_Invalid = 0, // the ID was not valid.
TrackedDeviceClass_HMD = 1, // Head-Mounted Displays
TrackedDeviceClass_Controller = 2, // Tracked controllers
+ TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers
TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points
-
- TrackedDeviceClass_Count, // This isn't a class that will ever be returned. It is used for allocating arrays and such
-
- TrackedDeviceClass_Other = 1000,
};
@@ -198,7 +196,7 @@ enum ETrackingUniverseOrigin
{
TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose
TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user
- TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one.
+ 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.
};
@@ -206,6 +204,8 @@ enum ETrackingUniverseOrigin
* tracked device. Many fields are only valid for one ETrackedDeviceClass. */
enum ETrackedDeviceProperty
{
+ Prop_Invalid = 0,
+
// general properties that apply to all device classes
Prop_TrackingSystemName_String = 1000,
Prop_ModelNumber_String = 1001,
@@ -333,6 +333,7 @@ enum ETrackedPropertyError
TrackedProp_ValueNotProvidedByDevice = 7,
TrackedProp_StringExceedsMaximumLength = 8,
TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later.
+ TrackedProp_PermissionDenied = 10,
};
/** Allows the application to control what part of the provided texture will be used in the
@@ -358,13 +359,13 @@ enum EVRSubmitFlags
// If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag.
Submit_GlRenderBuffer = 0x02,
- // Handle is pointer to VulkanData_t
- Submit_VulkanTexture = 0x04,
+ // Do not use
+ Submit_Reserved = 0x04,
};
/** Data required for passing Vulkan textures to IVRCompositor::Submit.
* Be sure to call OpenVR_Shutdown before destroying these resources. */
-struct VulkanData_t
+struct VRVulkanTextureData_t
{
uint64_t m_nImage; // VkImage
VkDevice_T *m_pDevice;
@@ -517,6 +518,8 @@ enum EVREventType
VREvent_PerformanceTest_EnableCapture = 1600,
VREvent_PerformanceTest_DisableCapture = 1601,
VREvent_PerformanceTest_FidelityLevel = 1602,
+
+ VREvent_MessageOverlay_Closed = 1650,
// Vendors are free to expose private events in this reserved region
VREvent_VendorSpecific_Reserved_Start = 10000,
@@ -703,6 +706,11 @@ struct VREvent_EditingCameraSurface_t
uint32_t nVisualMode;
};
+struct VREvent_MessageOverlay_t
+{
+ uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum
+};
+
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
typedef union
{
@@ -724,6 +732,7 @@ typedef union
VREvent_ScreenshotProgress_t screenshotProgress;
VREvent_ApplicationLaunch_t applicationLaunch;
VREvent_EditingCameraSurface_t cameraSurface;
+ VREvent_MessageOverlay_t messageOverlay;
} VREvent_Data_t;
/** An event posted by the server to all running applications */
@@ -944,6 +953,8 @@ enum EVRInitError
VRInitError_Init_InvalidApplicationType = 130,
VRInitError_Init_NotAvailableToWatchdogApps = 131,
VRInitError_Init_WatchdogDisabledInSettings = 132,
+ VRInitError_Init_VRDashboardNotFound = 133,
+ VRInitError_Init_VRDashboardStartupFailed = 134,
VRInitError_Driver_Failed = 200,
VRInitError_Driver_Unknown = 201,
@@ -1131,7 +1142,7 @@ public:
virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
/** The projection matrix for the specified eye */
- virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0;
+ virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ ) = 0;
/** The components necessary to build your own projection matrix in case your
* application is doing something fancy like infinite Z */
@@ -1384,7 +1395,7 @@ public:
};
-static const char * const IVRSystem_Version = "IVRSystem_014";
+static const char * const IVRSystem_Version = "IVRSystem_015";
}
@@ -1640,7 +1651,6 @@ namespace vr
//-----------------------------------------------------------------------------
// steamvr keys
-
static const char * const k_pch_SteamVR_Section = "steamvr";
static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd";
static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
@@ -1677,27 +1687,26 @@ namespace vr
static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
+ static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
+ static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
+ static const char * const k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
static const char * const k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
static const char * const k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
static const char * const k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
-
//-----------------------------------------------------------------------------
// lighthouse keys
-
static const char * const k_pch_Lighthouse_Section = "driver_lighthouse";
static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
-
static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
//-----------------------------------------------------------------------------
// null keys
-
static const char * const k_pch_Null_Section = "driver_null";
static const char * const k_pch_Null_EnableNullDriver_Bool = "enable";
static const char * const k_pch_Null_SerialNumber_String = "serialNumber";
@@ -1830,7 +1839,7 @@ enum ChaperoneCalibrationState
// Errors
ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid
- ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations
+ ChaperoneCalibrationState_Error_BaseStationUninitialized = 201, // Tracking center hasn't be calibrated for at least one of the base stations
ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space
ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center
ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center
@@ -2236,9 +2245,20 @@ public:
virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
+
+ /** [Vulkan Only]
+ * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
+ * null. The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */
+ virtual uint32_t GetVulkanInstanceExtensionsRequired( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0;
+
+ /** [Vulkan only]
+ * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
+ * null. The string will be a space separated list of required device extensions to enable in VkCreateDevice */
+ virtual uint32_t GetVulkanDeviceExtensionsRequired( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0;
+
};
-static const char * const IVRCompositor_Version = "IVRCompositor_018";
+static const char * const IVRCompositor_Version = "IVRCompositor_019";
} // namespace vr
@@ -2414,6 +2434,20 @@ namespace vr
// If this is set on an overlay owned by the scene application that overlay
// will be sorted with the "Other" overlays on top of all other scene overlays
VROverlayFlags_SortWithNonSceneOverlays = 14,
+
+ // If set, the overlay will be shown in the dashboard, otherwise it will be hidden.
+ VROverlayFlags_VisibleInDashboard = 15,
+ };
+
+ enum VRMessageOverlayResponse
+ {
+ VRMessageOverlayResponse_ButtonPress_0 = 0,
+ VRMessageOverlayResponse_ButtonPress_1 = 1,
+ VRMessageOverlayResponse_ButtonPress_2 = 2,
+ VRMessageOverlayResponse_ButtonPress_3 = 3,
+ VRMessageOverlayResponse_CouldntFindSystemOverlay = 4,
+ VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5,
+ VRMessageOverlayResponse_ApplicationQuit = 6
};
struct VROverlayIntersectionParams_t
@@ -2731,7 +2765,7 @@ namespace vr
* pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *.
* pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle.
*/
- virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, EGraphicsAPIConvention *pAPI, EColorSpace *pColorSpace ) = 0;
+ 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;
/** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object,
* so only do it once you stop rendering this texture.
@@ -2794,9 +2828,18 @@ namespace vr
/** Sets a list of primitives to be used for controller ray intersection
* typically the size of the underlying UI in pixels (not in world space). */
virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0;
+
+ virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0;
+
+ // ---------------------------------------------
+ // Message box methods
+ // ---------------------------------------------
+
+ /** Show the message overlay. This will block and return you a result. **/
+ 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;
};
- static const char * const IVROverlay_Version = "IVROverlay_013";
+ static const char * const IVROverlay_Version = "IVROverlay_014";
} // namespace vr
@@ -3041,7 +3084,7 @@ public:
/** Gets size of the image frame. */
virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0;
- virtual vr::EVRTrackedCameraError GetCameraIntrinisics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0;
+ virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0;
virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0;
@@ -3062,7 +3105,12 @@ public:
/** Gets size of the image frame. */
virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
- /** Access a shared D3D11 texture for the specified tracked camera stream */
+ /** Access a shared D3D11 texture for the specified tracked camera stream.
+ * 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.
+ * Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with
+ * VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded
+ * 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
+ * guarantees a rectangle where all pixels are valid. */
virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0;
/** Access a shared GL texture for the specified tracked camera stream */
@@ -3263,7 +3311,6 @@ namespace vr
// They will go away in the future.
typedef EVRInitError HmdError;
typedef EVREye Hmd_Eye;
- typedef EGraphicsAPIConvention GraphicsAPIConvention;
typedef EColorSpace ColorSpace;
typedef ETrackingResult HmdTrackingResult;
typedef ETrackedDeviceClass TrackedDeviceClass;
diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs
index 517e2af..98e09ef 100644
--- a/headers/openvr_api.cs
+++ b/headers/openvr_api.cs
@@ -21,7 +21,7 @@ public struct IVRSystem
internal _GetRecommendedRenderTargetSize GetRecommendedRenderTargetSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate HmdMatrix44_t _GetProjectionMatrix(EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType);
+ internal delegate HmdMatrix44_t _GetProjectionMatrix(EVREye eEye, float fNearZ, float fFarZ);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetProjectionMatrix GetProjectionMatrix;
@@ -276,9 +276,9 @@ public struct IVRTrackedCamera
internal _GetCameraFrameSize GetCameraFrameSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVRTrackedCameraError _GetCameraIntrinisics(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter);
+ internal delegate EVRTrackedCameraError _GetCameraIntrinsics(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter);
[MarshalAs(UnmanagedType.FunctionPtr)]
- internal _GetCameraIntrinisics GetCameraIntrinisics;
+ internal _GetCameraIntrinsics GetCameraIntrinsics;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _GetCameraProjection(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ref HmdMatrix44_t pProjection);
@@ -820,6 +820,16 @@ public struct IVRCompositor
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _UnlockGLSharedTextureForAccess UnlockGLSharedTextureForAccess;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate uint _GetVulkanInstanceExtensionsRequired(System.Text.StringBuilder pchValue, uint unBufferSize);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetVulkanInstanceExtensionsRequired GetVulkanInstanceExtensionsRequired;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate uint _GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice, System.Text.StringBuilder pchValue, uint unBufferSize);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetVulkanDeviceExtensionsRequired GetVulkanDeviceExtensionsRequired;
+
}
[StructLayout(LayoutKind.Sequential)]
@@ -1106,7 +1116,7 @@ public struct IVROverlay
internal _SetOverlayFromFile SetOverlayFromFile;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVROverlayError _GetOverlayTexture(ulong ulOverlayHandle, ref IntPtr pNativeTextureHandle, IntPtr pNativeTextureRef, ref uint pWidth, ref uint pHeight, ref uint pNativeFormat, ref EGraphicsAPIConvention pAPI, ref EColorSpace pColorSpace);
+ internal delegate EVROverlayError _GetOverlayTexture(ulong ulOverlayHandle, ref IntPtr pNativeTextureHandle, IntPtr pNativeTextureRef, ref uint pWidth, ref uint pHeight, ref uint pNativeFormat, ref ETextureType pAPIType, ref EColorSpace pColorSpace, ref VRTextureBounds_t pTextureBounds);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTexture GetOverlayTexture;
@@ -1190,6 +1200,16 @@ public struct IVROverlay
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayIntersectionMask SetOverlayIntersectionMask;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _GetOverlayFlags(ulong ulOverlayHandle, ref uint pFlags);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetOverlayFlags GetOverlayFlags;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate VRMessageOverlayResponse _ShowMessageOverlay(string pchText, string pchCaption, string pchButton0Text, string pchButton1Text, string pchButton2Text, string pchButton3Text);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _ShowMessageOverlay ShowMessageOverlay;
+
}
[StructLayout(LayoutKind.Sequential)]
@@ -1436,9 +1456,9 @@ public class CVRSystem
pnHeight = 0;
FnTable.GetRecommendedRenderTargetSize(ref pnWidth,ref pnHeight);
}
- public HmdMatrix44_t GetProjectionMatrix(EVREye eEye,float fNearZ,float fFarZ,EGraphicsAPIConvention eProjType)
+ public HmdMatrix44_t GetProjectionMatrix(EVREye eEye,float fNearZ,float fFarZ)
{
- HmdMatrix44_t result = FnTable.GetProjectionMatrix(eEye,fNearZ,fFarZ,eProjType);
+ HmdMatrix44_t result = FnTable.GetProjectionMatrix(eEye,fNearZ,fFarZ);
return result;
}
public void GetProjectionRaw(EVREye eEye,ref float pfLeft,ref float pfRight,ref float pfTop,ref float pfBottom)
@@ -1710,9 +1730,9 @@ public class CVRTrackedCamera
EVRTrackedCameraError result = FnTable.GetCameraFrameSize(nDeviceIndex,eFrameType,ref pnWidth,ref pnHeight,ref pnFrameBufferSize);
return result;
}
- public EVRTrackedCameraError GetCameraIntrinisics(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref HmdVector2_t pFocalLength,ref HmdVector2_t pCenter)
+ public EVRTrackedCameraError GetCameraIntrinsics(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref HmdVector2_t pFocalLength,ref HmdVector2_t pCenter)
{
- EVRTrackedCameraError result = FnTable.GetCameraIntrinisics(nDeviceIndex,eFrameType,ref pFocalLength,ref pCenter);
+ EVRTrackedCameraError result = FnTable.GetCameraIntrinsics(nDeviceIndex,eFrameType,ref pFocalLength,ref pCenter);
return result;
}
public EVRTrackedCameraError GetCameraProjection(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,float flZNear,float flZFar,ref HmdMatrix44_t pProjection)
@@ -2268,6 +2288,16 @@ public class CVRCompositor
{
FnTable.UnlockGLSharedTextureForAccess(glSharedTextureHandle);
}
+ public uint GetVulkanInstanceExtensionsRequired(System.Text.StringBuilder pchValue,uint unBufferSize)
+ {
+ uint result = FnTable.GetVulkanInstanceExtensionsRequired(pchValue,unBufferSize);
+ return result;
+ }
+ public uint GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice,System.Text.StringBuilder pchValue,uint unBufferSize)
+ {
+ uint result = FnTable.GetVulkanDeviceExtensionsRequired(pPhysicalDevice,pchValue,unBufferSize);
+ return result;
+ }
}
@@ -2574,12 +2604,12 @@ public class CVROverlay
EVROverlayError result = FnTable.SetOverlayFromFile(ulOverlayHandle,pchFilePath);
return result;
}
- public EVROverlayError GetOverlayTexture(ulong ulOverlayHandle,ref IntPtr pNativeTextureHandle,IntPtr pNativeTextureRef,ref uint pWidth,ref uint pHeight,ref uint pNativeFormat,ref EGraphicsAPIConvention pAPI,ref EColorSpace pColorSpace)
+ public EVROverlayError GetOverlayTexture(ulong ulOverlayHandle,ref IntPtr pNativeTextureHandle,IntPtr pNativeTextureRef,ref uint pWidth,ref uint pHeight,ref uint pNativeFormat,ref ETextureType pAPIType,ref EColorSpace pColorSpace,ref VRTextureBounds_t pTextureBounds)
{
pWidth = 0;
pHeight = 0;
pNativeFormat = 0;
- EVROverlayError result = FnTable.GetOverlayTexture(ulOverlayHandle,ref pNativeTextureHandle,pNativeTextureRef,ref pWidth,ref pHeight,ref pNativeFormat,ref pAPI,ref pColorSpace);
+ EVROverlayError result = FnTable.GetOverlayTexture(ulOverlayHandle,ref pNativeTextureHandle,pNativeTextureRef,ref pWidth,ref pHeight,ref pNativeFormat,ref pAPIType,ref pColorSpace,ref pTextureBounds);
return result;
}
public EVROverlayError ReleaseNativeOverlayHandle(ulong ulOverlayHandle,IntPtr pNativeTextureHandle)
@@ -2663,6 +2693,17 @@ public class CVROverlay
EVROverlayError result = FnTable.SetOverlayIntersectionMask(ulOverlayHandle,ref pMaskPrimitives,unNumMaskPrimitives,unPrimitiveSize);
return result;
}
+ public EVROverlayError GetOverlayFlags(ulong ulOverlayHandle,ref uint pFlags)
+ {
+ pFlags = 0;
+ EVROverlayError result = FnTable.GetOverlayFlags(ulOverlayHandle,ref pFlags);
+ return result;
+ }
+ public VRMessageOverlayResponse ShowMessageOverlay(string pchText,string pchCaption,string pchButton0Text,string pchButton1Text,string pchButton2Text,string pchButton3Text)
+ {
+ VRMessageOverlayResponse result = FnTable.ShowMessageOverlay(pchText,pchCaption,pchButton0Text,pchButton1Text,pchButton2Text,pchButton3Text);
+ return result;
+ }
}
@@ -2940,10 +2981,11 @@ public enum EVREye
Eye_Left = 0,
Eye_Right = 1,
}
-public enum EGraphicsAPIConvention
+public enum ETextureType
{
- API_DirectX = 0,
- API_OpenGL = 1,
+ DirectX = 0,
+ OpenGL = 1,
+ Vulkan = 2,
}
public enum EColorSpace
{
@@ -2964,9 +3006,8 @@ public enum ETrackedDeviceClass
Invalid = 0,
HMD = 1,
Controller = 2,
+ GenericTracker = 3,
TrackingReference = 4,
- Count = 5,
- Other = 1000,
}
public enum ETrackedControllerRole
{
@@ -2982,6 +3023,7 @@ public enum ETrackingUniverseOrigin
}
public enum ETrackedDeviceProperty
{
+ Prop_Invalid = 0,
Prop_TrackingSystemName_String = 1000,
Prop_ModelNumber_String = 1001,
Prop_SerialNumber_String = 1002,
@@ -3093,13 +3135,14 @@ public enum ETrackedPropertyError
TrackedProp_ValueNotProvidedByDevice = 7,
TrackedProp_StringExceedsMaximumLength = 8,
TrackedProp_NotYetAvailable = 9,
+ TrackedProp_PermissionDenied = 10,
}
public enum EVRSubmitFlags
{
Submit_Default = 0,
Submit_LensDistortionAlreadyApplied = 1,
Submit_GlRenderBuffer = 2,
- Submit_VulkanTexture = 4,
+ Submit_Reserved = 4,
}
public enum EVRState
{
@@ -3218,6 +3261,7 @@ public enum EVREventType
VREvent_PerformanceTest_EnableCapture = 1600,
VREvent_PerformanceTest_DisableCapture = 1601,
VREvent_PerformanceTest_FidelityLevel = 1602,
+ VREvent_MessageOverlay_Closed = 1650,
VREvent_VendorSpecific_Reserved_Start = 10000,
VREvent_VendorSpecific_Reserved_End = 19999,
}
@@ -3369,6 +3413,8 @@ public enum EVRInitError
Init_InvalidApplicationType = 130,
Init_NotAvailableToWatchdogApps = 131,
Init_WatchdogDisabledInSettings = 132,
+ Init_VRDashboardNotFound = 133,
+ Init_VRDashboardStartupFailed = 134,
Driver_Failed = 200,
Driver_Unknown = 201,
Driver_HmdUnknown = 202,
@@ -3507,7 +3553,7 @@ public enum ChaperoneCalibrationState
Warning_BaseStationRemoved = 102,
Warning_SeatedBoundsInvalid = 103,
Error = 200,
- Error_BaseStationUninitalized = 201,
+ Error_BaseStationUninitialized = 201,
Error_BaseStationConflict = 202,
Error_PlayAreaInvalid = 203,
Error_CollisionBoundsInvalid = 204,
@@ -3564,6 +3610,17 @@ public enum VROverlayFlags
Panorama = 12,
StereoPanorama = 13,
SortWithNonSceneOverlays = 14,
+ VisibleInDashboard = 15,
+}
+public enum VRMessageOverlayResponse
+{
+ ButtonPress_0 = 0,
+ ButtonPress_1 = 1,
+ ButtonPress_2 = 2,
+ ButtonPress_3 = 3,
+ CouldntFindSystemOverlay = 4,
+ CouldntFindOrCreateClientOverlay = 5,
+ ApplicationQuit = 6,
}
public enum EGamepadTextInputMode
{
@@ -3662,6 +3719,10 @@ public enum EVRScreenshotError
[FieldOffset(0)] public VREvent_TouchPadMove_t touchPadMove;
[FieldOffset(0)] public VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
[FieldOffset(0)] public VREvent_Screenshot_t screenshot;
+ [FieldOffset(0)] public VREvent_ScreenshotProgress_t screenshotProgress;
+ [FieldOffset(0)] public VREvent_ApplicationLaunch_t applicationLaunch;
+ [FieldOffset(0)] public VREvent_EditingCameraSurface_t cameraSurface;
+ [FieldOffset(0)] public VREvent_MessageOverlay_t messageOverlay;
[FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be at the end due to a mono bug
}
@@ -3768,7 +3829,7 @@ public enum EVRScreenshotError
[StructLayout(LayoutKind.Sequential)] public struct Texture_t
{
public IntPtr handle; // void *
- public EGraphicsAPIConvention eType;
+ public ETextureType eType;
public EColorSpace eColorSpace;
}
[StructLayout(LayoutKind.Sequential)] public struct TrackedDevicePose_t
@@ -3789,7 +3850,7 @@ public enum EVRScreenshotError
public float uMax;
public float vMax;
}
-[StructLayout(LayoutKind.Sequential)] public struct VulkanData_t
+[StructLayout(LayoutKind.Sequential)] public struct VRVulkanTextureData_t
{
public ulong m_nImage;
public IntPtr m_pDevice; // struct VkDevice_T *
@@ -3895,6 +3956,10 @@ public enum EVRScreenshotError
public ulong overlayHandle;
public uint nVisualMode;
}
+[StructLayout(LayoutKind.Sequential)] public struct VREvent_MessageOverlay_t
+{
+ public uint unVRMessageOverlayResponse;
+}
[StructLayout(LayoutKind.Sequential)] public struct VREvent_t
{
public uint eventType;
@@ -4139,7 +4204,7 @@ public class OpenVR
public const uint k_unControllerStateAxisCount = 5;
public const ulong k_ulOverlayHandleInvalid = 0;
public const uint k_unScreenshotHandleInvalid = 0;
- public const string IVRSystem_Version = "IVRSystem_014";
+ public const string IVRSystem_Version = "IVRSystem_015";
public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
public const string IVRTrackedCamera_Version = "IVRTrackedCamera_003";
public const uint k_unMaxApplicationKeyLength = 128;
@@ -4148,12 +4213,12 @@ public class OpenVR
public const string IVRApplications_Version = "IVRApplications_006";
public const string IVRChaperone_Version = "IVRChaperone_003";
public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
- public const string IVRCompositor_Version = "IVRCompositor_018";
+ public const string IVRCompositor_Version = "IVRCompositor_019";
public const uint k_unVROverlayMaxKeyLength = 128;
public const uint k_unVROverlayMaxNameLength = 128;
public const uint k_unMaxOverlayCount = 64;
public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
- public const string IVROverlay_Version = "IVROverlay_013";
+ public const string IVROverlay_Version = "IVROverlay_014";
public const string k_pch_Controller_Component_GDC2015 = "gdc2015";
public const string k_pch_Controller_Component_Base = "base";
public const string k_pch_Controller_Component_Tip = "tip";
@@ -4200,6 +4265,9 @@ public class OpenVR
public const string k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
public const string k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
public const string k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
+ public const string k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
+ public const string k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
+ public const string k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
public const string k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
public const string k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
public const string k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
diff --git a/headers/openvr_api.json b/headers/openvr_api.json
index d16771d..24509ee 100644
--- a/headers/openvr_api.json
+++ b/headers/openvr_api.json
@@ -14,7 +14,6 @@
,{"typedef": "vr::VRNotificationId","type": "uint32_t"}
,{"typedef": "vr::HmdError","type": "enum vr::EVRInitError"}
,{"typedef": "vr::Hmd_Eye","type": "enum vr::EVREye"}
-,{"typedef": "vr::GraphicsAPIConvention","type": "enum vr::EGraphicsAPIConvention"}
,{"typedef": "vr::ColorSpace","type": "enum vr::EColorSpace"}
,{"typedef": "vr::HmdTrackingResult","type": "enum vr::ETrackingResult"}
,{"typedef": "vr::TrackedDeviceClass","type": "enum vr::ETrackedDeviceClass"}
@@ -34,9 +33,10 @@
{"name": "Eye_Left","value": "0"}
,{"name": "Eye_Right","value": "1"}
]}
-, {"enumname": "vr::EGraphicsAPIConvention","values": [
- {"name": "API_DirectX","value": "0"}
- ,{"name": "API_OpenGL","value": "1"}
+, {"enumname": "vr::ETextureType","values": [
+ {"name": "TextureType_DirectX","value": "0"}
+ ,{"name": "TextureType_OpenGL","value": "1"}
+ ,{"name": "TextureType_Vulkan","value": "2"}
]}
, {"enumname": "vr::EColorSpace","values": [
{"name": "ColorSpace_Auto","value": "0"}
@@ -54,9 +54,8 @@
{"name": "TrackedDeviceClass_Invalid","value": "0"}
,{"name": "TrackedDeviceClass_HMD","value": "1"}
,{"name": "TrackedDeviceClass_Controller","value": "2"}
+ ,{"name": "TrackedDeviceClass_GenericTracker","value": "3"}
,{"name": "TrackedDeviceClass_TrackingReference","value": "4"}
- ,{"name": "TrackedDeviceClass_Count","value": "5"}
- ,{"name": "TrackedDeviceClass_Other","value": "1000"}
]}
, {"enumname": "vr::ETrackedControllerRole","values": [
{"name": "TrackedControllerRole_Invalid","value": "0"}
@@ -69,7 +68,8 @@
,{"name": "TrackingUniverseRawAndUncalibrated","value": "2"}
]}
, {"enumname": "vr::ETrackedDeviceProperty","values": [
- {"name": "Prop_TrackingSystemName_String","value": "1000"}
+ {"name": "Prop_Invalid","value": "0"}
+ ,{"name": "Prop_TrackingSystemName_String","value": "1000"}
,{"name": "Prop_ModelNumber_String","value": "1001"}
,{"name": "Prop_SerialNumber_String","value": "1002"}
,{"name": "Prop_RenderModelName_String","value": "1003"}
@@ -179,12 +179,13 @@
,{"name": "TrackedProp_ValueNotProvidedByDevice","value": "7"}
,{"name": "TrackedProp_StringExceedsMaximumLength","value": "8"}
,{"name": "TrackedProp_NotYetAvailable","value": "9"}
+ ,{"name": "TrackedProp_PermissionDenied","value": "10"}
]}
, {"enumname": "vr::EVRSubmitFlags","values": [
{"name": "Submit_Default","value": "0"}
,{"name": "Submit_LensDistortionAlreadyApplied","value": "1"}
,{"name": "Submit_GlRenderBuffer","value": "2"}
- ,{"name": "Submit_VulkanTexture","value": "4"}
+ ,{"name": "Submit_Reserved","value": "4"}
]}
, {"enumname": "vr::EVRState","values": [
{"name": "VRState_Undefined","value": "-1"}
@@ -301,6 +302,7 @@
,{"name": "VREvent_PerformanceTest_EnableCapture","value": "1600"}
,{"name": "VREvent_PerformanceTest_DisableCapture","value": "1601"}
,{"name": "VREvent_PerformanceTest_FidelityLevel","value": "1602"}
+ ,{"name": "VREvent_MessageOverlay_Closed","value": "1650"}
,{"name": "VREvent_VendorSpecific_Reserved_Start","value": "10000"}
,{"name": "VREvent_VendorSpecific_Reserved_End","value": "19999"}
]}
@@ -440,6 +442,8 @@
,{"name": "VRInitError_Init_InvalidApplicationType","value": "130"}
,{"name": "VRInitError_Init_NotAvailableToWatchdogApps","value": "131"}
,{"name": "VRInitError_Init_WatchdogDisabledInSettings","value": "132"}
+ ,{"name": "VRInitError_Init_VRDashboardNotFound","value": "133"}
+ ,{"name": "VRInitError_Init_VRDashboardStartupFailed","value": "134"}
,{"name": "VRInitError_Driver_Failed","value": "200"}
,{"name": "VRInitError_Driver_Unknown","value": "201"}
,{"name": "VRInitError_Driver_HmdUnknown","value": "202"}
@@ -570,7 +574,7 @@
,{"name": "ChaperoneCalibrationState_Warning_BaseStationRemoved","value": "102"}
,{"name": "ChaperoneCalibrationState_Warning_SeatedBoundsInvalid","value": "103"}
,{"name": "ChaperoneCalibrationState_Error","value": "200"}
- ,{"name": "ChaperoneCalibrationState_Error_BaseStationUninitalized","value": "201"}
+ ,{"name": "ChaperoneCalibrationState_Error_BaseStationUninitialized","value": "201"}
,{"name": "ChaperoneCalibrationState_Error_BaseStationConflict","value": "202"}
,{"name": "ChaperoneCalibrationState_Error_PlayAreaInvalid","value": "203"}
,{"name": "ChaperoneCalibrationState_Error_CollisionBoundsInvalid","value": "204"}
@@ -621,6 +625,16 @@
,{"name": "VROverlayFlags_Panorama","value": "12"}
,{"name": "VROverlayFlags_StereoPanorama","value": "13"}
,{"name": "VROverlayFlags_SortWithNonSceneOverlays","value": "14"}
+ ,{"name": "VROverlayFlags_VisibleInDashboard","value": "15"}
+]}
+, {"enumname": "vr::VRMessageOverlayResponse","values": [
+ {"name": "VRMessageOverlayResponse_ButtonPress_0","value": "0"}
+ ,{"name": "VRMessageOverlayResponse_ButtonPress_1","value": "1"}
+ ,{"name": "VRMessageOverlayResponse_ButtonPress_2","value": "2"}
+ ,{"name": "VRMessageOverlayResponse_ButtonPress_3","value": "3"}
+ ,{"name": "VRMessageOverlayResponse_CouldntFindSystemOverlay","value": "4"}
+ ,{"name": "VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay","value": "5"}
+ ,{"name": "VRMessageOverlayResponse_ApplicationQuit","value": "6"}
]}
, {"enumname": "vr::EGamepadTextInputMode","values": [
{"name": "k_EGamepadTextInputModeNormal","value": "0"}
@@ -712,7 +726,7 @@
,{
"constname": "k_unScreenshotHandleInvalid","consttype": "const uint32_t", "constval": "0"}
,{
- "constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_014"}
+ "constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_015"}
,{
"constname": "IVRExtendedDisplay_Version","consttype": "const char *const", "constval": "IVRExtendedDisplay_001"}
,{
@@ -730,7 +744,7 @@
,{
"constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_005"}
,{
- "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_018"}
+ "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_019"}
,{
"constname": "k_unVROverlayMaxKeyLength","consttype": "const uint32_t", "constval": "128"}
,{
@@ -740,7 +754,7 @@
,{
"constname": "k_unMaxOverlayIntersectionMaskPrimitivesCount","consttype": "const uint32_t", "constval": "32"}
,{
- "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_013"}
+ "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_014"}
,{
"constname": "k_pch_Controller_Component_GDC2015","consttype": "const char *const", "constval": "gdc2015"}
,{
@@ -834,6 +848,12 @@
,{
"constname": "k_pch_SteamVR_StartMonitorFromAppLaunch","consttype": "const char *const", "constval": "startMonitorFromAppLaunch"}
,{
+ "constname": "k_pch_SteamVR_StartCompositorFromAppLaunch_Bool","consttype": "const char *const", "constval": "startCompositorFromAppLaunch"}
+,{
+ "constname": "k_pch_SteamVR_StartDashboardFromAppLaunch_Bool","consttype": "const char *const", "constval": "startDashboardFromAppLaunch"}
+,{
+ "constname": "k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool","consttype": "const char *const", "constval": "startOverlayAppsFromDashboard"}
+,{
"constname": "k_pch_SteamVR_EnableHomeApp","consttype": "const char *const", "constval": "enableHomeApp"}
,{
"constname": "k_pch_SteamVR_SetInitialDefaultHomeApp","consttype": "const char *const", "constval": "setInitialDefaultHomeApp"}
@@ -1035,7 +1055,7 @@
{ "fieldname": "rfBlue", "fieldtype": "float [2]"}]}
,{"struct": "vr::Texture_t","fields": [
{ "fieldname": "handle", "fieldtype": "void *"},
-{ "fieldname": "eType", "fieldtype": "enum vr::EGraphicsAPIConvention"},
+{ "fieldname": "eType", "fieldtype": "enum vr::ETextureType"},
{ "fieldname": "eColorSpace", "fieldtype": "enum vr::EColorSpace"}]}
,{"struct": "vr::TrackedDevicePose_t","fields": [
{ "fieldname": "mDeviceToAbsoluteTracking", "fieldtype": "struct vr::HmdMatrix34_t"},
@@ -1049,7 +1069,7 @@
{ "fieldname": "vMin", "fieldtype": "float"},
{ "fieldname": "uMax", "fieldtype": "float"},
{ "fieldname": "vMax", "fieldtype": "float"}]}
-,{"struct": "vr::VulkanData_t","fields": [
+,{"struct": "vr::VRVulkanTextureData_t","fields": [
{ "fieldname": "m_nImage", "fieldtype": "uint64_t"},
{ "fieldname": "m_pDevice", "fieldtype": "struct VkDevice_T *"},
{ "fieldname": "m_pPhysicalDevice", "fieldtype": "struct VkPhysicalDevice_T *"},
@@ -1114,6 +1134,8 @@
,{"struct": "vr::VREvent_EditingCameraSurface_t","fields": [
{ "fieldname": "overlayHandle", "fieldtype": "uint64_t"},
{ "fieldname": "nVisualMode", "fieldtype": "uint32_t"}]}
+,{"struct": "vr::VREvent_MessageOverlay_t","fields": [
+{ "fieldname": "unVRMessageOverlayResponse", "fieldtype": "uint32_t"}]}
,{"struct": "vr::(anonymous)","fields": [
{ "fieldname": "reserved", "fieldtype": "struct vr::VREvent_Reserved_t"},
{ "fieldname": "controller", "fieldtype": "struct vr::VREvent_Controller_t"},
@@ -1132,7 +1154,8 @@
{ "fieldname": "screenshot", "fieldtype": "struct vr::VREvent_Screenshot_t"},
{ "fieldname": "screenshotProgress", "fieldtype": "struct vr::VREvent_ScreenshotProgress_t"},
{ "fieldname": "applicationLaunch", "fieldtype": "struct vr::VREvent_ApplicationLaunch_t"},
-{ "fieldname": "cameraSurface", "fieldtype": "struct vr::VREvent_EditingCameraSurface_t"}]}
+{ "fieldname": "cameraSurface", "fieldtype": "struct vr::VREvent_EditingCameraSurface_t"},
+{ "fieldname": "messageOverlay", "fieldtype": "struct vr::VREvent_MessageOverlay_t"}]}
,{"struct": "vr::VREvent_t","fields": [
{ "fieldname": "eventType", "fieldtype": "uint32_t"},
{ "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"},
@@ -1294,8 +1317,7 @@
"params": [
{ "paramname": "eEye" ,"paramtype": "vr::EVREye"},
{ "paramname": "fNearZ" ,"paramtype": "float"},
-{ "paramname": "fFarZ" ,"paramtype": "float"},
-{ "paramname": "eProjType" ,"paramtype": "vr::EGraphicsAPIConvention"}
+{ "paramname": "fFarZ" ,"paramtype": "float"}
]
}
,{
@@ -1713,7 +1735,7 @@
}
,{
"classname": "vr::IVRTrackedCamera",
- "methodname": "GetCameraIntrinisics",
+ "methodname": "GetCameraIntrinsics",
"returntype": "vr::EVRTrackedCameraError",
"params": [
{ "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"},
@@ -2573,6 +2595,25 @@
]
}
,{
+ "classname": "vr::IVRCompositor",
+ "methodname": "GetVulkanInstanceExtensionsRequired",
+ "returntype": "uint32_t",
+ "params": [
+{ "paramname": "pchValue" ,"out_string": " " ,"paramtype": "char *"},
+{ "paramname": "unBufferSize" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRCompositor",
+ "methodname": "GetVulkanDeviceExtensionsRequired",
+ "returntype": "uint32_t",
+ "params": [
+{ "paramname": "pPhysicalDevice" ,"paramtype": "struct VkPhysicalDevice_T *"},
+{ "paramname": "pchValue" ,"out_string": " " ,"paramtype": "char *"},
+{ "paramname": "unBufferSize" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
"classname": "vr::IVROverlay",
"methodname": "FindOverlay",
"returntype": "vr::EVROverlayError",
@@ -3100,8 +3141,9 @@
{ "paramname": "pWidth" ,"paramtype": "uint32_t *"},
{ "paramname": "pHeight" ,"paramtype": "uint32_t *"},
{ "paramname": "pNativeFormat" ,"paramtype": "uint32_t *"},
-{ "paramname": "pAPI" ,"paramtype": "vr::EGraphicsAPIConvention *"},
-{ "paramname": "pColorSpace" ,"paramtype": "vr::EColorSpace *"}
+{ "paramname": "pAPIType" ,"paramtype": "vr::ETextureType *"},
+{ "paramname": "pColorSpace" ,"paramtype": "vr::EColorSpace *"},
+{ "paramname": "pTextureBounds" ,"paramtype": "struct vr::VRTextureBounds_t *"}
]
}
,{
@@ -3251,6 +3293,28 @@
]
}
,{
+ "classname": "vr::IVROverlay",
+ "methodname": "GetOverlayFlags",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "pFlags" ,"paramtype": "uint32_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
+ "methodname": "ShowMessageOverlay",
+ "returntype": "vr::VRMessageOverlayResponse",
+ "params": [
+{ "paramname": "pchText" ,"paramtype": "const char *"},
+{ "paramname": "pchCaption" ,"paramtype": "const char *"},
+{ "paramname": "pchButton0Text" ,"paramtype": "const char *"},
+{ "paramname": "pchButton1Text" ,"paramtype": "const char *"},
+{ "paramname": "pchButton2Text" ,"paramtype": "const char *"},
+{ "paramname": "pchButton3Text" ,"paramtype": "const char *"}
+ ]
+}
+,{
"classname": "vr::IVRRenderModels",
"methodname": "LoadRenderModel_Async",
"returntype": "vr::EVRRenderModelError",
diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h
index 6ecbffd..daffdfb 100644
--- a/headers/openvr_capi.h
+++ b/headers/openvr_capi.h
@@ -62,7 +62,7 @@ static const unsigned int k_unMaxPropertyStringSize = 32768;
static const unsigned int k_unControllerStateAxisCount = 5;
static const unsigned long k_ulOverlayHandleInvalid = 0;
static const unsigned int k_unScreenshotHandleInvalid = 0;
-static const char * IVRSystem_Version = "IVRSystem_014";
+static const char * IVRSystem_Version = "IVRSystem_015";
static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_003";
static const unsigned int k_unMaxApplicationKeyLength = 128;
@@ -71,12 +71,12 @@ static const char * k_pch_MimeType_GameTheater = "vr/game_theater";
static const char * IVRApplications_Version = "IVRApplications_006";
static const char * IVRChaperone_Version = "IVRChaperone_003";
static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
-static const char * IVRCompositor_Version = "IVRCompositor_018";
+static const char * IVRCompositor_Version = "IVRCompositor_019";
static const unsigned int k_unVROverlayMaxKeyLength = 128;
static const unsigned int k_unVROverlayMaxNameLength = 128;
static const unsigned int k_unMaxOverlayCount = 64;
static const unsigned int k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
-static const char * IVROverlay_Version = "IVROverlay_013";
+static const char * IVROverlay_Version = "IVROverlay_014";
static const char * k_pch_Controller_Component_GDC2015 = "gdc2015";
static const char * k_pch_Controller_Component_Base = "base";
static const char * k_pch_Controller_Component_Tip = "tip";
@@ -123,6 +123,9 @@ static const char * k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
static const char * k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
static const char * k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
static const char * k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
+static const char * k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
+static const char * k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
+static const char * k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
static const char * k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
static const char * k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
static const char * k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
@@ -216,11 +219,12 @@ typedef enum EVREye
EVREye_Eye_Right = 1,
} EVREye;
-typedef enum EGraphicsAPIConvention
+typedef enum ETextureType
{
- EGraphicsAPIConvention_API_DirectX = 0,
- EGraphicsAPIConvention_API_OpenGL = 1,
-} EGraphicsAPIConvention;
+ ETextureType_TextureType_DirectX = 0,
+ ETextureType_TextureType_OpenGL = 1,
+ ETextureType_TextureType_Vulkan = 2,
+} ETextureType;
typedef enum EColorSpace
{
@@ -243,9 +247,8 @@ typedef enum ETrackedDeviceClass
ETrackedDeviceClass_TrackedDeviceClass_Invalid = 0,
ETrackedDeviceClass_TrackedDeviceClass_HMD = 1,
ETrackedDeviceClass_TrackedDeviceClass_Controller = 2,
+ ETrackedDeviceClass_TrackedDeviceClass_GenericTracker = 3,
ETrackedDeviceClass_TrackedDeviceClass_TrackingReference = 4,
- ETrackedDeviceClass_TrackedDeviceClass_Count = 5,
- ETrackedDeviceClass_TrackedDeviceClass_Other = 1000,
} ETrackedDeviceClass;
typedef enum ETrackedControllerRole
@@ -264,6 +267,7 @@ typedef enum ETrackingUniverseOrigin
typedef enum ETrackedDeviceProperty
{
+ ETrackedDeviceProperty_Prop_Invalid = 0,
ETrackedDeviceProperty_Prop_TrackingSystemName_String = 1000,
ETrackedDeviceProperty_Prop_ModelNumber_String = 1001,
ETrackedDeviceProperty_Prop_SerialNumber_String = 1002,
@@ -376,6 +380,7 @@ typedef enum ETrackedPropertyError
ETrackedPropertyError_TrackedProp_ValueNotProvidedByDevice = 7,
ETrackedPropertyError_TrackedProp_StringExceedsMaximumLength = 8,
ETrackedPropertyError_TrackedProp_NotYetAvailable = 9,
+ ETrackedPropertyError_TrackedProp_PermissionDenied = 10,
} ETrackedPropertyError;
typedef enum EVRSubmitFlags
@@ -383,7 +388,7 @@ typedef enum EVRSubmitFlags
EVRSubmitFlags_Submit_Default = 0,
EVRSubmitFlags_Submit_LensDistortionAlreadyApplied = 1,
EVRSubmitFlags_Submit_GlRenderBuffer = 2,
- EVRSubmitFlags_Submit_VulkanTexture = 4,
+ EVRSubmitFlags_Submit_Reserved = 4,
} EVRSubmitFlags;
typedef enum EVRState
@@ -504,6 +509,7 @@ typedef enum EVREventType
EVREventType_VREvent_PerformanceTest_EnableCapture = 1600,
EVREventType_VREvent_PerformanceTest_DisableCapture = 1601,
EVREventType_VREvent_PerformanceTest_FidelityLevel = 1602,
+ EVREventType_VREvent_MessageOverlay_Closed = 1650,
EVREventType_VREvent_VendorSpecific_Reserved_Start = 10000,
EVREventType_VREvent_VendorSpecific_Reserved_End = 19999,
} EVREventType;
@@ -667,6 +673,8 @@ typedef enum EVRInitError
EVRInitError_VRInitError_Init_InvalidApplicationType = 130,
EVRInitError_VRInitError_Init_NotAvailableToWatchdogApps = 131,
EVRInitError_VRInitError_Init_WatchdogDisabledInSettings = 132,
+ EVRInitError_VRInitError_Init_VRDashboardNotFound = 133,
+ EVRInitError_VRInitError_Init_VRDashboardStartupFailed = 134,
EVRInitError_VRInitError_Driver_Failed = 200,
EVRInitError_VRInitError_Driver_Unknown = 201,
EVRInitError_VRInitError_Driver_HmdUnknown = 202,
@@ -813,7 +821,7 @@ typedef enum ChaperoneCalibrationState
ChaperoneCalibrationState_Warning_BaseStationRemoved = 102,
ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103,
ChaperoneCalibrationState_Error = 200,
- ChaperoneCalibrationState_Error_BaseStationUninitalized = 201,
+ ChaperoneCalibrationState_Error_BaseStationUninitialized = 201,
ChaperoneCalibrationState_Error_BaseStationConflict = 202,
ChaperoneCalibrationState_Error_PlayAreaInvalid = 203,
ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204,
@@ -876,8 +884,20 @@ typedef enum VROverlayFlags
VROverlayFlags_Panorama = 12,
VROverlayFlags_StereoPanorama = 13,
VROverlayFlags_SortWithNonSceneOverlays = 14,
+ VROverlayFlags_VisibleInDashboard = 15,
} VROverlayFlags;
+typedef enum VRMessageOverlayResponse
+{
+ VRMessageOverlayResponse_ButtonPress_0 = 0,
+ VRMessageOverlayResponse_ButtonPress_1 = 1,
+ VRMessageOverlayResponse_ButtonPress_2 = 2,
+ VRMessageOverlayResponse_ButtonPress_3 = 3,
+ VRMessageOverlayResponse_CouldntFindSystemOverlay = 4,
+ VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay = 5,
+ VRMessageOverlayResponse_ApplicationQuit = 6,
+} VRMessageOverlayResponse;
+
typedef enum EGamepadTextInputMode
{
EGamepadTextInputMode_k_EGamepadTextInputModeNormal = 0,
@@ -987,7 +1007,6 @@ typedef int32_t TextureID_t;
typedef uint32_t VRNotificationId;
typedef EVRInitError HmdError;
typedef EVREye Hmd_Eye;
-typedef EGraphicsAPIConvention GraphicsAPIConvention;
typedef EColorSpace ColorSpace;
typedef ETrackingResult HmdTrackingResult;
typedef ETrackedDeviceClass TrackedDeviceClass;
@@ -1071,7 +1090,7 @@ typedef struct DistortionCoordinates_t
typedef struct Texture_t
{
void * handle; // void *
- enum EGraphicsAPIConvention eType;
+ enum ETextureType eType;
enum EColorSpace eColorSpace;
} Texture_t;
@@ -1093,7 +1112,7 @@ typedef struct VRTextureBounds_t
float vMax;
} VRTextureBounds_t;
-typedef struct VulkanData_t
+typedef struct VRVulkanTextureData_t
{
uint64_t m_nImage;
struct VkDevice_T * m_pDevice; // struct VkDevice_T *
@@ -1105,7 +1124,7 @@ typedef struct VulkanData_t
uint32_t m_nHeight;
uint32_t m_nFormat;
uint32_t m_nSampleCount;
-} VulkanData_t;
+} VRVulkanTextureData_t;
typedef struct VREvent_Controller_t
{
@@ -1215,6 +1234,11 @@ typedef struct VREvent_EditingCameraSurface_t
uint32_t nVisualMode;
} VREvent_EditingCameraSurface_t;
+typedef struct VREvent_MessageOverlay_t
+{
+ uint32_t unVRMessageOverlayResponse;
+} VREvent_MessageOverlay_t;
+
typedef struct HiddenAreaMesh_t
{
struct HmdVector2_t * pVertexData; // const struct vr::HmdVector2_t *
@@ -1453,7 +1477,7 @@ struct VROverlayIntersectionMaskPrimitive_t
struct VR_IVRSystem_FnTable
{
void (OPENVR_FNTABLE_CALLTYPE *GetRecommendedRenderTargetSize)(uint32_t * pnWidth, uint32_t * pnHeight);
- struct HmdMatrix44_t (OPENVR_FNTABLE_CALLTYPE *GetProjectionMatrix)(EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType);
+ struct HmdMatrix44_t (OPENVR_FNTABLE_CALLTYPE *GetProjectionMatrix)(EVREye eEye, float fNearZ, float fFarZ);
void (OPENVR_FNTABLE_CALLTYPE *GetProjectionRaw)(EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom);
bool (OPENVR_FNTABLE_CALLTYPE *ComputeDistortion)(EVREye eEye, float fU, float fV, struct DistortionCoordinates_t * pDistortionCoordinates);
struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetEyeToHeadTransform)(EVREye eEye);
@@ -1510,7 +1534,7 @@ struct VR_IVRTrackedCamera_FnTable
char * (OPENVR_FNTABLE_CALLTYPE *GetCameraErrorNameFromEnum)(EVRTrackedCameraError eCameraError);
EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *HasCamera)(TrackedDeviceIndex_t nDeviceIndex, bool * pHasCamera);
EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraFrameSize)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, uint32_t * pnWidth, uint32_t * pnHeight, uint32_t * pnFrameBufferSize);
- EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraIntrinisics)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, HmdVector2_t * pFocalLength, HmdVector2_t * pCenter);
+ EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraIntrinsics)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, HmdVector2_t * pFocalLength, HmdVector2_t * pCenter);
EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraProjection)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, HmdMatrix44_t * pProjection);
EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *AcquireVideoStreamingService)(TrackedDeviceIndex_t nDeviceIndex, TrackedCameraHandle_t * pHandle);
EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *ReleaseVideoStreamingService)(TrackedCameraHandle_t hTrackedCamera);
@@ -1631,6 +1655,8 @@ struct VR_IVRCompositor_FnTable
bool (OPENVR_FNTABLE_CALLTYPE *ReleaseSharedGLTexture)(glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle);
void (OPENVR_FNTABLE_CALLTYPE *LockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle);
void (OPENVR_FNTABLE_CALLTYPE *UnlockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetVulkanInstanceExtensionsRequired)(char * pchValue, uint32_t unBufferSize);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetVulkanDeviceExtensionsRequired)(struct VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize);
};
struct VR_IVROverlay_FnTable
@@ -1691,7 +1717,7 @@ struct VR_IVROverlay_FnTable
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ClearOverlayTexture)(VROverlayHandle_t ulOverlayHandle);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFromFile)(VROverlayHandle_t ulOverlayHandle, char * pchFilePath);
- EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, EGraphicsAPIConvention * pAPI, EColorSpace * pColorSpace);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, struct VRTextureBounds_t * pTextureBounds);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ReleaseNativeOverlayHandle)(VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureSize)(VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateDashboardOverlay)(char * pchOverlayKey, char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle);
@@ -1708,6 +1734,8 @@ struct VR_IVROverlay_FnTable
void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform);
void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardPositionForOverlay)(VROverlayHandle_t ulOverlayHandle, struct HmdRect2_t avoidRect);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayIntersectionMask)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlags)(VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags);
+ VRMessageOverlayResponse (OPENVR_FNTABLE_CALLTYPE *ShowMessageOverlay)(char * pchText, char * pchCaption, char * pchButton0Text, char * pchButton1Text, char * pchButton2Text, char * pchButton3Text);
};
struct VR_IVRRenderModels_FnTable
diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h
index ae778b8..c2d550e 100644
--- a/headers/openvr_driver.h
+++ b/headers/openvr_driver.h
@@ -111,10 +111,11 @@ enum EVREye
Eye_Right = 1
};
-enum EGraphicsAPIConvention
+enum ETextureType
{
- API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane
- API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane
+ TextureType_DirectX = 0, // Handle is an ID3D11Texture
+ TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags
+ TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure
};
enum EColorSpace
@@ -126,8 +127,8 @@ enum EColorSpace
struct Texture_t
{
- void* handle; // Native d3d texture pointer or GL texture id.
- EGraphicsAPIConvention eType;
+ void* handle; // See ETextureType definition above
+ ETextureType eType;
EColorSpace eColorSpace;
};
@@ -161,11 +162,8 @@ enum ETrackedDeviceClass
TrackedDeviceClass_Invalid = 0, // the ID was not valid.
TrackedDeviceClass_HMD = 1, // Head-Mounted Displays
TrackedDeviceClass_Controller = 2, // Tracked controllers
+ TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers
TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points
-
- TrackedDeviceClass_Count, // This isn't a class that will ever be returned. It is used for allocating arrays and such
-
- TrackedDeviceClass_Other = 1000,
};
@@ -198,7 +196,7 @@ enum ETrackingUniverseOrigin
{
TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose
TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user
- TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one.
+ 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.
};
@@ -206,6 +204,8 @@ enum ETrackingUniverseOrigin
* tracked device. Many fields are only valid for one ETrackedDeviceClass. */
enum ETrackedDeviceProperty
{
+ Prop_Invalid = 0,
+
// general properties that apply to all device classes
Prop_TrackingSystemName_String = 1000,
Prop_ModelNumber_String = 1001,
@@ -333,6 +333,7 @@ enum ETrackedPropertyError
TrackedProp_ValueNotProvidedByDevice = 7,
TrackedProp_StringExceedsMaximumLength = 8,
TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later.
+ TrackedProp_PermissionDenied = 10,
};
/** Allows the application to control what part of the provided texture will be used in the
@@ -358,13 +359,13 @@ enum EVRSubmitFlags
// If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag.
Submit_GlRenderBuffer = 0x02,
- // Handle is pointer to VulkanData_t
- Submit_VulkanTexture = 0x04,
+ // Do not use
+ Submit_Reserved = 0x04,
};
/** Data required for passing Vulkan textures to IVRCompositor::Submit.
* Be sure to call OpenVR_Shutdown before destroying these resources. */
-struct VulkanData_t
+struct VRVulkanTextureData_t
{
uint64_t m_nImage; // VkImage
VkDevice_T *m_pDevice;
@@ -517,6 +518,8 @@ enum EVREventType
VREvent_PerformanceTest_EnableCapture = 1600,
VREvent_PerformanceTest_DisableCapture = 1601,
VREvent_PerformanceTest_FidelityLevel = 1602,
+
+ VREvent_MessageOverlay_Closed = 1650,
// Vendors are free to expose private events in this reserved region
VREvent_VendorSpecific_Reserved_Start = 10000,
@@ -703,6 +706,11 @@ struct VREvent_EditingCameraSurface_t
uint32_t nVisualMode;
};
+struct VREvent_MessageOverlay_t
+{
+ uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum
+};
+
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
typedef union
{
@@ -724,6 +732,7 @@ typedef union
VREvent_ScreenshotProgress_t screenshotProgress;
VREvent_ApplicationLaunch_t applicationLaunch;
VREvent_EditingCameraSurface_t cameraSurface;
+ VREvent_MessageOverlay_t messageOverlay;
} VREvent_Data_t;
/** An event posted by the server to all running applications */
@@ -944,6 +953,8 @@ enum EVRInitError
VRInitError_Init_InvalidApplicationType = 130,
VRInitError_Init_NotAvailableToWatchdogApps = 131,
VRInitError_Init_WatchdogDisabledInSettings = 132,
+ VRInitError_Init_VRDashboardNotFound = 133,
+ VRInitError_Init_VRDashboardStartupFailed = 134,
VRInitError_Driver_Failed = 200,
VRInitError_Driver_Unknown = 201,
@@ -1257,7 +1268,6 @@ namespace vr
//-----------------------------------------------------------------------------
// steamvr keys
-
static const char * const k_pch_SteamVR_Section = "steamvr";
static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd";
static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
@@ -1294,27 +1304,26 @@ namespace vr
static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
+ static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
+ static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
+ static const char * const k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
static const char * const k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
static const char * const k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
static const char * const k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
-
//-----------------------------------------------------------------------------
// lighthouse keys
-
static const char * const k_pch_Lighthouse_Section = "driver_lighthouse";
static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
-
static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
//-----------------------------------------------------------------------------
// null keys
-
static const char * const k_pch_Null_Section = "driver_null";
static const char * const k_pch_Null_EnableNullDriver_Bool = "enable";
static const char * const k_pch_Null_SerialNumber_String = "serialNumber";
diff --git a/lib/linux64/libopenvr_api.so b/lib/linux64/libopenvr_api.so
index d3b8cc7..4647025 100755
--- a/lib/linux64/libopenvr_api.so
+++ b/lib/linux64/libopenvr_api.so
Binary files differ
diff --git a/lib/win32/openvr_api.lib b/lib/win32/openvr_api.lib
index ca1946a..1521479 100644
--- a/lib/win32/openvr_api.lib
+++ b/lib/win32/openvr_api.lib
Binary files differ
diff --git a/lib/win64/openvr_api.lib b/lib/win64/openvr_api.lib
index 89e0784..fc16c94 100644
--- a/lib/win64/openvr_api.lib
+++ b/lib/win64/openvr_api.lib
Binary files differ
diff --git a/samples/bin/linux64/libopenvr_api.so b/samples/bin/linux64/libopenvr_api.so
index a7d57c6..3b4363f 100644
--- a/samples/bin/linux64/libopenvr_api.so
+++ b/samples/bin/linux64/libopenvr_api.so
Binary files differ
diff --git a/samples/bin/osx32/libopenvr_api.dylib b/samples/bin/osx32/libopenvr_api.dylib
index 2ac282b..647ec3f 100644
--- a/samples/bin/osx32/libopenvr_api.dylib
+++ b/samples/bin/osx32/libopenvr_api.dylib
Binary files differ
diff --git a/samples/bin/win32/openvr_api.dll b/samples/bin/win32/openvr_api.dll
index 0b0cc0e..7aa2b99 100644
--- a/samples/bin/win32/openvr_api.dll
+++ b/samples/bin/win32/openvr_api.dll
Binary files differ
diff --git a/samples/bin/win64/openvr_api.dll b/samples/bin/win64/openvr_api.dll
index 8b33ebb..bbcccde 100644
--- a/samples/bin/win64/openvr_api.dll
+++ b/samples/bin/win64/openvr_api.dll
Binary files differ
diff --git a/samples/hellovr_opengl/hellovr_opengl_main.cpp b/samples/hellovr_opengl/hellovr_opengl_main.cpp
index 64d1d47..5dfc5ae 100644
--- a/samples/hellovr_opengl/hellovr_opengl_main.cpp
+++ b/samples/hellovr_opengl/hellovr_opengl_main.cpp
@@ -691,9 +691,9 @@ void CMainApplication::RenderFrame()
RenderStereoTargets();
RenderCompanionWindow();
- vr::Texture_t leftEyeTexture = {(void*)leftEyeDesc.m_nResolveTextureId, vr::API_OpenGL, vr::ColorSpace_Gamma };
+ vr::Texture_t leftEyeTexture = {(void*)leftEyeDesc.m_nResolveTextureId, vr::TextureType_OpenGL, vr::ColorSpace_Gamma };
vr::VRCompositor()->Submit(vr::Eye_Left, &leftEyeTexture );
- vr::Texture_t rightEyeTexture = {(void*)rightEyeDesc.m_nResolveTextureId, vr::API_OpenGL, vr::ColorSpace_Gamma };
+ vr::Texture_t rightEyeTexture = {(void*)rightEyeDesc.m_nResolveTextureId, vr::TextureType_OpenGL, vr::ColorSpace_Gamma };
vr::VRCompositor()->Submit(vr::Eye_Right, &rightEyeTexture );
}
@@ -1473,7 +1473,7 @@ Matrix4 CMainApplication::GetHMDMatrixProjectionEye( vr::Hmd_Eye nEye )
if ( !m_pHMD )
return Matrix4();
- vr::HmdMatrix44_t mat = m_pHMD->GetProjectionMatrix( nEye, m_fNearClip, m_fFarClip, vr::API_OpenGL);
+ vr::HmdMatrix44_t mat = m_pHMD->GetProjectionMatrix( nEye, m_fNearClip, m_fFarClip );
return Matrix4(
mat.m[0][0], mat.m[1][0], mat.m[2][0], mat.m[3][0],
@@ -1549,7 +1549,7 @@ void CMainApplication::UpdateHMDMatrixPose()
case vr::TrackedDeviceClass_Controller: m_rDevClassChar[nDevice] = 'C'; break;
case vr::TrackedDeviceClass_HMD: m_rDevClassChar[nDevice] = 'H'; break;
case vr::TrackedDeviceClass_Invalid: m_rDevClassChar[nDevice] = 'I'; break;
- case vr::TrackedDeviceClass_Other: m_rDevClassChar[nDevice] = 'O'; break;
+ case vr::TrackedDeviceClass_GenericTracker: m_rDevClassChar[nDevice] = 'G'; break;
case vr::TrackedDeviceClass_TrackingReference: m_rDevClassChar[nDevice] = 'T'; break;
default: m_rDevClassChar[nDevice] = '?'; break;
}
diff --git a/unity_package/Assets/Plugins/openvr_api.cs b/unity_package/Assets/Plugins/openvr_api.cs
index 517e2af..98e09ef 100644
--- a/unity_package/Assets/Plugins/openvr_api.cs
+++ b/unity_package/Assets/Plugins/openvr_api.cs
@@ -21,7 +21,7 @@ public struct IVRSystem
internal _GetRecommendedRenderTargetSize GetRecommendedRenderTargetSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate HmdMatrix44_t _GetProjectionMatrix(EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType);
+ internal delegate HmdMatrix44_t _GetProjectionMatrix(EVREye eEye, float fNearZ, float fFarZ);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetProjectionMatrix GetProjectionMatrix;
@@ -276,9 +276,9 @@ public struct IVRTrackedCamera
internal _GetCameraFrameSize GetCameraFrameSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVRTrackedCameraError _GetCameraIntrinisics(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter);
+ internal delegate EVRTrackedCameraError _GetCameraIntrinsics(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter);
[MarshalAs(UnmanagedType.FunctionPtr)]
- internal _GetCameraIntrinisics GetCameraIntrinisics;
+ internal _GetCameraIntrinsics GetCameraIntrinsics;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _GetCameraProjection(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ref HmdMatrix44_t pProjection);
@@ -820,6 +820,16 @@ public struct IVRCompositor
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _UnlockGLSharedTextureForAccess UnlockGLSharedTextureForAccess;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate uint _GetVulkanInstanceExtensionsRequired(System.Text.StringBuilder pchValue, uint unBufferSize);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetVulkanInstanceExtensionsRequired GetVulkanInstanceExtensionsRequired;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate uint _GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice, System.Text.StringBuilder pchValue, uint unBufferSize);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetVulkanDeviceExtensionsRequired GetVulkanDeviceExtensionsRequired;
+
}
[StructLayout(LayoutKind.Sequential)]
@@ -1106,7 +1116,7 @@ public struct IVROverlay
internal _SetOverlayFromFile SetOverlayFromFile;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVROverlayError _GetOverlayTexture(ulong ulOverlayHandle, ref IntPtr pNativeTextureHandle, IntPtr pNativeTextureRef, ref uint pWidth, ref uint pHeight, ref uint pNativeFormat, ref EGraphicsAPIConvention pAPI, ref EColorSpace pColorSpace);
+ internal delegate EVROverlayError _GetOverlayTexture(ulong ulOverlayHandle, ref IntPtr pNativeTextureHandle, IntPtr pNativeTextureRef, ref uint pWidth, ref uint pHeight, ref uint pNativeFormat, ref ETextureType pAPIType, ref EColorSpace pColorSpace, ref VRTextureBounds_t pTextureBounds);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTexture GetOverlayTexture;
@@ -1190,6 +1200,16 @@ public struct IVROverlay
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayIntersectionMask SetOverlayIntersectionMask;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _GetOverlayFlags(ulong ulOverlayHandle, ref uint pFlags);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetOverlayFlags GetOverlayFlags;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate VRMessageOverlayResponse _ShowMessageOverlay(string pchText, string pchCaption, string pchButton0Text, string pchButton1Text, string pchButton2Text, string pchButton3Text);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _ShowMessageOverlay ShowMessageOverlay;
+
}
[StructLayout(LayoutKind.Sequential)]
@@ -1436,9 +1456,9 @@ public class CVRSystem
pnHeight = 0;
FnTable.GetRecommendedRenderTargetSize(ref pnWidth,ref pnHeight);
}
- public HmdMatrix44_t GetProjectionMatrix(EVREye eEye,float fNearZ,float fFarZ,EGraphicsAPIConvention eProjType)
+ public HmdMatrix44_t GetProjectionMatrix(EVREye eEye,float fNearZ,float fFarZ)
{
- HmdMatrix44_t result = FnTable.GetProjectionMatrix(eEye,fNearZ,fFarZ,eProjType);
+ HmdMatrix44_t result = FnTable.GetProjectionMatrix(eEye,fNearZ,fFarZ);
return result;
}
public void GetProjectionRaw(EVREye eEye,ref float pfLeft,ref float pfRight,ref float pfTop,ref float pfBottom)
@@ -1710,9 +1730,9 @@ public class CVRTrackedCamera
EVRTrackedCameraError result = FnTable.GetCameraFrameSize(nDeviceIndex,eFrameType,ref pnWidth,ref pnHeight,ref pnFrameBufferSize);
return result;
}
- public EVRTrackedCameraError GetCameraIntrinisics(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref HmdVector2_t pFocalLength,ref HmdVector2_t pCenter)
+ public EVRTrackedCameraError GetCameraIntrinsics(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref HmdVector2_t pFocalLength,ref HmdVector2_t pCenter)
{
- EVRTrackedCameraError result = FnTable.GetCameraIntrinisics(nDeviceIndex,eFrameType,ref pFocalLength,ref pCenter);
+ EVRTrackedCameraError result = FnTable.GetCameraIntrinsics(nDeviceIndex,eFrameType,ref pFocalLength,ref pCenter);
return result;
}
public EVRTrackedCameraError GetCameraProjection(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,float flZNear,float flZFar,ref HmdMatrix44_t pProjection)
@@ -2268,6 +2288,16 @@ public class CVRCompositor
{
FnTable.UnlockGLSharedTextureForAccess(glSharedTextureHandle);
}
+ public uint GetVulkanInstanceExtensionsRequired(System.Text.StringBuilder pchValue,uint unBufferSize)
+ {
+ uint result = FnTable.GetVulkanInstanceExtensionsRequired(pchValue,unBufferSize);
+ return result;
+ }
+ public uint GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice,System.Text.StringBuilder pchValue,uint unBufferSize)
+ {
+ uint result = FnTable.GetVulkanDeviceExtensionsRequired(pPhysicalDevice,pchValue,unBufferSize);
+ return result;
+ }
}
@@ -2574,12 +2604,12 @@ public class CVROverlay
EVROverlayError result = FnTable.SetOverlayFromFile(ulOverlayHandle,pchFilePath);
return result;
}
- public EVROverlayError GetOverlayTexture(ulong ulOverlayHandle,ref IntPtr pNativeTextureHandle,IntPtr pNativeTextureRef,ref uint pWidth,ref uint pHeight,ref uint pNativeFormat,ref EGraphicsAPIConvention pAPI,ref EColorSpace pColorSpace)
+ public EVROverlayError GetOverlayTexture(ulong ulOverlayHandle,ref IntPtr pNativeTextureHandle,IntPtr pNativeTextureRef,ref uint pWidth,ref uint pHeight,ref uint pNativeFormat,ref ETextureType pAPIType,ref EColorSpace pColorSpace,ref VRTextureBounds_t pTextureBounds)
{
pWidth = 0;
pHeight = 0;
pNativeFormat = 0;
- EVROverlayError result = FnTable.GetOverlayTexture(ulOverlayHandle,ref pNativeTextureHandle,pNativeTextureRef,ref pWidth,ref pHeight,ref pNativeFormat,ref pAPI,ref pColorSpace);
+ EVROverlayError result = FnTable.GetOverlayTexture(ulOverlayHandle,ref pNativeTextureHandle,pNativeTextureRef,ref pWidth,ref pHeight,ref pNativeFormat,ref pAPIType,ref pColorSpace,ref pTextureBounds);
return result;
}
public EVROverlayError ReleaseNativeOverlayHandle(ulong ulOverlayHandle,IntPtr pNativeTextureHandle)
@@ -2663,6 +2693,17 @@ public class CVROverlay
EVROverlayError result = FnTable.SetOverlayIntersectionMask(ulOverlayHandle,ref pMaskPrimitives,unNumMaskPrimitives,unPrimitiveSize);
return result;
}
+ public EVROverlayError GetOverlayFlags(ulong ulOverlayHandle,ref uint pFlags)
+ {
+ pFlags = 0;
+ EVROverlayError result = FnTable.GetOverlayFlags(ulOverlayHandle,ref pFlags);
+ return result;
+ }
+ public VRMessageOverlayResponse ShowMessageOverlay(string pchText,string pchCaption,string pchButton0Text,string pchButton1Text,string pchButton2Text,string pchButton3Text)
+ {
+ VRMessageOverlayResponse result = FnTable.ShowMessageOverlay(pchText,pchCaption,pchButton0Text,pchButton1Text,pchButton2Text,pchButton3Text);
+ return result;
+ }
}
@@ -2940,10 +2981,11 @@ public enum EVREye
Eye_Left = 0,
Eye_Right = 1,
}
-public enum EGraphicsAPIConvention
+public enum ETextureType
{
- API_DirectX = 0,
- API_OpenGL = 1,
+ DirectX = 0,
+ OpenGL = 1,
+ Vulkan = 2,
}
public enum EColorSpace
{
@@ -2964,9 +3006,8 @@ public enum ETrackedDeviceClass
Invalid = 0,
HMD = 1,
Controller = 2,
+ GenericTracker = 3,
TrackingReference = 4,
- Count = 5,
- Other = 1000,
}
public enum ETrackedControllerRole
{
@@ -2982,6 +3023,7 @@ public enum ETrackingUniverseOrigin
}
public enum ETrackedDeviceProperty
{
+ Prop_Invalid = 0,
Prop_TrackingSystemName_String = 1000,
Prop_ModelNumber_String = 1001,
Prop_SerialNumber_String = 1002,
@@ -3093,13 +3135,14 @@ public enum ETrackedPropertyError
TrackedProp_ValueNotProvidedByDevice = 7,
TrackedProp_StringExceedsMaximumLength = 8,
TrackedProp_NotYetAvailable = 9,
+ TrackedProp_PermissionDenied = 10,
}
public enum EVRSubmitFlags
{
Submit_Default = 0,
Submit_LensDistortionAlreadyApplied = 1,
Submit_GlRenderBuffer = 2,
- Submit_VulkanTexture = 4,
+ Submit_Reserved = 4,
}
public enum EVRState
{
@@ -3218,6 +3261,7 @@ public enum EVREventType
VREvent_PerformanceTest_EnableCapture = 1600,
VREvent_PerformanceTest_DisableCapture = 1601,
VREvent_PerformanceTest_FidelityLevel = 1602,
+ VREvent_MessageOverlay_Closed = 1650,
VREvent_VendorSpecific_Reserved_Start = 10000,
VREvent_VendorSpecific_Reserved_End = 19999,
}
@@ -3369,6 +3413,8 @@ public enum EVRInitError
Init_InvalidApplicationType = 130,
Init_NotAvailableToWatchdogApps = 131,
Init_WatchdogDisabledInSettings = 132,
+ Init_VRDashboardNotFound = 133,
+ Init_VRDashboardStartupFailed = 134,
Driver_Failed = 200,
Driver_Unknown = 201,
Driver_HmdUnknown = 202,
@@ -3507,7 +3553,7 @@ public enum ChaperoneCalibrationState
Warning_BaseStationRemoved = 102,
Warning_SeatedBoundsInvalid = 103,
Error = 200,
- Error_BaseStationUninitalized = 201,
+ Error_BaseStationUninitialized = 201,
Error_BaseStationConflict = 202,
Error_PlayAreaInvalid = 203,
Error_CollisionBoundsInvalid = 204,
@@ -3564,6 +3610,17 @@ public enum VROverlayFlags
Panorama = 12,
StereoPanorama = 13,
SortWithNonSceneOverlays = 14,
+ VisibleInDashboard = 15,
+}
+public enum VRMessageOverlayResponse
+{
+ ButtonPress_0 = 0,
+ ButtonPress_1 = 1,
+ ButtonPress_2 = 2,
+ ButtonPress_3 = 3,
+ CouldntFindSystemOverlay = 4,
+ CouldntFindOrCreateClientOverlay = 5,
+ ApplicationQuit = 6,
}
public enum EGamepadTextInputMode
{
@@ -3662,6 +3719,10 @@ public enum EVRScreenshotError
[FieldOffset(0)] public VREvent_TouchPadMove_t touchPadMove;
[FieldOffset(0)] public VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
[FieldOffset(0)] public VREvent_Screenshot_t screenshot;
+ [FieldOffset(0)] public VREvent_ScreenshotProgress_t screenshotProgress;
+ [FieldOffset(0)] public VREvent_ApplicationLaunch_t applicationLaunch;
+ [FieldOffset(0)] public VREvent_EditingCameraSurface_t cameraSurface;
+ [FieldOffset(0)] public VREvent_MessageOverlay_t messageOverlay;
[FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be at the end due to a mono bug
}
@@ -3768,7 +3829,7 @@ public enum EVRScreenshotError
[StructLayout(LayoutKind.Sequential)] public struct Texture_t
{
public IntPtr handle; // void *
- public EGraphicsAPIConvention eType;
+ public ETextureType eType;
public EColorSpace eColorSpace;
}
[StructLayout(LayoutKind.Sequential)] public struct TrackedDevicePose_t
@@ -3789,7 +3850,7 @@ public enum EVRScreenshotError
public float uMax;
public float vMax;
}
-[StructLayout(LayoutKind.Sequential)] public struct VulkanData_t
+[StructLayout(LayoutKind.Sequential)] public struct VRVulkanTextureData_t
{
public ulong m_nImage;
public IntPtr m_pDevice; // struct VkDevice_T *
@@ -3895,6 +3956,10 @@ public enum EVRScreenshotError
public ulong overlayHandle;
public uint nVisualMode;
}
+[StructLayout(LayoutKind.Sequential)] public struct VREvent_MessageOverlay_t
+{
+ public uint unVRMessageOverlayResponse;
+}
[StructLayout(LayoutKind.Sequential)] public struct VREvent_t
{
public uint eventType;
@@ -4139,7 +4204,7 @@ public class OpenVR
public const uint k_unControllerStateAxisCount = 5;
public const ulong k_ulOverlayHandleInvalid = 0;
public const uint k_unScreenshotHandleInvalid = 0;
- public const string IVRSystem_Version = "IVRSystem_014";
+ public const string IVRSystem_Version = "IVRSystem_015";
public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
public const string IVRTrackedCamera_Version = "IVRTrackedCamera_003";
public const uint k_unMaxApplicationKeyLength = 128;
@@ -4148,12 +4213,12 @@ public class OpenVR
public const string IVRApplications_Version = "IVRApplications_006";
public const string IVRChaperone_Version = "IVRChaperone_003";
public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
- public const string IVRCompositor_Version = "IVRCompositor_018";
+ public const string IVRCompositor_Version = "IVRCompositor_019";
public const uint k_unVROverlayMaxKeyLength = 128;
public const uint k_unVROverlayMaxNameLength = 128;
public const uint k_unMaxOverlayCount = 64;
public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
- public const string IVROverlay_Version = "IVROverlay_013";
+ public const string IVROverlay_Version = "IVROverlay_014";
public const string k_pch_Controller_Component_GDC2015 = "gdc2015";
public const string k_pch_Controller_Component_Base = "base";
public const string k_pch_Controller_Component_Tip = "tip";
@@ -4200,6 +4265,9 @@ public class OpenVR
public const string k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
public const string k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
public const string k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
+ public const string k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
+ public const string k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
+ public const string k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
public const string k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
public const string k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
public const string k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
diff --git a/unity_package/Assets/SteamVR/Scripts/SteamVR.cs b/unity_package/Assets/SteamVR/Scripts/SteamVR.cs
index b8f26ef..8c7fd68 100644
--- a/unity_package/Assets/SteamVR/Scripts/SteamVR.cs
+++ b/unity_package/Assets/SteamVR/Scripts/SteamVR.cs
@@ -160,7 +160,7 @@ public class SteamVR : System.IDisposable
public Vector2 tanHalfFov { get; private set; }
public VRTextureBounds_t[] textureBounds { get; private set; }
public SteamVR_Utils.RigidTransform[] eyes { get; private set; }
- public EGraphicsAPIConvention graphicsAPI;
+ public ETextureType textureType;
// hmd properties
public string hmd_TrackingSystemName { get { return GetStringProperty(ETrackedDeviceProperty.Prop_TrackingSystemName_String); } }
@@ -323,9 +323,9 @@ public class SteamVR : System.IDisposable
new SteamVR_Utils.RigidTransform(hmd.GetEyeToHeadTransform(EVREye.Eye_Right)) };
if (SystemInfo.graphicsDeviceVersion.StartsWith("OpenGL"))
- graphicsAPI = EGraphicsAPIConvention.API_OpenGL;
+ textureType = ETextureType.OpenGL;
else
- graphicsAPI = EGraphicsAPIConvention.API_DirectX;
+ textureType = ETextureType.DirectX;
SteamVR_Utils.Event.Listen("initializing", OnInitializing);
SteamVR_Utils.Event.Listen("calibrating", OnCalibrating);
diff --git a/unity_package/Assets/SteamVR/Scripts/SteamVR_Camera.cs b/unity_package/Assets/SteamVR/Scripts/SteamVR_Camera.cs
index 21c4b6e..3e85210 100644
--- a/unity_package/Assets/SteamVR/Scripts/SteamVR_Camera.cs
+++ b/unity_package/Assets/SteamVR/Scripts/SteamVR_Camera.cs
@@ -386,7 +386,7 @@ public class SteamVR_Camera : MonoBehaviour
void OnPreRender()
{
if (flip)
- flip.enabled = (SteamVR_Render.Top() == this && SteamVR.instance.graphicsAPI == EGraphicsAPIConvention.API_DirectX);
+ flip.enabled = (SteamVR_Render.Top() == this && SteamVR.instance.textureType == ETextureType.DirectX);
var headCam = head.GetComponent<Camera>();
if (headCam != null)
diff --git a/unity_package/Assets/SteamVR/Scripts/SteamVR_GameView.cs b/unity_package/Assets/SteamVR/Scripts/SteamVR_GameView.cs
index afaaad7..f74eb08 100644
--- a/unity_package/Assets/SteamVR/Scripts/SteamVR_GameView.cs
+++ b/unity_package/Assets/SteamVR/Scripts/SteamVR_GameView.cs
@@ -28,7 +28,7 @@ public class SteamVR_GameView : MonoBehaviour
if (mirrorTexture == null)
{
var vr = SteamVR.instance;
- if (vr != null && vr.graphicsAPI == EGraphicsAPIConvention.API_DirectX)
+ if (vr != null && vr.textureType == ETextureType.DirectX)
{
var tex = new Texture2D(2, 2);
var nativeTex = System.IntPtr.Zero;
diff --git a/unity_package/Assets/SteamVR/Scripts/SteamVR_LoadLevel.cs b/unity_package/Assets/SteamVR/Scripts/SteamVR_LoadLevel.cs
index 1d07664..2dffc7f 100644
--- a/unity_package/Assets/SteamVR/Scripts/SteamVR_LoadLevel.cs
+++ b/unity_package/Assets/SteamVR/Scripts/SteamVR_LoadLevel.cs
@@ -163,7 +163,7 @@ public class SteamVR_LoadLevel : MonoBehaviour
{
var texture = new Texture_t();
texture.handle = renderTexture.GetNativeTexturePtr();
- texture.eType = SteamVR.instance.graphicsAPI;
+ texture.eType = SteamVR.instance.textureType;
texture.eColorSpace = EColorSpace.Auto;
overlay.SetOverlayTexture(progressBarOverlayHandle, ref texture);
}
@@ -274,7 +274,7 @@ public class SteamVR_LoadLevel : MonoBehaviour
{
var texture = new Texture_t();
texture.handle = loadingScreen.GetNativeTexturePtr();
- texture.eType = SteamVR.instance.graphicsAPI;
+ texture.eType = SteamVR.instance.textureType;
texture.eColorSpace = EColorSpace.Auto;
overlay.SetOverlayTexture(loadingScreenOverlayHandle, ref texture);
}
@@ -487,7 +487,7 @@ public class SteamVR_LoadLevel : MonoBehaviour
overlay.SetOverlayWidthInMeters(handle, widthInMeters);
// D3D textures are upside-down in Unity to match OpenGL.
- if (SteamVR.instance.graphicsAPI == EGraphicsAPIConvention.API_DirectX)
+ if (SteamVR.instance.textureType == ETextureType.DirectX)
{
var textureBounds = new VRTextureBounds_t();
textureBounds.uMin = 0;
diff --git a/unity_package/Assets/SteamVR/Scripts/SteamVR_Overlay.cs b/unity_package/Assets/SteamVR/Scripts/SteamVR_Overlay.cs
index d2505c0..9d0563c 100644
--- a/unity_package/Assets/SteamVR/Scripts/SteamVR_Overlay.cs
+++ b/unity_package/Assets/SteamVR/Scripts/SteamVR_Overlay.cs
@@ -80,7 +80,7 @@ public class SteamVR_Overlay : MonoBehaviour
var tex = new Texture_t();
tex.handle = texture.GetNativeTexturePtr();
- tex.eType = SteamVR.instance.graphicsAPI;
+ tex.eType = SteamVR.instance.textureType;
tex.eColorSpace = EColorSpace.Auto;
overlay.SetOverlayTexture(handle, ref tex);
diff --git a/unity_package/Assets/SteamVR/Scripts/SteamVR_RenderModel.cs b/unity_package/Assets/SteamVR/Scripts/SteamVR_RenderModel.cs
index ba16347..d8b394c 100644
--- a/unity_package/Assets/SteamVR/Scripts/SteamVR_RenderModel.cs
+++ b/unity_package/Assets/SteamVR/Scripts/SteamVR_RenderModel.cs
@@ -386,7 +386,20 @@ public class SteamVR_RenderModel : MonoBehaviour
{
var diffuseTexture = (RenderModel_TextureMap_t)Marshal.PtrToStructure(pDiffuseTexture, typeof(RenderModel_TextureMap_t));
var texture = new Texture2D(diffuseTexture.unWidth, diffuseTexture.unHeight, TextureFormat.ARGB32, false);
- if (SystemInfo.graphicsDeviceVersion.StartsWith("OpenGL"))
+ if (SystemInfo.graphicsDeviceVersion.StartsWith("Direct3D 11"))
+ {
+ texture.Apply();
+
+ while (true)
+ {
+ error = renderModels.LoadIntoTextureD3D11_Async(renderModel.diffuseTextureId, texture.GetNativeTexturePtr());
+ if (error != EVRRenderModelError.Loading)
+ break;
+
+ System.Threading.Thread.Sleep(1);
+ }
+ }
+ else
{
var textureMapData = new byte[diffuseTexture.unWidth * diffuseTexture.unHeight * 4]; // RGBA
Marshal.Copy(diffuseTexture.rubTextureMapData, textureMapData, 0, textureMapData.Length);
@@ -408,19 +421,6 @@ public class SteamVR_RenderModel : MonoBehaviour
texture.SetPixels32(colors);
texture.Apply();
}
- else
- {
- texture.Apply();
-
- while (true)
- {
- error = renderModels.LoadIntoTextureD3D11_Async(renderModel.diffuseTextureId, texture.GetNativeTexturePtr());
- if (error != EVRRenderModelError.Loading)
- break;
-
- System.Threading.Thread.Sleep(1);
- }
- }
material = new Material(shader != null ? shader : Shader.Find("Standard"));
material.mainTexture = texture;
diff --git a/unity_package/Assets/SteamVR/Scripts/SteamVR_Skybox.cs b/unity_package/Assets/SteamVR/Scripts/SteamVR_Skybox.cs
index 5701bec..d4e3fc6 100644
--- a/unity_package/Assets/SteamVR/Scripts/SteamVR_Skybox.cs
+++ b/unity_package/Assets/SteamVR/Scripts/SteamVR_Skybox.cs
@@ -81,7 +81,7 @@ public class SteamVR_Skybox : MonoBehaviour
for (int i = 0; i < 6; i++)
{
textures[i].handle = (handles[i] != null) ? handles[i].GetNativeTexturePtr() : System.IntPtr.Zero;
- textures[i].eType = SteamVR.instance.graphicsAPI;
+ textures[i].eType = SteamVR.instance.textureType;
textures[i].eColorSpace = EColorSpace.Auto;
}
var error = compositor.SetSkyboxOverride(textures);
diff --git a/unity_package/Assets/SteamVR/Scripts/SteamVR_TrackedCamera.cs b/unity_package/Assets/SteamVR/Scripts/SteamVR_TrackedCamera.cs
index f9eeee3..f6b4ffa 100644
--- a/unity_package/Assets/SteamVR/Scripts/SteamVR_TrackedCamera.cs
+++ b/unity_package/Assets/SteamVR/Scripts/SteamVR_TrackedCamera.cs
@@ -89,7 +89,7 @@ public class SteamVR_TrackedCamera
var deviceTexture = (_texture != null) ? _texture : new Texture2D(2, 2);
var headerSize = (uint)System.Runtime.InteropServices.Marshal.SizeOf(header.GetType());
- if (vr.graphicsAPI == EGraphicsAPIConvention.API_OpenGL)
+ if (vr.textureType == ETextureType.OpenGL)
{
if (glTextureId != 0)
trackedCamera.ReleaseVideoStreamTextureGL(videostream.handle, glTextureId);
@@ -99,7 +99,7 @@ public class SteamVR_TrackedCamera
nativeTex = (System.IntPtr)glTextureId;
}
- else
+ else if (vr.textureType == ETextureType.DirectX)
{
if (trackedCamera.GetVideoStreamTextureD3D11(videostream.handle, frameType, deviceTexture.GetNativeTexturePtr(), ref nativeTex, ref header, headerSize) != EVRTrackedCameraError.None)
return;