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:
authorJoe Ludwig <joe@valvesoftware.com>2021-02-25 03:57:03 +0300
committerJoe Ludwig <joe@valvesoftware.com>2021-02-25 03:57:03 +0300
commit4c85abcb7f7f1f02adaf3812018c99fc593bc341 (patch)
treec454257eefbabb80a425d9947529935e95b8d6ea
parente3d37563fd0405117f035c111346f60ca12625ba (diff)
# OpenVR SDK 1.16.8v1.16.8
IVRCompositor: * Added support for OpenGL array textures via the Submit_GLArrayTexture flag. IVROverlay: * Added support for overlays that support projections via SetOverlayTransformProjection [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 6385862]
-rwxr-xr-xbin/linux32/libopenvr_api.sobin322067 -> 1327304 bytes
-rwxr-xr-xbin/linux32/libopenvr_api.so.dbgbin2246922 -> 5791326 bytes
-rwxr-xr-xbin/linux64/libopenvr_api.sobin325366 -> 346120 bytes
-rwxr-xr-xbin/linux64/libopenvr_api.so.dbgbin2814093 -> 3336016 bytes
-rw-r--r--bin/win32/openvr_api.dllbin621520 -> 620760 bytes
-rw-r--r--bin/win32/openvr_api.dll.sigbin1450 -> 1450 bytes
-rw-r--r--bin/win32/openvr_api.pdbbin10989568 -> 11030528 bytes
-rw-r--r--bin/win64/openvr_api.dllbin819664 -> 818904 bytes
-rw-r--r--bin/win64/openvr_api.dll.sigbin1450 -> 1450 bytes
-rw-r--r--bin/win64/openvr_api.pdbbin10866688 -> 10891264 bytes
-rw-r--r--headers/openvr.h512
-rw-r--r--headers/openvr_api.cs72
-rw-r--r--headers/openvr_api.json73
-rw-r--r--headers/openvr_capi.h62
-rw-r--r--headers/openvr_driver.h286
-rwxr-xr-xlib/linux32/libopenvr_api.sobin2246922 -> 5790732 bytes
-rwxr-xr-xlib/linux64/libopenvr_api.sobin2814093 -> 3335136 bytes
-rw-r--r--lib/win32/openvr_api.libbin6772 -> 5578 bytes
-rw-r--r--lib/win64/openvr_api.libbin6666 -> 5500 bytes
-rw-r--r--samples/bin/linux32/libopenvr_api.sobin322067 -> 1327304 bytes
-rw-r--r--samples/bin/linux64/libopenvr_api.sobin325366 -> 346120 bytes
-rw-r--r--samples/bin/win32/openvr_api.dllbin621520 -> 620760 bytes
-rw-r--r--samples/bin/win64/openvr_api.dllbin819664 -> 818904 bytes
-rw-r--r--src/openvr_api_public.cpp21
-rw-r--r--src/vrcommon/dirtools_public.cpp6
-rw-r--r--src/vrcommon/envvartools_public.cpp4
-rw-r--r--src/vrcommon/hmderrors_public.cpp14
-rw-r--r--src/vrcommon/pathtools_public.cpp58
-rw-r--r--src/vrcommon/pathtools_public.h2
-rw-r--r--src/vrcommon/sharedlibtools_public.cpp2
-rw-r--r--src/vrcommon/strtools_public.cpp68
-rw-r--r--src/vrcommon/strtools_public.h8
-rw-r--r--src/vrcommon/vrpathregistry_public.cpp54
-rw-r--r--src/vrcommon/vrpathregistry_public.h7
34 files changed, 881 insertions, 368 deletions
diff --git a/bin/linux32/libopenvr_api.so b/bin/linux32/libopenvr_api.so
index af4b2e1..d87f274 100755
--- a/bin/linux32/libopenvr_api.so
+++ b/bin/linux32/libopenvr_api.so
Binary files differ
diff --git a/bin/linux32/libopenvr_api.so.dbg b/bin/linux32/libopenvr_api.so.dbg
index d3341df..a8d7547 100755
--- a/bin/linux32/libopenvr_api.so.dbg
+++ b/bin/linux32/libopenvr_api.so.dbg
Binary files differ
diff --git a/bin/linux64/libopenvr_api.so b/bin/linux64/libopenvr_api.so
index cfb9c13..906f06d 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 7af8049..753f794 100755
--- a/bin/linux64/libopenvr_api.so.dbg
+++ b/bin/linux64/libopenvr_api.so.dbg
Binary files differ
diff --git a/bin/win32/openvr_api.dll b/bin/win32/openvr_api.dll
index 2c79942..6e423e6 100644
--- a/bin/win32/openvr_api.dll
+++ b/bin/win32/openvr_api.dll
Binary files differ
diff --git a/bin/win32/openvr_api.dll.sig b/bin/win32/openvr_api.dll.sig
index 2c015a7..3e308fc 100644
--- a/bin/win32/openvr_api.dll.sig
+++ b/bin/win32/openvr_api.dll.sig
Binary files differ
diff --git a/bin/win32/openvr_api.pdb b/bin/win32/openvr_api.pdb
index 356597c..ff635ec 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 e0113cd..a4ad764 100644
--- a/bin/win64/openvr_api.dll
+++ b/bin/win64/openvr_api.dll
Binary files differ
diff --git a/bin/win64/openvr_api.dll.sig b/bin/win64/openvr_api.dll.sig
index 1f4c14f..eb635ee 100644
--- a/bin/win64/openvr_api.dll.sig
+++ b/bin/win64/openvr_api.dll.sig
Binary files differ
diff --git a/bin/win64/openvr_api.pdb b/bin/win64/openvr_api.pdb
index 51e6a1c..4a4b91d 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 5c03b28..ff6d1fe 100644
--- a/headers/openvr.h
+++ b/headers/openvr.h
@@ -12,39 +12,23 @@
// version.h
+
namespace vr
{
static const uint32_t k_nSteamVRVersionMajor = 1;
- static const uint32_t k_nSteamVRVersionMinor = 14;
- static const uint32_t k_nSteamVRVersionBuild = 15;
+ static const uint32_t k_nSteamVRVersionMinor = 16;
+ static const uint32_t k_nSteamVRVersionBuild = 8;
} // namespace vr
-// vrtypes.h
-#ifndef _INCLUDE_VRTYPES_H
-#define _INCLUDE_VRTYPES_H
+// public_vrtypes.h
-// Forward declarations to avoid requiring vulkan.h
-struct VkDevice_T;
-struct VkPhysicalDevice_T;
-struct VkInstance_T;
-struct VkQueue_T;
-
-// Forward declarations to avoid requiring d3d12.h
-struct ID3D12Resource;
-struct ID3D12CommandQueue;
+#ifndef _INCLUDE_CORE_VRTYPES_PUBLIC_H
+#define _INCLUDE_CORE_VRTYPES_PUBLIC_H
namespace vr
{
#pragma pack( push, 8 )
-/** A handle for a spatial anchor. This handle is only valid during the session it was created in.
-* Anchors that live beyond one session should be saved by their string descriptors. */
-typedef uint32_t SpatialAnchorHandle_t;
-
-typedef void* glSharedTextureHandle_t;
-typedef int32_t glInt_t;
-typedef uint32_t glUInt_t;
-
// right-handed system
// +y is up
// +x is to the right
@@ -111,8 +95,49 @@ struct HmdRect2_t
HmdVector2_t vBottomRight;
};
-/** Used to return the post-distortion UVs for each color channel.
-* UVs range from 0 to 1 with 0,0 in the upper left corner of the
+/** Holds the transform for a single bone */
+struct VRBoneTransform_t
+{
+ HmdVector4_t position;
+ HmdQuaternionf_t orientation;
+};
+
+#pragma pack( pop )
+
+} // namespace vr
+
+#endif
+
+// vrtypes.h
+
+#ifndef _INCLUDE_VRTYPES_H
+#define _INCLUDE_VRTYPES_H
+
+// Forward declarations to avoid requiring vulkan.h
+struct VkDevice_T;
+struct VkPhysicalDevice_T;
+struct VkInstance_T;
+struct VkQueue_T;
+
+// Forward declarations to avoid requiring d3d12.h
+struct ID3D12Resource;
+struct ID3D12CommandQueue;
+
+namespace vr
+{
+#pragma pack( push, 8 )
+
+/** A handle for a spatial anchor. This handle is only valid during the session it was created in.
+* Anchors that live beyond one session should be saved by their string descriptors. */
+typedef uint32_t SpatialAnchorHandle_t;
+
+typedef void* glSharedTextureHandle_t;
+typedef int32_t glInt_t;
+typedef uint32_t glUInt_t;
+
+
+/** Used to return the post-distortion UVs for each color channel.
+* UVs range from 0 to 1 with 0,0 in the upper left corner of the
* source render target. The 0,0 to 1,1 range covers a single eye. */
struct DistortionCoordinates_t
{
@@ -135,7 +160,7 @@ enum ETextureType
TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure
TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef, deprecated in favor of TextureType_Metal on supported platforms
TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure
- TextureType_DXGISharedHandle = 5, // Handle is a HANDLE DXGI share handle, only supported for Overlay render targets.
+ TextureType_DXGISharedHandle = 5, // Handle is a HANDLE DXGI share handle, only supported for Overlay render targets.
// this texture is used directly by our renderer, so only perform atomic (copyresource or resolve) on it
TextureType_Metal = 6, // Handle is a MTLTexture conforming to the MTLSharedTexture protocol. Textures submitted to IVRCompositor::Submit which
// are of type MTLTextureType2DArray assume layer 0 is the left eye texture (vr::EVREye::Eye_left), layer 1 is the right
@@ -368,8 +393,8 @@ enum ETrackedDeviceProperty
Prop_SecondsFromVsyncToPhotons_Float = 2001,
Prop_DisplayFrequency_Float = 2002,
Prop_UserIpdMeters_Float = 2003,
- Prop_CurrentUniverseId_Uint64 = 2004,
- Prop_PreviousUniverseId_Uint64 = 2005,
+ Prop_CurrentUniverseId_Uint64 = 2004,
+ Prop_PreviousUniverseId_Uint64 = 2005,
Prop_DisplayFirmwareVersion_Uint64 = 2006,
Prop_IsOnDesktop_Bool = 2007,
Prop_DisplayMCType_Int32 = 2008,
@@ -450,11 +475,14 @@ enum ETrackedDeviceProperty
Prop_DisplaySupportsAnalogGain_Bool = 2085,
Prop_DisplayMinAnalogGain_Float = 2086,
Prop_DisplayMaxAnalogGain_Float = 2087,
-
+ Prop_CameraExposureTime_Float = 2088,
+ Prop_CameraGlobalGain_Float = 2089,
// Prop_DashboardLayoutPathName_String = 2090, // DELETED
Prop_DashboardScale_Float = 2091,
Prop_IpdUIRangeMinMeters_Float = 2100,
Prop_IpdUIRangeMaxMeters_Float = 2101,
+ Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102,
+ Prop_Hmd_SupportsMicMonitoring_Bool = 2103,
// Driver requested mura correction properties
Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200,
@@ -529,7 +557,7 @@ enum ETrackedDeviceProperty
// Vendors are free to expose private debug data in this reserved region
Prop_VendorSpecific_Reserved_Start = 10000,
Prop_VendorSpecific_Reserved_End = 10999,
-
+
Prop_TrackedDeviceProperty_Max = 1000000,
};
@@ -638,10 +666,18 @@ enum EVRSubmitFlags
// Set to indicate that pTexture->handle is a contains VRVulkanTextureArrayData_t
Submit_VulkanTextureWithArrayData = 0x40,
+
+ // If the texture pointer passed in is an OpenGL Array texture, set this flag
+ Submit_GlArrayTexture = 0x80,
+
+ // Do not use
+ Submit_Reserved2 = 0x8000,
+
+
};
/** Data required for passing Vulkan textures to IVRCompositor::Submit.
-* Be sure to call OpenVR_Shutdown before destroying these resources.
+* Be sure to call OpenVR_Shutdown before destroying these resources.
* Please see https://github.com/ValveSoftware/openvr/wiki/Vulkan for Vulkan-specific documentation */
struct VRVulkanTextureData_t
{
@@ -655,7 +691,7 @@ struct VRVulkanTextureData_t
};
/** Data required for passing Vulkan texture arrays to IVRCompositor::Submit.
-* Be sure to call OpenVR_Shutdown before destroying these resources.
+* Be sure to call OpenVR_Shutdown before destroying these resources.
* Please see https://github.com/ValveSoftware/openvr/wiki/Vulkan for Vulkan-specific documentation */
struct VRVulkanTextureArrayData_t : public VRVulkanTextureData_t
{
@@ -718,7 +754,7 @@ enum EVREventType
// VREvent_DualAnalog_Move = 254, // No longer sent
// VREvent_DualAnalog_ModeSwitch1 = 255, // No longer sent
// VREvent_DualAnalog_ModeSwitch2 = 256, // No longer sent
- VREvent_Modal_Cancel = 257, // Sent to overlays with the
+ VREvent_Modal_Cancel = 257, // Sent to overlays with the
VREvent_MouseMove = 300, // data is mouse
VREvent_MouseButtonDown = 301, // data is mouse
@@ -728,7 +764,7 @@ enum EVREventType
VREvent_ScrollDiscrete = 305, // data is scroll
VREvent_TouchPadMove = 306, // data is mouse
VREvent_OverlayFocusChanged = 307, // data is overlay, global event
- VREvent_ReloadOverlays = 308,
+ VREvent_ReloadOverlays = 308,
VREvent_ScrollSmooth = 309, // data is scroll
VREvent_LockMousePosition = 310,
VREvent_UnlockMousePosition = 311,
@@ -882,7 +918,7 @@ enum EVREventType
VREvent_MessageOverlay_Closed = 1650,
VREvent_MessageOverlayCloseRequested = 1651,
-
+
VREvent_Input_HapticVibration = 1700, // data is hapticVibration
VREvent_Input_BindingLoadFailed = 1701, // data is inputBinding
VREvent_Input_BindingLoadSuccessful = 1702, // data is inputBinding
@@ -915,10 +951,10 @@ enum EVREventType
// VREvent_TrackedDeviceUserInteractionStarted fires when the devices transitions from Standby -> UserInteraction or Idle -> UserInteraction.
// VREvent_TrackedDeviceUserInteractionEnded fires when the devices transitions from UserInteraction_Timeout -> Idle
enum EDeviceActivityLevel
-{
- k_EDeviceActivityLevel_Unknown = -1,
+{
+ k_EDeviceActivityLevel_Unknown = -1,
k_EDeviceActivityLevel_Idle = 0, // No activity for the last 10 seconds
- k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now
+ k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now
k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds
k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management)
k_EDeviceActivityLevel_Idle_Timeout = 4,
@@ -936,7 +972,7 @@ enum EVRButtonId
k_EButton_DPad_Right = 5,
k_EButton_DPad_Down = 6,
k_EButton_A = 7,
-
+
k_EButton_ProximitySensor = 31,
k_EButton_Axis0 = 32,
@@ -1035,6 +1071,7 @@ struct VREvent_Overlay_t
{
uint64_t overlayHandle;
uint64_t devicePath;
+ uint64_t memoryBlockId;
};
@@ -1233,9 +1270,9 @@ typedef union
} VREvent_Data_t;
-#if defined(__linux__) || defined(__APPLE__)
-// This structure was originally defined mis-packed on Linux, preserved for
-// compatibility.
+#if defined(__linux__) || defined(__APPLE__)
+// This structure was originally defined mis-packed on Linux, preserved for
+// compatibility.
#pragma pack( push, 4 )
#endif
@@ -1249,7 +1286,7 @@ struct VREvent_t
VREvent_Data_t data;
};
-#if defined(__linux__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__APPLE__)
#pragma pack( pop )
#endif
@@ -1318,9 +1355,9 @@ enum EVRSpatialAnchorError
VRSpatialAnchorError_UnknownDriver = 13,
};
-/** The mesh to draw into the stencil (or depth) buffer to perform
+/** The mesh to draw into the stencil (or depth) buffer to perform
* early stencil (or depth) kills of pixels that will never appear on the HMD.
-* This mesh draws on all the pixels that will be hidden after distortion.
+* This mesh draws on all the pixels that will be hidden after distortion.
*
* If the HMD does not provide a visible area mesh pVertexData will be
* NULL and unTriangleCount will be 0. */
@@ -1341,7 +1378,7 @@ enum EHiddenAreaMeshType
};
-/** Identifies what kind of axis is on the controller at index n. Read this type
+/** Identifies what kind of axis is on the controller at index n. Read this type
* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n );
*/
enum EVRControllerAxisType
@@ -1365,16 +1402,16 @@ struct VRControllerAxis_t
static const uint32_t k_unControllerStateAxisCount = 5;
-#if defined(__linux__) || defined(__APPLE__)
-// This structure was originally defined mis-packed on Linux, preserved for
-// compatibility.
+#if defined(__linux__) || defined(__APPLE__)
+// This structure was originally defined mis-packed on Linux, preserved for
+// compatibility.
#pragma pack( push, 4 )
#endif
/** Holds all the state of a controller at one moment in time. */
struct VRControllerState001_t
{
- // If packet num matches that on your prior call, then the controller state hasn't been changed since
+ // If packet num matches that on your prior call, then the controller state hasn't been changed since
// your last call and there is no need to process it
uint32_t unPacketNum;
@@ -1385,7 +1422,7 @@ struct VRControllerState001_t
// Axis data for the controller's analog inputs
VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ];
};
-#if defined(__linux__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__APPLE__)
#pragma pack( pop )
#endif
@@ -1449,12 +1486,12 @@ enum EVROverlayError
VROverlayError_TextureNotLocked = 33,
};
-/** enum values to pass in to VR_Init to identify whether the application will
+/** enum values to pass in to VR_Init to identify whether the application will
* draw a 3D scene. */
enum EVRApplicationType
{
- VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries
- VRApplication_Scene = 1, // Application will submit 3D frames
+ VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries
+ VRApplication_Scene = 1, // Application will submit 3D frames
VRApplication_Overlay = 2, // Application only interacts with overlays
VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not
// keep it running if everything else quits.
@@ -1464,12 +1501,25 @@ enum EVRApplicationType
VRApplication_SteamWatchdog = 6,// Reserved for Steam
VRApplication_Bootstrapper = 7, // reserved for vrstartup
VRApplication_WebHelper = 8, // reserved for vrwebhelper
- VRApplication_OpenXR = 9, // reserved for openxr
+ VRApplication_OpenXRInstance = 9, // reserved for openxr (created instance, but not session yet)
+ VRApplication_OpenXRScene = 10, // reserved for openxr (started session)
+ VRApplication_OpenXROverlay = 11, // reserved for openxr (started overlay session)
+ VRApplication_Prism = 12, // reserved for the vrprismhost process
VRApplication_Max
};
+/** returns true if the specified application type is one of the
+* OpenXR types */
+inline bool IsOpenXRAppType( EVRApplicationType eType )
+{
+ return eType == VRApplication_OpenXRInstance
+ || eType == VRApplication_OpenXRScene
+ || eType == VRApplication_OpenXROverlay;
+}
+
+
/** error codes for firmware */
enum EVRFirmwareError
{
@@ -1505,17 +1555,17 @@ enum EVRSkeletalMotionRange
enum EVRSkeletalTrackingLevel
{
// body part location can't be directly determined by the device. Any skeletal pose provided by
- // the device is estimated by assuming the position required to active buttons, triggers, joysticks,
- // or other input sensors.
+ // the device is estimated by assuming the position required to active buttons, triggers, joysticks,
+ // or other input sensors.
// E.g. Vive Controller, Gamepad
VRSkeletalTracking_Estimated = 0,
- // body part location can be measured directly but with fewer degrees of freedom than the actual body
- // part. Certain body part positions may be unmeasured by the device and estimated from other input data.
+ // body part location can be measured directly but with fewer degrees of freedom than the actual body
+ // part. Certain body part positions may be unmeasured by the device and estimated from other input data.
// E.g. Index Controllers, gloves that only measure finger curl
VRSkeletalTracking_Partial = 1,
- // Body part location can be measured directly throughout the entire range of motion of the body part.
+ // Body part location can be measured directly throughout the entire range of motion of the body part.
// E.g. Mocap suit for the full body, gloves that measure rotation of each finger segment
VRSkeletalTracking_Full = 2,
@@ -1524,14 +1574,6 @@ enum EVRSkeletalTrackingLevel
};
-
-/** Holds the transform for a single bone */
-struct VRBoneTransform_t
-{
- HmdVector4_t position;
- HmdQuaternionf_t orientation;
-};
-
/** Type used for referring to bones by their index */
typedef int32_t BoneIndex_t;
const BoneIndex_t k_unInvalidBoneIndex = -1;
@@ -1562,8 +1604,8 @@ enum EVRInitError
VRInitError_Init_AppInfoInitFailed = 114,
VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver
VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup
- VRInitError_Init_AnotherAppLaunching = 117,
- VRInitError_Init_SettingsInitFailed = 118,
+ VRInitError_Init_AnotherAppLaunching = 117,
+ VRInitError_Init_SettingsInitFailed = 118,
VRInitError_Init_ShuttingDown = 119,
VRInitError_Init_TooManyObjects = 120,
VRInitError_Init_NoServerForBackgroundApp = 121,
@@ -1574,7 +1616,7 @@ enum EVRInitError
VRInitError_Init_HmdNotFoundPresenceFailed = 126,
VRInitError_Init_VRMonitorNotFound = 127,
VRInitError_Init_VRMonitorStartupFailed = 128,
- VRInitError_Init_LowPowerWatchdogNotSupported = 129,
+ VRInitError_Init_LowPowerWatchdogNotSupported = 129,
VRInitError_Init_InvalidApplicationType = 130,
VRInitError_Init_NotAvailableToWatchdogApps = 131,
VRInitError_Init_WatchdogDisabledInSettings = 132,
@@ -1592,6 +1634,15 @@ enum EVRInitError
VRInitError_Init_FailedForVrMonitor = 144,
VRInitError_Init_PropertyManagerInitFailed = 145,
VRInitError_Init_WebServerFailed = 146,
+ VRInitError_Init_IllegalTypeTransition = 147,
+ VRInitError_Init_MismatchedRuntimes = 148,
+ VRInitError_Init_InvalidProcessId = 149,
+ VRInitError_Init_VRServiceStartupFailed = 150,
+ VRInitError_Init_PrismNeedsNewDrivers = 151,
+ VRInitError_Init_PrismStartupTimedOut = 152,
+ VRInitError_Init_CouldNotStartPrism = 153,
+ VRInitError_Init_CreateDriverDirectDeviceFailed = 154,
+ VRInitError_Init_PrismExitedUnexpectedly = 155,
VRInitError_Driver_Failed = 200,
VRInitError_Driver_Unknown = 201,
@@ -1712,7 +1763,10 @@ enum EVRInitError
VRInitError_Compositor_CreateOverlayInvalidCall = 488,
VRInitError_Compositor_CreateOverlayAlreadyInitialized = 489,
VRInitError_Compositor_FailedToCreateMailbox = 490,
-
+ VRInitError_Compositor_WindowInterfaceIsNull = 491,
+ VRInitError_Compositor_SystemLayerCreateInstance = 492,
+ VRInitError_Compositor_SystemLayerCreateSession = 493,
+
VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
VRInitError_VendorSpecific_WindowsNotInDevMode = 1001,
@@ -1757,7 +1811,7 @@ enum EVRTrackedCameraError
{
VRTrackedCameraError_None = 0,
VRTrackedCameraError_OperationFailed = 100,
- VRTrackedCameraError_InvalidHandle = 101,
+ VRTrackedCameraError_InvalidHandle = 101,
VRTrackedCameraError_InvalidFrameHeaderVersion = 102,
VRTrackedCameraError_OutOfHandles = 103,
VRTrackedCameraError_IPCFailure = 104,
@@ -1781,7 +1835,7 @@ enum EVRTrackedCameraFrameLayout
EVRTrackedCameraFrameLayout_VerticalLayout = 0x0010, // Stereo frames are Top/Bottom (left/right)
EVRTrackedCameraFrameLayout_HorizontalLayout = 0x0020, // Stereo frames are Left/Right
};
-
+
enum EVRTrackedCameraFrameType
{
VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted.
@@ -1814,7 +1868,7 @@ struct CameraVideoStreamFrameHeader_t
uint32_t nFrameSequence;
TrackedDevicePose_t trackedDevicePose;
-
+
uint64_t ulFrameExposureTime; // mid-point of the exposure of the image in host system ticks
};
@@ -1835,18 +1889,18 @@ const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the
const uint32_t VRCompositor_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame
-const uint32_t VRCompositor_PredictionMask = 0x30; // The runtime may predict more than one frame (up to four) ahead if
+const uint32_t VRCompositor_PredictionMask = 0xF0; // The runtime may predict more than one frame (up to four) ahead if
// it detects the application is taking too long to render. These two
// bits will contain the count of additional frames (normally zero).
// Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from
// the latest frame timing entry.
-const uint32_t VRCompositor_ThrottleMask = 0xC0; // Number of frames the compositor is throttling the application.
+const uint32_t VRCompositor_ThrottleMask = 0xF00; // Number of frames the compositor is throttling the application.
// Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from
// the latest frame timing entry.
#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 )
-#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 6 )
+#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 8 )
/** Provides a single frame's timing information to the app */
struct Compositor_FrameTiming
@@ -1938,7 +1992,7 @@ enum Imu_OffScaleFlags
OffScale_GyroY = 0x10,
OffScale_GyroZ = 0x20,
};
-
+
struct ImuSample_t
{
double fSampleTime;
@@ -1967,7 +2021,7 @@ struct ImuSample_t
#ifdef VR_API_EXPORT
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
#else
- #define VR_INTERFACE extern "C"
+ #define VR_INTERFACE extern "C"
#endif
#else
@@ -1978,15 +2032,14 @@ struct ImuSample_t
#if defined( _WIN32 )
#define VR_CALLTYPE __cdecl
#else
- #define VR_CALLTYPE
+ #define VR_CALLTYPE
#endif
} // namespace vr
-
#endif // _INCLUDE_VRTYPES_H
-
// vrannotation.h
+
#ifdef API_GEN
# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
#else
@@ -2006,6 +2059,7 @@ struct ImuSample_t
#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" )
// ivrsystem.h
+
namespace vr
{
@@ -2028,20 +2082,20 @@ public:
* application is doing something fancy like infinite Z */
virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0;
- /** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in
+ /** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in
* the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport.
* Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */
virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0;
/** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head
- * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection.
- * Normally View and Eye^-1 will be multiplied together and treated as View in your application.
+ * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection.
+ * Normally View and Eye^-1 will be multiplied together and treated as View in your application.
*/
virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0;
- /** Returns the number of elapsed seconds since the last recorded vsync event. This
+ /** Returns the number of elapsed seconds since the last recorded vsync event. This
* will come from a vsync timer event in the timer if possible or from the application-reported
- * time if that is not available. If no vsync times are available the function will
+ * time if that is not available. If no vsync times are available the function will
* return zero for vsync time and frame counter and return false from the method. */
virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0;
@@ -2052,11 +2106,11 @@ public:
virtual int32_t GetD3D9AdapterIndex() = 0;
/** [D3D10/11 Only]
- * Returns the adapter index that the user should pass into EnumAdapters to create the device
+ * Returns the adapter index that the user should pass into EnumAdapters to create the device
* and swap chain in DX10 and DX11. If an error occurs the index will be set to -1.
*/
virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0;
-
+
/**
* Returns platform- and texture-type specific adapter identification so that applications and the
* compositor are creating textures and swap chains on the same GPU. If an error occurs the device
@@ -2095,30 +2149,30 @@ public:
// Tracking Methods
// ------------------------------------
- /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the
+ /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the
* future. Pass 0 to get the state at the instant the method is called. Most of the time the application should
* calculate the time until the photons will be emitted from the display and pass that time into the method.
*
- * This is roughly analogous to the inverse of the view matrix in most applications, though
+ * This is roughly analogous to the inverse of the view matrix in most applications, though
* many games will need to do some additional rotation or translation on top of the rotation
* and translation provided by the head pose.
*
* For devices where bPoseIsValid is true the application can use the pose to position the device
- * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount.
+ * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount.
*
* Seated experiences should call this method with TrackingUniverseSeated and receive poses relative
- * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding
- * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should
+ * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding
+ * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should
* probably not be used unless the application is the Chaperone calibration tool itself, but will provide
* poses relative to the hardware-specific coordinate system in the driver.
*/
virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0;
- /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows
+ /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows
* applications to represent the seated origin to used or transform object positions from one coordinate
- * system to the other.
+ * system to the other.
*
- * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position
+ * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position
* depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */
virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0;
@@ -2151,10 +2205,10 @@ public:
/** Returns the device class of a tracked device. If there has not been a device connected in this slot
* since the application started this function will return TrackedDevice_Invalid. For previous detected
- * devices the function will return the previously observed device class.
+ * devices the function will return the previously observed device class.
*
* To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check
- * the device class. Every device with something other than TrackedDevice_Invalid is associated with an
+ * the device class. Every device with something other than TrackedDevice_Invalid is associated with an
* actual tracked device. */
virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0;
@@ -2175,18 +2229,18 @@ public:
/** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */
virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0;
-
+
/** Returns an array of one type of property. If the device index is not valid or the property is not a single value or an array of the specified type,
* this function will return 0. Otherwise it returns the number of bytes necessary to hold the array of properties. If unBufferSize is
* greater than the returned size and pBuffer is non-NULL, pBuffer is filled with the contents of array of properties. */
virtual uint32_t GetArrayTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, PropertyTypeTag_t propType, void *pBuffer, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0;
- /** Returns a string property. If the device index is not valid or the property is not a string type this function will
+ /** Returns a string property. If the device index is not valid or the property is not a string type this function will
* return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
* null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */
virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0;
- /** returns a string that corresponds with the specified property error. The string will be the name
+ /** returns a string that corresponds with the specified property error. The string will be the name
* of the error enum value for all valid error codes */
virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0;
@@ -2199,8 +2253,8 @@ public:
virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0;
/** Returns true and fills the event with the next event on the queue if there is one. If there are no events
- * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct.
- * This pose will always be older than the call to this function and should not be used to render the device.
+ * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct.
+ * This pose will always be older than the call to this function and should not be used to render the device.
uncbVREvent should be the size in bytes of the VREvent_t struct */
virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0;
@@ -2213,7 +2267,7 @@ public:
/** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is
* applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively.
- * This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view.
+ * This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view.
* This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader.
* NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye.
* Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover.
@@ -2229,7 +2283,7 @@ public:
* is invalid. This function is deprecated in favor of the new IVRInput system. */
virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0;
- /** fills the supplied struct with the current state of the controller and the provided pose with the pose of
+ /** fills the supplied struct with the current state of the controller and the provided pose with the pose of
* the controller when the controller state was updated most recently. Use this form if you need a precise controller
* pose as input to your application when the user presses or releases a button. This function is deprecated in favor of the new IVRInput system. */
virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0;
@@ -2244,7 +2298,7 @@ public:
/** returns the name of an EVRControllerAxisType enum value. This function is deprecated in favor of the new IVRInput system. */
virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0;
- /** Returns true if this application is receiving input from the system. This would return false if
+ /** Returns true if this application is receiving input from the system. This would return false if
* system-related functionality is consuming the input stream. */
virtual bool IsInputAvailable() = 0;
@@ -2263,11 +2317,11 @@ public:
// ------------------------------------
// Firmware methods
// ------------------------------------
-
- /** Performs the actual firmware update if applicable.
- * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished
+
+ /** Performs the actual firmware update if applicable.
+ * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished
* Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String
- * to figure our whether a firmware update is available, and to figure out whether its a manual update
+ * to figure our whether a firmware update is available, and to figure out whether its a manual update
* Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */
virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0;
@@ -2283,7 +2337,7 @@ public:
// App container sandbox methods
// -------------------------------------
- /** Retrieves a null-terminated, semicolon-delimited list of UTF8 file paths that an application
+ /** Retrieves a null-terminated, semicolon-delimited list of UTF8 file paths that an application
* must have read access to when running inside of an app container. Returns the number of bytes
* needed to hold the list. */
virtual uint32_t GetAppContainerFilePaths( VR_OUT_STRING() char *pchBuffer, uint32_t unBufferSize ) = 0;
@@ -2307,6 +2361,7 @@ static const char * const IVRSystem_Version = "IVRSystem_022";
// ivrapplications.h
+
namespace vr
{
@@ -2321,13 +2376,13 @@ namespace vr
VRApplicationError_InvalidIndex = 103,
VRApplicationError_UnknownApplication = 104, // the application could not be found
VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail
- VRApplicationError_ApplicationAlreadyRunning = 106,
+ VRApplicationError_ApplicationAlreadyRunning = 106,
VRApplicationError_InvalidManifest = 107,
VRApplicationError_InvalidApplication = 108,
VRApplicationError_LaunchFailed = 109, // the process didn't start
VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application
VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application
- VRApplicationError_OldApplicationQuitting = 112,
+ VRApplicationError_OldApplicationQuitting = 112,
VRApplicationError_TransitionAborted = 113,
VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication)
VRApplicationError_SteamVRIsExiting = 115,
@@ -2336,6 +2391,8 @@ namespace vr
VRApplicationError_PropertyNotSet = 201, // The requested property was not set
VRApplicationError_UnknownProperty = 202,
VRApplicationError_InvalidParameter = 203,
+
+ VRApplicationError_NotImplemented = 300, // Fcn is not implemented in current interface
};
/** The maximum length of an application key */
@@ -2393,7 +2450,7 @@ namespace vr
// --------------- Application management --------------- //
- /** Adds an application manifest to the list to load when building the list of installed applications.
+ /** Adds an application manifest to the list to load when building the list of installed applications.
* Temporary manifests are not automatically loaded */
virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0;
@@ -2406,12 +2463,12 @@ namespace vr
/** Returns the number of applications available in the list */
virtual uint32_t GetApplicationCount() = 0;
- /** Returns the key of the specified application. The index is at least 0 and is less than the return
- * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to
+ /** Returns the key of the specified application. The index is at least 0 and is less than the return
+ * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to
* fit the key. */
virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0;
- /** Returns the key of the application for the specified Process Id. The buffer should be at least
+ /** Returns the key of the application for the specified Process Id. The buffer should be at least
* k_unMaxApplicationKeyLength in order to fit the key. */
virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0;
@@ -2427,7 +2484,7 @@ namespace vr
/** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */
virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0;
- /** Launches the dashboard overlay application if it is not already running. This call is only valid for
+ /** Launches the dashboard overlay application if it is not already running. This call is only valid for
* dashboard overlay applications. */
virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0;
@@ -2435,8 +2492,8 @@ namespace vr
virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0;
/** Identifies a running application. OpenVR can't always tell which process started in response
- * to a URL. This function allows a URL handler (or the process itself) to identify the app key
- * for the now running application. Passing a process ID of 0 identifies the calling process.
+ * to a URL. This function allows a URL handler (or the process itself) to identify the app key
+ * for the now running application. Passing a process ID of 0 identifies the calling process.
* The application must be one that's known to the system via a call to AddApplicationManifest. */
virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0;
@@ -2501,9 +2558,9 @@ namespace vr
virtual const char *GetSceneApplicationStateNameFromEnum( EVRSceneApplicationState state ) = 0;
/** Starts a subprocess within the calling application. This
- * suppresses all application transition UI and automatically identifies the new executable
- * as part of the same application. On success the calling process should exit immediately.
- * If working directory is NULL or "" the directory portion of the binary path will be
+ * suppresses all application transition UI and automatically identifies the new executable
+ * as part of the same application. On success the calling process should exit immediately.
+ * If working directory is NULL or "" the directory portion of the binary path will be
* the working directory. */
virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0;
@@ -2518,6 +2575,7 @@ namespace vr
} // namespace vr
// ivrsettings.h
+
#include <string>
namespace vr
@@ -2563,14 +2621,14 @@ namespace vr
{
IVRSettings *m_pSettings;
public:
- CVRSettingHelper( IVRSettings *pSettings )
- {
- m_pSettings = pSettings;
+ CVRSettingHelper( IVRSettings *pSettings )
+ {
+ m_pSettings = pSettings;
}
- const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError )
- {
- return m_pSettings->GetSettingsErrorNameFromEnum( eError );
+ const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError )
+ {
+ return m_pSettings->GetSettingsErrorNameFromEnum( eError );
}
void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr )
@@ -2656,6 +2714,7 @@ namespace vr
static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
static const char * const k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor";
static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage";
+ static const char * const k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences";
static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
@@ -2666,6 +2725,8 @@ namespace vr
static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution";
static const char * const k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing";
static const char * const k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride";
+ static const char * const k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle";
+ static const char * const k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict";
static const char * const k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync";
static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView";
@@ -2708,6 +2769,8 @@ namespace vr
static const char * const k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2";
static const char * const k_pch_SteamVR_BlockOculusSDKOnOpenVRLaunchOption_Bool = "blockOculusSDKOnOpenVRLaunchOption";
static const char * const k_pch_SteamVR_BlockOculusSDKOnAllLaunches_Bool = "blockOculusSDKOnAllLaunches";
+ static const char * const k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility";
+ static const char * const k_pch_SteamVR_UsePrism_Bool = "usePrism";
//-----------------------------------------------------------------------------
// direct mode keys
@@ -2833,6 +2896,7 @@ namespace vr
static const char * const k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId";
static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
static const char * const k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput";
+ static const char * const k_pch_audio_MuteMicMonitor_Bool = "muteMicMonitor";
//-----------------------------------------------------------------------------
// power management keys
@@ -2852,6 +2916,7 @@ namespace vr
static const char * const k_pch_Dashboard_Position = "position";
static const char * const k_pch_Dashboard_DesktopScale = "desktopScale";
static const char * const k_pch_Dashboard_DashboardScale = "dashboardScale";
+ static const char * const k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer";
//-----------------------------------------------------------------------------
// model skin keys
@@ -2921,6 +2986,7 @@ namespace vr
} // namespace vr
// ivrchaperone.h
+
namespace vr
{
@@ -2957,7 +3023,7 @@ public:
/** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/
virtual ChaperoneCalibrationState GetCalibrationState() = 0;
- /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z.
+ /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z.
* Tracking space center (0,0,0) is the center of the Play Area. **/
virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0;
@@ -2990,7 +3056,7 @@ public:
* pose returned from GetDeviceToAbsoluteTrackingPose after a call to ResetZeroPose may not be exactly an
* identity matrix.
*
- * NOTE: This function overrides the user's previously saved zero pose and should only be called as the result of a user action.
+ * NOTE: This function overrides the user's previously saved zero pose and should only be called as the result of a user action.
* Users are also able to set their zero pose via the OpenVR Dashboard.
**/
virtual void ResetZeroPose( ETrackingUniverseOrigin eTrackingUniverseOrigin ) = 0;
@@ -3003,6 +3069,7 @@ static const char * const IVRChaperone_Version = "IVRChaperone_004";
}
// ivrchaperonesetup.h
+
namespace vr
{
@@ -3017,9 +3084,9 @@ enum EChaperoneImportFlags
EChaperoneImport_BoundsOnly = 0x0001,
};
-/** Manages the working copy of the chaperone info. By default this will be the same as the
-* live copy. Any changes made with this interface will stay in the working copy until
-* CommitWorkingCopy() is called, at which point the working copy and the live copy will be
+/** Manages the working copy of the chaperone info. By default this will be the same as the
+* live copy. Any changes made with this interface will stay in the working copy until
+* CommitWorkingCopy() is called, at which point the working copy and the live copy will be
* the same again. */
class IVRChaperoneSetup
{
@@ -3045,11 +3112,11 @@ public:
* Height of every corner is 0Y (on the floor). **/
virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0;
- /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads
+ /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads
* into the buffer up to the max specified from the working copy. */
virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0;
- /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads
+ /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads
* into the buffer up to the max specified. */
virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0;
@@ -3101,6 +3168,7 @@ static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_006";
}
// ivrcompositor.h
+
namespace vr
{
@@ -3257,7 +3325,7 @@ public:
*/
virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0;
- /** Clears the frame that was sent with the last call to Submit. This will cause the
+ /** Clears the frame that was sent with the last call to Submit. This will cause the
* compositor to show the grid until Submit is called again. */
virtual void ClearLastSubmittedFrame() = 0;
@@ -3284,7 +3352,7 @@ public:
virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0;
/** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between
- * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly
+ * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly
* would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */
virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0;
@@ -3292,7 +3360,7 @@ public:
virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0;
/** Fading the Grid in or out in fSeconds */
- virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0;
+ virtual void FadeGrid( float fSeconds, bool bFadeGridIn ) = 0;
/** Get current alpha value of grid. */
virtual float GetCurrentGridAlpha() = 0;
@@ -3312,10 +3380,10 @@ public:
/** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */
virtual void CompositorGoToBack() = 0;
- /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal
- * circumstances the compositor will manage its own life cycle based on what applications are running. */
+ /** DEPRECATED: Tells the compositor process to clean up and exit. You do not need to call this function at shutdown.
+ * Under normal circumstances the compositor will manage its own life cycle based on what applications are running. */
virtual void CompositorQuit() = 0;
-
+
/** Return whether the compositor is fullscreen */
virtual bool IsFullscreen() = 0;
@@ -3383,9 +3451,9 @@ public:
*
* More accurate GPU timestamp for the start of the frame is achieved by the application calling
* SubmitExplicitTimingData immediately before its first submission to the Vulkan/D3D12 queue.
- * This is more accurate because normally this GPU timestamp is recorded during WaitGetPoses. In D3D11,
- * WaitGetPoses queues a GPU timestamp write, but it does not actually get submitted to the GPU until the
- * application flushes. By using SubmitExplicitTimingData, the timestamp is recorded at the same place for
+ * This is more accurate because normally this GPU timestamp is recorded during WaitGetPoses. In D3D11,
+ * WaitGetPoses queues a GPU timestamp write, but it does not actually get submitted to the GPU until the
+ * application flushes. By using SubmitExplicitTimingData, the timestamp is recorded at the same place for
* Vulkan/D3D12 as it is for D3D11, resulting in a more accurate GPU time measurement for the frame.
*
* Avoiding WaitGetPoses accessing the Vulkan queue can be achieved using SetExplicitTimingMode as well. If this is desired,
@@ -3435,13 +3503,14 @@ public:
virtual EVRCompositorError GetPosesForFrame( uint32_t unPosePredictionID, VR_ARRAY_COUNT( unPoseArrayCount ) TrackedDevicePose_t* pPoseArray, uint32_t unPoseArrayCount ) = 0;
};
-static const char * const IVRCompositor_Version = "IVRCompositor_026";
+static const char * const IVRCompositor_Version = "IVRCompositor_027";
} // namespace vr
// ivrheadsetview.h
+
namespace vr
{
enum HeadsetViewMode_t
@@ -3499,6 +3568,7 @@ namespace vr
// ivrnotifications.h
+
namespace vr
{
@@ -3525,7 +3595,7 @@ struct NotificationBitmap_t
/** Be aware that the notification type is used as 'priority' to pick the next notification */
enum EVRNotificationType
{
- /** Transient notifications are automatically hidden after a period of time set by the user.
+ /** Transient notifications are automatically hidden after a period of time set by the user.
* They are used for things like information and chat messages that do not require user interaction. */
EVRNotificationType_Transient = 0,
@@ -3588,6 +3658,7 @@ static const char * const IVRNotifications_Version = "IVRNotifications_002";
// ivroverlay.h
+
namespace vr
{
@@ -3623,6 +3694,7 @@ namespace vr
VROverlayTransform_DashboardTab = 5,
VROverlayTransform_DashboardThumb = 6,
VROverlayTransform_Mountable = 7,
+ VROverlayTransform_Projection = 8,
};
/** Overlay control settings */
@@ -3631,18 +3703,18 @@ namespace vr
// Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay
VROverlayFlags_NoDashboardTab = 1 << 3,
- // When this is set the overlay will receive VREvent_ScrollDiscrete events like a mouse wheel.
+ // When this is set the overlay will receive VREvent_ScrollDiscrete events like a mouse wheel.
// Requires mouse input mode.
VROverlayFlags_SendVRDiscreteScrollEvents = 1 << 6,
// Indicates that the overlay would like to receive
VROverlayFlags_SendVRTouchpadEvents = 1 << 7,
- // If set this will render a vertical scroll wheel on the primary controller,
+ // If set this will render a vertical scroll wheel on the primary controller,
// only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel
VROverlayFlags_ShowTouchPadScrollWheel = 1 << 8,
- // If this is set ownership and render access to the overlay are transferred
+ // If this is set ownership and render access to the overlay are transferred
// to the new scene process on a call to IVRApplications::LaunchInternalProcess
VROverlayFlags_TransferOwnershipToInternalProcess = 1 << 9,
@@ -3764,6 +3836,15 @@ namespace vr
KeyboardFlag_Modal = 2 << 0, // makes the keyboard take all focus and dismiss when clicking off the panel
};
+ /** Defines the project used in an overlay that is using SetOverlayTransformProjection */
+ struct VROverlayProjection_t
+ {
+ /** Tangent of the sides of the frustum */
+ float fLeft;
+ float fRight;
+ float fTop;
+ float fBottom;
+ };
class IVROverlay
{
@@ -3794,11 +3875,11 @@ namespace vr
/** set the name to use for this overlay */
virtual EVROverlayError SetOverlayName( VROverlayHandle_t ulOverlayHandle, const char *pchName ) = 0;
- /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height
+ /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height
* will be set and VROverlayError_ArrayTooSmall is returned. */
virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0;
- /** returns a string that corresponds with the specified overlay error. The string will be the name
+ /** returns a string that corresponds with the specified overlay error. The string will be the name
* of the error enum value for all valid error codes */
virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0;
@@ -3845,7 +3926,7 @@ namespace vr
* Overlays owned by the scene application
* Overlays owned by some other application
*
- * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same
+ * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same
* sort order are rendered back to front base on distance from the HMD.
*
* Sort order defaults to 0. */
@@ -3904,7 +3985,7 @@ namespace vr
/** Gets the transform if it is relative to another overlay. Returns an error if the transform is some other type. */
virtual vr::EVROverlayError GetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t *ulOverlayHandleParent, HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0;
-
+
/** Sets the transform to relative to the transform of the specified overlay. This overlays visibility will also track the parents visibility */
virtual vr::EVROverlayError SetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, const HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0;
@@ -3915,6 +3996,11 @@ namespace vr
/** Gets cursor hotspot/transform for the specified overlay */
virtual vr::EVROverlayError GetOverlayTransformCursor( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvHotspot ) = 0;
+ /** Sets the overlay as a projection overlay */
+ virtual vr::EVROverlayError SetOverlayTransformProjection( VROverlayHandle_t ulOverlayHandle,
+ ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t* pmatTrackingOriginToOverlayTransform,
+ const VROverlayProjection_t *pProjection, vr::EVREye eEye ) = 0;
+
/** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */
virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0;
@@ -3931,7 +4017,7 @@ namespace vr
// Overlay input methods
// ---------------------------------------------
- /** Returns true and fills the event with the next event on the overlay's event queue, if there is one.
+ /** Returns true and fills the event with the next event on the overlay's event queue, if there is one.
* If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */
virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0;
@@ -3953,7 +4039,7 @@ namespace vr
* specified settings. Returns false if there is no intersection. */
virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0;
- /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over"
+ /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over"
* by the virtual mouse pointer */
virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0;
@@ -3988,7 +4074,7 @@ namespace vr
/** Use this to tell the overlay system to release the texture set for this overlay. */
virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0;
- /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data
+ /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data
* that can be sent. This function can only be called by the overlay's renderer process. */
virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel ) = 0;
@@ -4044,16 +4130,16 @@ namespace vr
// ---------------------------------------------
// Keyboard methods
// ---------------------------------------------
-
- /** Show the virtual keyboard to accept input. In most cases, you should pass KeyboardFlag_Modal to enable modal overlay
+
+ /** Show the virtual keyboard to accept input. In most cases, you should pass KeyboardFlag_Modal to enable modal overlay
* behavior on the keyboard itself. See EKeyboardFlags for more. */
- virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags,
+ virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags,
const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, uint64_t uUserValue ) = 0;
- /** Show the virtual keyboard to accept input for an overlay. In most cases, you should pass KeyboardFlag_Modal to enable modal
+ /** Show the virtual keyboard to accept input for an overlay. In most cases, you should pass KeyboardFlag_Modal to enable modal
* overlay behavior on the keyboard itself. See EKeyboardFlags for more. */
virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode,
- EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char *pchDescription, uint32_t unCharMax,
+ EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char *pchDescription, uint32_t unCharMax,
const char *pchExistingText, uint64_t uUserValue ) = 0;
/** Get the text that was entered into the text input **/
@@ -4079,11 +4165,12 @@ namespace vr
virtual void CloseMessageOverlay() = 0;
};
- static const char * const IVROverlay_Version = "IVROverlay_024";
+ static const char * const IVROverlay_Version = "IVROverlay_025";
} // namespace vr
// ivroverlayview.h
+
namespace vr
{
struct VROverlayView_t
@@ -4161,6 +4248,7 @@ namespace vr
}
// ivrrendermodels.h
+
namespace vr
{
@@ -4209,9 +4297,9 @@ struct RenderModel_Vertex_t
};
/** A texture map for use on a render model */
-#if defined(__linux__) || defined(__APPLE__)
-// This structure was originally defined mis-packed on Linux, preserved for
-// compatibility.
+#if defined(__linux__) || defined(__APPLE__)
+// This structure was originally defined mis-packed on Linux, preserved for
+// compatibility.
#pragma pack( push, 4 )
#endif
@@ -4221,7 +4309,7 @@ struct RenderModel_TextureMap_t
const uint8_t *rubTextureMapData; // Map texture data.
EVRRenderModelTextureFormat format; // Refer to EVRRenderModelTextureFormat
};
-#if defined(__linux__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__APPLE__)
#pragma pack( pop )
#endif
@@ -4232,9 +4320,9 @@ typedef int32_t TextureID_t;
const TextureID_t INVALID_TEXTURE_ID = -1;
-#if defined(__linux__) || defined(__APPLE__)
-// This structure was originally defined mis-packed on Linux, preserved for
-// compatibility.
+#if defined(__linux__) || defined(__APPLE__)
+// This structure was originally defined mis-packed on Linux, preserved for
+// compatibility.
#pragma pack( push, 4 )
#endif
@@ -4246,7 +4334,7 @@ struct RenderModel_t
uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount
TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present
};
-#if defined(__linux__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__APPLE__)
#pragma pack( pop )
#endif
@@ -4263,9 +4351,9 @@ class IVRRenderModels
public:
/** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name
- * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk.
+ * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk.
*
- * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the
+ * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the
* application is finished with the render model it should call FreeRenderModel() to free the memory associated
* with the model.
*
@@ -4361,6 +4449,7 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_006";
// ivrextendeddisplay.h
+
namespace vr
{
@@ -4390,6 +4479,7 @@ namespace vr
// ivrtrackedcamera.h
+
namespace vr
{
@@ -4418,19 +4508,19 @@ public:
/** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel.
* A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows
- * the caller to determine if the frame as advanced per the frame header sequence.
+ * the caller to determine if the frame as advanced per the frame header sequence.
* If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable.
* Ideally a caller should be polling at ~16ms intervals */
virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0;
/** 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;
+ 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.
* 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
+ * 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;
@@ -4447,6 +4537,7 @@ static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_006";
// ivrscreenshots.h
+
namespace vr
{
@@ -4482,7 +4573,7 @@ public:
* VRScreenshotType_StereoPanorama: above/below with left eye
* panorama being the above image. Image is typically square
* with the panorama being 2x horizontal.
- *
+ *
* Note that the VR dashboard will call this function when
* the user presses the screenshot binding (currently System
* Button + Trigger). If Steam is running, the destination
@@ -4554,6 +4645,7 @@ static const char * const IVRScreenshots_Version = "IVRScreenshots_001";
// ivrresources.h
+
namespace vr
{
@@ -4570,7 +4662,7 @@ public:
virtual uint32_t LoadSharedResource( const char *pchResourceName, char *pchBuffer, uint32_t unBufferLen ) = 0;
/** Provides the full path to the specified resource. Resource names can include named directories for
- * drivers and other things, and this resolves all of those and returns the actual physical path.
+ * drivers and other things, and this resolves all of those and returns the actual physical path.
* pchResourceTypeDirectory is the subdirectory of resources to look in. */
virtual uint32_t GetResourceFullPath( const char *pchResourceName, const char *pchResourceTypeDirectory, VR_OUT_STRING() char *pchPathBuffer, uint32_t unBufferLen ) = 0;
};
@@ -4579,7 +4671,9 @@ static const char * const IVRResources_Version = "IVRResources_001";
}
+
// ivrdrivermanager.h
+
namespace vr
{
@@ -4603,23 +4697,24 @@ static const char * const IVRDriverManager_Version = "IVRDriverManager_001";
// ivrinput.h
+
namespace vr
{
// Maximum number of characters in an action name, including the trailing null
- static const uint32_t k_unMaxActionNameLength = 64;
+ static const uint32_t k_unMaxActionNameLength = 64;
// Maximum number of characters in an action set name, including the trailing null
static const uint32_t k_unMaxActionSetNameLength = 64;
// Maximum number of origins for an action
- static const uint32_t k_unMaxActionOriginCount = 16;
+ static const uint32_t k_unMaxActionOriginCount = 16;
// Maximum number of characters in a bone name, including the trailing null
- static const uint32_t k_unMaxBoneNameLength = 32;
+ static const uint32_t k_unMaxBoneNameLength = 32;
enum EVRSkeletalTransformSpace
{
- VRSkeletalTransformSpace_Model = 0,
+ VRSkeletalTransformSpace_Model = 0,
VRSkeletalTransformSpace_Parent = 1
};
@@ -4653,11 +4748,11 @@ namespace vr
enum EVRSummaryType
{
// The skeletal summary data will match the animated bone transforms for the action.
- VRSummaryType_FromAnimation = 0,
-
- // The skeletal summary data will include unprocessed data directly from the device when available.
+ VRSummaryType_FromAnimation = 0,
+
+ // The skeletal summary data will include unprocessed data directly from the device when available.
// This data is generally less latent than the data that is computed from the animations.
- VRSummaryType_FromDevice = 1,
+ VRSummaryType_FromDevice = 1,
};
enum EVRInputFilterCancelType
@@ -4688,7 +4783,7 @@ namespace vr
/** Deltas since the previous call to UpdateActionState() */
float deltaX, deltaY, deltaZ;
-
+
/** Time relative to now when this event happened. Will be negative to indicate a past time. */
float fUpdateTime;
};
@@ -4752,12 +4847,12 @@ namespace vr
// These constants are part of the experimental support in SteamVR for overlay
// apps selectively overriding input in the base scene application. This may be
// useful for overlay applications that need to use part or all of a controller
- // without taking away all input to the game. This system must be enabled by the
- // "Experimental overlay input overrides" setting in the developer section of
+ // without taking away all input to the game. This system must be enabled by the
+ // "Experimental overlay input overrides" setting in the developer section of
// SteamVR settings.
//
// To use this system, set the nPriority field of an action set to any number in
- // this range.
+ // this range.
static const int32_t k_nActionSetOverlayGlobalPriorityMin = 0x01000000;
static const int32_t k_nActionSetOverlayGlobalPriorityMax = 0x01FFFFFF;
@@ -4772,8 +4867,8 @@ namespace vr
* activate for all devices, set this to k_ulInvalidInputValueHandle. */
VRInputValueHandle_t ulRestrictedToDevice;
- /** The action set to activate for all devices other than ulRestrictedDevice. If
- * ulRestrictedToDevice is set to k_ulInvalidInputValueHandle, this parameter is
+ /** The action set to activate for all devices other than ulRestrictedDevice. If
+ * ulRestrictedToDevice is set to k_ulInvalidInputValueHandle, this parameter is
* ignored. */
VRActionSetHandle_t ulSecondaryActionSet;
@@ -4782,9 +4877,9 @@ namespace vr
/** The priority of this action set relative to other action sets. Any inputs
* bound to a source (e.g. trackpad, joystick, trigger) will disable bindings in
- * other active action sets with a smaller priority.
+ * other active action sets with a smaller priority.
*
- * Overlay applications (i.e. ApplicationType_Overlay) may set their action set priority
+ * Overlay applications (i.e. ApplicationType_Overlay) may set their action set priority
* to a value between k_nActionSetOverlayGlobalPriorityMin and k_nActionSetOverlayGlobalPriorityMax
* to cause any inputs bound to a source used by that action set to be disabled in scene applications.
*
@@ -4797,11 +4892,11 @@ namespace vr
struct VRSkeletalSummaryData_t
{
/** The amount that each finger is 'curled' inwards towards the palm. In the case of the thumb,
- * this represents how much the thumb is wrapped around the fist.
+ * this represents how much the thumb is wrapped around the fist.
* 0 means straight, 1 means fully curled */
float flFingerCurl[ VRFinger_Count ];
- /** The amount that each pair of adjacent fingers are separated.
+ /** The amount that each pair of adjacent fingers are separated.
* 0 means the digits are touching, 1 means they are fully separated.
*/
float flFingerSplay[ VRFingerSplay_Count ];
@@ -4816,7 +4911,7 @@ namespace vr
/** Sets the path to the action manifest JSON file that is used by this application. If this information
* was set on the Steam partner site, calls to this function are ignored. If the Steam partner site
- * setting and the path provided by this call are different, VRInputError_MismatchedActionManifest is returned.
+ * setting and the path provided by this call are different, VRInputError_MismatchedActionManifest is returned.
* This call must be made before the first call to UpdateActionState or IVRSystem::PollNextEvent. */
virtual EVRInputError SetActionManifestPath( const char *pchActionManifestPath ) = 0;
@@ -4833,7 +4928,7 @@ namespace vr
// --------------- Reading action state ------------------- //
- /** Reads the current state into all actions. After this call, the results of Get*Action calls
+ /** Reads the current state into all actions. After this call, the results of Get*Action calls
* will be the same until the next call to UpdateActionState. */
virtual EVRInputError UpdateActionState( VR_ARRAY_COUNT( unSetCount ) VRActiveActionSet_t *pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount ) = 0;
@@ -4907,7 +5002,7 @@ namespace vr
/** Retrieve origin handles for an action */
virtual EVRInputError GetActionOrigins( VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VR_ARRAY_COUNT( originOutCount ) VRInputValueHandle_t *originsOut, uint32_t originOutCount ) = 0;
- /** Retrieves the name of the origin in the current language. unStringSectionsToInclude is a bitfield of values in EVRInputStringBits that allows the
+ /** Retrieves the name of the origin in the current language. unStringSectionsToInclude is a bitfield of values in EVRInputStringBits that allows the
application to specify which parts of the origin's information it wants a string for. */
virtual EVRInputError GetOriginLocalizedName( VRInputValueHandle_t origin, VR_OUT_STRING() char *pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude ) = 0;
@@ -4939,7 +5034,7 @@ namespace vr
* If no set is provided it will open to the root of the app binding page. */
virtual EVRInputError OpenBindingUI( const char* pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop ) = 0;
- /** Returns the variant set in the current bindings. If the binding doesn't include a variant setting, this function
+ /** Returns the variant set in the current bindings. If the binding doesn't include a variant setting, this function
* will return an empty string */
virtual EVRInputError GetBindingVariant( vr::VRInputValueHandle_t ulDevicePath,
VR_OUT_STRING() char *pchVariantArray, uint32_t unVariantArraySize ) = 0;
@@ -4951,12 +5046,13 @@ namespace vr
} // namespace vr
// ivriobuffer.h
+
namespace vr
{
typedef uint64_t IOBufferHandle_t;
static const uint64_t k_ulInvalidIOBufferHandle = 0;
-
+
enum EIOBufferError
{
IOBuffer_Success = 0,
@@ -4983,16 +5079,16 @@ static const uint64_t k_ulInvalidIOBufferHandle = 0;
public:
/** opens an existing or creates a new IOBuffer of unSize bytes */
virtual vr::EIOBufferError Open( const char *pchPath, vr::EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, vr::IOBufferHandle_t *pulBuffer ) = 0;
-
+
/** closes a previously opened or created buffer */
virtual vr::EIOBufferError Close( vr::IOBufferHandle_t ulBuffer ) = 0;
-
+
/** reads up to unBytes from buffer into *pDst, returning number of bytes read in *punRead */
virtual vr::EIOBufferError Read( vr::IOBufferHandle_t ulBuffer, void *pDst, uint32_t unBytes, uint32_t *punRead ) = 0;
-
+
/** writes unBytes of data from *pSrc into a buffer. */
virtual vr::EIOBufferError Write( vr::IOBufferHandle_t ulBuffer, void *pSrc, uint32_t unBytes ) = 0;
-
+
/** retrieves the property container of an buffer. */
virtual vr::PropertyContainerHandle_t PropertyContainer( vr::IOBufferHandle_t ulBuffer ) = 0;
@@ -5004,6 +5100,7 @@ static const uint64_t k_ulInvalidIOBufferHandle = 0;
}
// ivrspatialanchors.h
+
namespace vr
{
static const SpatialAnchorHandle_t k_ulInvalidSpatialAnchorHandle = 0;
@@ -5033,7 +5130,7 @@ namespace vr
* This should be called when the user is close to (and ideally looking at/interacting with) the target physical
* location. At that moment, the driver will have the most information about how to recover that physical point
* in the future, and the quality of the anchor (when the descriptor is re-used) will be highest.
- * The caller may decide to apply offsets from this initial pose, but is advised to stay relatively close to the
+ * The caller may decide to apply offsets from this initial pose, but is advised to stay relatively close to the
* original pose location for highest fidelity. */
virtual EVRSpatialAnchorError CreateSpatialAnchorFromPose( TrackedDeviceIndex_t unDeviceIndex, ETrackingUniverseOrigin eOrigin, SpatialAnchorPose_t *pPose, SpatialAnchorHandle_t *pHandleOut ) = 0;
@@ -5056,6 +5153,7 @@ namespace vr
} // namespace vr
// ivrdebug.h
+
namespace vr
{
enum EVRDebugError
diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs
index 178724e..4732b62 100644
--- a/headers/openvr_api.cs
+++ b/headers/openvr_api.cs
@@ -731,7 +731,7 @@ public struct IVRCompositor
internal _GetCurrentFadeColor GetCurrentFadeColor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate void _FadeGrid(float fSeconds, bool bFadeIn);
+ internal delegate void _FadeGrid(float fSeconds, bool bFadeGridIn);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _FadeGrid FadeGrid;
@@ -1121,6 +1121,11 @@ public struct IVROverlay
internal _GetOverlayTransformCursor GetOverlayTransformCursor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _SetOverlayTransformProjection(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform, ref VROverlayProjection_t pProjection, EVREye eEye);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetOverlayTransformProjection SetOverlayTransformProjection;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _ShowOverlay(ulong ulOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowOverlay ShowOverlay;
@@ -2899,9 +2904,9 @@ public class CVRCompositor
HmdColor_t result = FnTable.GetCurrentFadeColor(bBackground);
return result;
}
- public void FadeGrid(float fSeconds,bool bFadeIn)
+ public void FadeGrid(float fSeconds,bool bFadeGridIn)
{
- FnTable.FadeGrid(fSeconds,bFadeIn);
+ FnTable.FadeGrid(fSeconds,bFadeGridIn);
}
public float GetCurrentGridAlpha()
{
@@ -3310,6 +3315,11 @@ public class CVROverlay
EVROverlayError result = FnTable.GetOverlayTransformCursor(ulOverlayHandle,ref pvHotspot);
return result;
}
+ public EVROverlayError SetOverlayTransformProjection(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform,ref VROverlayProjection_t pProjection,EVREye eEye)
+ {
+ EVROverlayError result = FnTable.SetOverlayTransformProjection(ulOverlayHandle,eTrackingOrigin,ref pmatTrackingOriginToOverlayTransform,ref pProjection,eEye);
+ return result;
+ }
public EVROverlayError ShowOverlay(ulong ulOverlayHandle)
{
EVROverlayError result = FnTable.ShowOverlay(ulOverlayHandle);
@@ -4704,9 +4714,13 @@ public enum ETrackedDeviceProperty
Prop_DisplaySupportsAnalogGain_Bool = 2085,
Prop_DisplayMinAnalogGain_Float = 2086,
Prop_DisplayMaxAnalogGain_Float = 2087,
+ Prop_CameraExposureTime_Float = 2088,
+ Prop_CameraGlobalGain_Float = 2089,
Prop_DashboardScale_Float = 2091,
Prop_IpdUIRangeMinMeters_Float = 2100,
Prop_IpdUIRangeMaxMeters_Float = 2101,
+ Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102,
+ Prop_Hmd_SupportsMicMonitoring_Bool = 2103,
Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200,
Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201,
Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202,
@@ -4801,6 +4815,8 @@ public enum EVRSubmitFlags
Submit_TextureWithDepth = 16,
Submit_FrameDiscontinuty = 32,
Submit_VulkanTextureWithArrayData = 64,
+ Submit_GlArrayTexture = 128,
+ Submit_Reserved2 = 32768,
}
public enum EVRState
{
@@ -5153,8 +5169,11 @@ public enum EVRApplicationType
VRApplication_SteamWatchdog = 6,
VRApplication_Bootstrapper = 7,
VRApplication_WebHelper = 8,
- VRApplication_OpenXR = 9,
- VRApplication_Max = 10,
+ VRApplication_OpenXRInstance = 9,
+ VRApplication_OpenXRScene = 10,
+ VRApplication_OpenXROverlay = 11,
+ VRApplication_Prism = 12,
+ VRApplication_Max = 13,
}
public enum EVRFirmwareError
{
@@ -5234,6 +5253,15 @@ public enum EVRInitError
Init_FailedForVrMonitor = 144,
Init_PropertyManagerInitFailed = 145,
Init_WebServerFailed = 146,
+ Init_IllegalTypeTransition = 147,
+ Init_MismatchedRuntimes = 148,
+ Init_InvalidProcessId = 149,
+ Init_VRServiceStartupFailed = 150,
+ Init_PrismNeedsNewDrivers = 151,
+ Init_PrismStartupTimedOut = 152,
+ Init_CouldNotStartPrism = 153,
+ Init_CreateDriverDirectDeviceFailed = 154,
+ Init_PrismExitedUnexpectedly = 155,
Driver_Failed = 200,
Driver_Unknown = 201,
Driver_HmdUnknown = 202,
@@ -5349,6 +5377,9 @@ public enum EVRInitError
Compositor_CreateOverlayInvalidCall = 488,
Compositor_CreateOverlayAlreadyInitialized = 489,
Compositor_FailedToCreateMailbox = 490,
+ Compositor_WindowInterfaceIsNull = 491,
+ Compositor_SystemLayerCreateInstance = 492,
+ Compositor_SystemLayerCreateSession = 493,
VendorSpecific_UnableToConnectToOculusRuntime = 1000,
VendorSpecific_WindowsNotInDevMode = 1001,
VendorSpecific_HmdFound_CantOpenDevice = 1101,
@@ -5466,6 +5497,7 @@ public enum EVRApplicationError
PropertyNotSet = 201,
UnknownProperty = 202,
InvalidParameter = 203,
+ NotImplemented = 300,
}
public enum EVRApplicationProperty
{
@@ -5556,6 +5588,7 @@ public enum VROverlayTransformType
VROverlayTransform_DashboardTab = 5,
VROverlayTransform_DashboardThumb = 6,
VROverlayTransform_Mountable = 7,
+ VROverlayTransform_Projection = 8,
}
public enum VROverlayFlags
{
@@ -5949,6 +5982,11 @@ public enum EBlockQueueReadType
public HmdVector2_t vTopLeft;
public HmdVector2_t vBottomRight;
}
+[StructLayout(LayoutKind.Sequential)] public struct VRBoneTransform_t
+{
+ public HmdVector4_t position;
+ public HmdQuaternionf_t orientation;
+}
[StructLayout(LayoutKind.Sequential)] public struct DistortionCoordinates_t
{
public float rfRed0; //float[2]
@@ -6079,6 +6117,7 @@ public enum EBlockQueueReadType
{
public ulong overlayHandle;
public ulong devicePath;
+ public ulong memoryBlockId;
}
[StructLayout(LayoutKind.Sequential)] public struct VREvent_Status_t
{
@@ -6301,11 +6340,6 @@ public enum EBlockQueueReadType
unpacked.rAxis4 = this.rAxis4;
}
}
-[StructLayout(LayoutKind.Sequential)] public struct VRBoneTransform_t
-{
- public HmdVector4_t position;
- public HmdQuaternionf_t orientation;
-}
[StructLayout(LayoutKind.Sequential)] public struct CameraVideoStreamFrameHeader_t
{
public EVRTrackedCameraFrameType eFrameType;
@@ -6433,6 +6467,13 @@ public enum EBlockQueueReadType
public EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType;
public VROverlayIntersectionMaskPrimitive_Data_t m_Primitive;
}
+[StructLayout(LayoutKind.Sequential)] public struct VROverlayProjection_t
+{
+ public float fLeft;
+ public float fRight;
+ public float fTop;
+ public float fBottom;
+}
[StructLayout(LayoutKind.Sequential)] public struct VROverlayView_t
{
public ulong overlayHandle;
@@ -7519,12 +7560,12 @@ public class OpenVR
public const string IVRApplications_Version = "IVRApplications_007";
public const string IVRChaperone_Version = "IVRChaperone_004";
public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_006";
- public const string IVRCompositor_Version = "IVRCompositor_026";
+ public const string IVRCompositor_Version = "IVRCompositor_027";
public const uint k_unVROverlayMaxKeyLength = 128;
public const uint k_unVROverlayMaxNameLength = 128;
public const uint k_unMaxOverlayCount = 128;
public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
- public const string IVROverlay_Version = "IVROverlay_024";
+ public const string IVROverlay_Version = "IVROverlay_025";
public const string IVROverlayView_Version = "IVROverlayView_003";
public const uint k_unHeadsetViewMaxWidth = 3840;
public const uint k_unHeadsetViewMaxHeight = 2160;
@@ -7559,6 +7600,7 @@ public class OpenVR
public const string k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
public const string k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor";
public const string k_pch_SteamVR_ShowStage_Bool = "showStage";
+ public const string k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences";
public const string k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
public const string k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
public const string k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
@@ -7569,6 +7611,8 @@ public class OpenVR
public const string k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution";
public const string k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing";
public const string k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride";
+ public const string k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle";
+ public const string k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict";
public const string k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync";
public const string k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
public const string k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView";
@@ -7611,6 +7655,8 @@ public class OpenVR
public const string k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2";
public const string k_pch_SteamVR_BlockOculusSDKOnOpenVRLaunchOption_Bool = "blockOculusSDKOnOpenVRLaunchOption";
public const string k_pch_SteamVR_BlockOculusSDKOnAllLaunches_Bool = "blockOculusSDKOnAllLaunches";
+ public const string k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility";
+ public const string k_pch_SteamVR_UsePrism_Bool = "usePrism";
public const string k_pch_DirectMode_Section = "direct_mode";
public const string k_pch_DirectMode_Enable_Bool = "enable";
public const string k_pch_DirectMode_Count_Int32 = "count";
@@ -7703,6 +7749,7 @@ public class OpenVR
public const string k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId";
public const string k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
public const string k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput";
+ public const string k_pch_audio_MuteMicMonitor_Bool = "muteMicMonitor";
public const string k_pch_Power_Section = "power";
public const string k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit";
public const string k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout";
@@ -7716,6 +7763,7 @@ public class OpenVR
public const string k_pch_Dashboard_Position = "position";
public const string k_pch_Dashboard_DesktopScale = "desktopScale";
public const string k_pch_Dashboard_DashboardScale = "dashboardScale";
+ public const string k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer";
public const string k_pch_modelskin_Section = "modelskins";
public const string k_pch_Driver_Enable_Bool = "enable";
public const string k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode";
diff --git a/headers/openvr_api.json b/headers/openvr_api.json
index 1a38997..463243b 100644
--- a/headers/openvr_api.json
+++ b/headers/openvr_api.json
@@ -237,9 +237,13 @@
,{"name": "Prop_DisplaySupportsAnalogGain_Bool","value": "2085"}
,{"name": "Prop_DisplayMinAnalogGain_Float","value": "2086"}
,{"name": "Prop_DisplayMaxAnalogGain_Float","value": "2087"}
+ ,{"name": "Prop_CameraExposureTime_Float","value": "2088"}
+ ,{"name": "Prop_CameraGlobalGain_Float","value": "2089"}
,{"name": "Prop_DashboardScale_Float","value": "2091"}
,{"name": "Prop_IpdUIRangeMinMeters_Float","value": "2100"}
,{"name": "Prop_IpdUIRangeMaxMeters_Float","value": "2101"}
+ ,{"name": "Prop_Hmd_SupportsHDCP14LegacyCompat_Bool","value": "2102"}
+ ,{"name": "Prop_Hmd_SupportsMicMonitoring_Bool","value": "2103"}
,{"name": "Prop_DriverRequestedMuraCorrectionMode_Int32","value": "2200"}
,{"name": "Prop_DriverRequestedMuraFeather_InnerLeft_Int32","value": "2201"}
,{"name": "Prop_DriverRequestedMuraFeather_InnerRight_Int32","value": "2202"}
@@ -331,6 +335,8 @@
,{"name": "Submit_TextureWithDepth","value": "16"}
,{"name": "Submit_FrameDiscontinuty","value": "32"}
,{"name": "Submit_VulkanTextureWithArrayData","value": "64"}
+ ,{"name": "Submit_GlArrayTexture","value": "128"}
+ ,{"name": "Submit_Reserved2","value": "32768"}
]}
, {"enumname": "vr::EVRState","values": [
{"name": "VRState_Undefined","value": "-1"}
@@ -667,8 +673,11 @@
,{"name": "VRApplication_SteamWatchdog","value": "6"}
,{"name": "VRApplication_Bootstrapper","value": "7"}
,{"name": "VRApplication_WebHelper","value": "8"}
- ,{"name": "VRApplication_OpenXR","value": "9"}
- ,{"name": "VRApplication_Max","value": "10"}
+ ,{"name": "VRApplication_OpenXRInstance","value": "9"}
+ ,{"name": "VRApplication_OpenXRScene","value": "10"}
+ ,{"name": "VRApplication_OpenXROverlay","value": "11"}
+ ,{"name": "VRApplication_Prism","value": "12"}
+ ,{"name": "VRApplication_Max","value": "13"}
]}
, {"enumname": "vr::EVRFirmwareError","values": [
{"name": "VRFirmwareError_None","value": "0"}
@@ -743,6 +752,15 @@
,{"name": "VRInitError_Init_FailedForVrMonitor","value": "144"}
,{"name": "VRInitError_Init_PropertyManagerInitFailed","value": "145"}
,{"name": "VRInitError_Init_WebServerFailed","value": "146"}
+ ,{"name": "VRInitError_Init_IllegalTypeTransition","value": "147"}
+ ,{"name": "VRInitError_Init_MismatchedRuntimes","value": "148"}
+ ,{"name": "VRInitError_Init_InvalidProcessId","value": "149"}
+ ,{"name": "VRInitError_Init_VRServiceStartupFailed","value": "150"}
+ ,{"name": "VRInitError_Init_PrismNeedsNewDrivers","value": "151"}
+ ,{"name": "VRInitError_Init_PrismStartupTimedOut","value": "152"}
+ ,{"name": "VRInitError_Init_CouldNotStartPrism","value": "153"}
+ ,{"name": "VRInitError_Init_CreateDriverDirectDeviceFailed","value": "154"}
+ ,{"name": "VRInitError_Init_PrismExitedUnexpectedly","value": "155"}
,{"name": "VRInitError_Driver_Failed","value": "200"}
,{"name": "VRInitError_Driver_Unknown","value": "201"}
,{"name": "VRInitError_Driver_HmdUnknown","value": "202"}
@@ -858,6 +876,9 @@
,{"name": "VRInitError_Compositor_CreateOverlayInvalidCall","value": "488"}
,{"name": "VRInitError_Compositor_CreateOverlayAlreadyInitialized","value": "489"}
,{"name": "VRInitError_Compositor_FailedToCreateMailbox","value": "490"}
+ ,{"name": "VRInitError_Compositor_WindowInterfaceIsNull","value": "491"}
+ ,{"name": "VRInitError_Compositor_SystemLayerCreateInstance","value": "492"}
+ ,{"name": "VRInitError_Compositor_SystemLayerCreateSession","value": "493"}
,{"name": "VRInitError_VendorSpecific_UnableToConnectToOculusRuntime","value": "1000"}
,{"name": "VRInitError_VendorSpecific_WindowsNotInDevMode","value": "1001"}
,{"name": "VRInitError_VendorSpecific_HmdFound_CantOpenDevice","value": "1101"}
@@ -965,6 +986,7 @@
,{"name": "VRApplicationError_PropertyNotSet","value": "201"}
,{"name": "VRApplicationError_UnknownProperty","value": "202"}
,{"name": "VRApplicationError_InvalidParameter","value": "203"}
+ ,{"name": "VRApplicationError_NotImplemented","value": "300"}
]}
, {"enumname": "vr::EVRApplicationProperty","values": [
{"name": "VRApplicationProperty_Name_String","value": "0"}
@@ -1046,6 +1068,7 @@
,{"name": "VROverlayTransform_DashboardTab","value": "5"}
,{"name": "VROverlayTransform_DashboardThumb","value": "6"}
,{"name": "VROverlayTransform_Mountable","value": "7"}
+ ,{"name": "VROverlayTransform_Projection","value": "8"}
]}
, {"enumname": "vr::VROverlayFlags","values": [
{"name": "VROverlayFlags_NoDashboardTab","value": "8"}
@@ -1336,7 +1359,7 @@
,{
"constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_006"}
,{
- "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_026"}
+ "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_027"}
,{
"constname": "k_unVROverlayMaxKeyLength","consttype": "const uint32_t", "constval": "128"}
,{
@@ -1346,7 +1369,7 @@
,{
"constname": "k_unMaxOverlayIntersectionMaskPrimitivesCount","consttype": "const uint32_t", "constval": "32"}
,{
- "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_024"}
+ "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_025"}
,{
"constname": "IVROverlayView_Version","consttype": "const char *const", "constval": "IVROverlayView_003"}
,{
@@ -1416,6 +1439,8 @@
,{
"constname": "k_pch_SteamVR_ShowStage_Bool","consttype": "const char *const", "constval": "showStage"}
,{
+ "constname": "k_pch_SteamVR_DrawTrackingReferences_Bool","consttype": "const char *const", "constval": "drawTrackingReferences"}
+,{
"constname": "k_pch_SteamVR_ActivateMultipleDrivers_Bool","consttype": "const char *const", "constval": "activateMultipleDrivers"}
,{
"constname": "k_pch_SteamVR_UsingSpeakers_Bool","consttype": "const char *const", "constval": "usingSpeakers"}
@@ -1436,6 +1461,10 @@
,{
"constname": "k_pch_SteamVR_MotionSmoothingOverride_Int32","consttype": "const char *const", "constval": "motionSmoothingOverride"}
,{
+ "constname": "k_pch_SteamVR_FramesToThrottle_Int32","consttype": "const char *const", "constval": "framesToThrottle"}
+,{
+ "constname": "k_pch_SteamVR_AdditionalFramesToPredict_Int32","consttype": "const char *const", "constval": "additionalFramesToPredict"}
+,{
"constname": "k_pch_SteamVR_DisableAsyncReprojection_Bool","consttype": "const char *const", "constval": "disableAsync"}
,{
"constname": "k_pch_SteamVR_ForceFadeOnBadTracking_Bool","consttype": "const char *const", "constval": "forceFadeOnBadTracking"}
@@ -1520,6 +1549,10 @@
,{
"constname": "k_pch_SteamVR_BlockOculusSDKOnAllLaunches_Bool","consttype": "const char *const", "constval": "blockOculusSDKOnAllLaunches"}
,{
+ "constname": "k_pch_SteamVR_HDCPLegacyCompatibility_Bool","consttype": "const char *const", "constval": "hdcp14legacyCompatibility"}
+,{
+ "constname": "k_pch_SteamVR_UsePrism_Bool","consttype": "const char *const", "constval": "usePrism"}
+,{
"constname": "k_pch_DirectMode_Section","consttype": "const char *const", "constval": "direct_mode"}
,{
"constname": "k_pch_DirectMode_Enable_Bool","consttype": "const char *const", "constval": "enable"}
@@ -1704,6 +1737,8 @@
,{
"constname": "k_pch_audio_DualSpeakerAndJackOutput_Bool","consttype": "const char *const", "constval": "dualSpeakerAndJackOutput"}
,{
+ "constname": "k_pch_audio_MuteMicMonitor_Bool","consttype": "const char *const", "constval": "muteMicMonitor"}
+,{
"constname": "k_pch_Power_Section","consttype": "const char *const", "constval": "power"}
,{
"constname": "k_pch_Power_PowerOffOnExit_Bool","consttype": "const char *const", "constval": "powerOffOnExit"}
@@ -1730,6 +1765,8 @@
,{
"constname": "k_pch_Dashboard_DashboardScale","consttype": "const char *const", "constval": "dashboardScale"}
,{
+ "constname": "k_pch_Dashboard_UseStandaloneSystemLayer","consttype": "const char *const", "constval": "standaloneSystemLayer"}
+,{
"constname": "k_pch_modelskin_Section","consttype": "const char *const", "constval": "modelskins"}
,{
"constname": "k_pch_Driver_Enable_Bool","consttype": "const char *const", "constval": "enable"}
@@ -1938,6 +1975,9 @@
,{"struct": "vr::HmdRect2_t","fields": [
{ "fieldname": "vTopLeft", "fieldtype": "struct vr::HmdVector2_t"},
{ "fieldname": "vBottomRight", "fieldtype": "struct vr::HmdVector2_t"}]}
+,{"struct": "vr::VRBoneTransform_t","fields": [
+{ "fieldname": "position", "fieldtype": "struct vr::HmdVector4_t"},
+{ "fieldname": "orientation", "fieldtype": "struct vr::HmdQuaternionf_t"}]}
,{"struct": "vr::DistortionCoordinates_t","fields": [
{ "fieldname": "rfRed", "fieldtype": "float [2]"},
{ "fieldname": "rfGreen", "fieldtype": "float [2]"},
@@ -2014,7 +2054,8 @@
{ "fieldname": "bConnectionLost", "fieldtype": "_Bool"}]}
,{"struct": "vr::VREvent_Overlay_t","fields": [
{ "fieldname": "overlayHandle", "fieldtype": "uint64_t"},
-{ "fieldname": "devicePath", "fieldtype": "uint64_t"}]}
+{ "fieldname": "devicePath", "fieldtype": "uint64_t"},
+{ "fieldname": "memoryBlockId", "fieldtype": "uint64_t"}]}
,{"struct": "vr::VREvent_Status_t","fields": [
{ "fieldname": "statusState", "fieldtype": "uint32_t"}]}
,{"struct": "vr::VREvent_Keyboard_t","fields": [
@@ -2135,9 +2176,6 @@
{ "fieldname": "ulButtonPressed", "fieldtype": "uint64_t"},
{ "fieldname": "ulButtonTouched", "fieldtype": "uint64_t"},
{ "fieldname": "rAxis", "fieldtype": "struct vr::VRControllerAxis_t [5]"}]}
-,{"struct": "vr::VRBoneTransform_t","fields": [
-{ "fieldname": "position", "fieldtype": "struct vr::HmdVector4_t"},
-{ "fieldname": "orientation", "fieldtype": "struct vr::HmdQuaternionf_t"}]}
,{"struct": "vr::CameraVideoStreamFrameHeader_t","fields": [
{ "fieldname": "eFrameType", "fieldtype": "enum vr::EVRTrackedCameraFrameType"},
{ "fieldname": "nWidth", "fieldtype": "uint32_t"},
@@ -2239,6 +2277,11 @@
,{"struct": "vr::VROverlayIntersectionMaskPrimitive_t","fields": [
{ "fieldname": "m_nPrimitiveType", "fieldtype": "enum vr::EVROverlayIntersectionMaskPrimitiveType"},
{ "fieldname": "m_Primitive", "fieldtype": "VROverlayIntersectionMaskPrimitive_Data_t"}]}
+,{"struct": "vr::VROverlayProjection_t","fields": [
+{ "fieldname": "fLeft", "fieldtype": "float"},
+{ "fieldname": "fRight", "fieldtype": "float"},
+{ "fieldname": "fTop", "fieldtype": "float"},
+{ "fieldname": "fBottom", "fieldtype": "float"}]}
,{"struct": "vr::VROverlayView_t","fields": [
{ "fieldname": "overlayHandle", "fieldtype": "VROverlayHandle_t"},
{ "fieldname": "texture", "fieldtype": "struct vr::Texture_t"},
@@ -3553,7 +3596,7 @@
"returntype": "void",
"params": [
{ "paramname": "fSeconds" ,"paramtype": "float"},
-{ "paramname": "bFadeIn" ,"paramtype": "bool"}
+{ "paramname": "bFadeGridIn" ,"paramtype": "bool"}
]
}
,{
@@ -4182,6 +4225,18 @@
}
,{
"classname": "vr::IVROverlay",
+ "methodname": "SetOverlayTransformProjection",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "eTrackingOrigin" ,"paramtype": "vr::ETrackingUniverseOrigin"},
+{ "paramname": "pmatTrackingOriginToOverlayTransform" ,"paramtype": "const struct vr::HmdMatrix34_t *"},
+{ "paramname": "pProjection" ,"paramtype": "const struct vr::VROverlayProjection_t *"},
+{ "paramname": "eEye" ,"paramtype": "vr::EVREye"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
"methodname": "ShowOverlay",
"returntype": "vr::EVROverlayError",
"params": [
diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h
index 4304f79..13c71fc 100644
--- a/headers/openvr_capi.h
+++ b/headers/openvr_capi.h
@@ -115,12 +115,12 @@ static const char * k_pch_MimeType_GameTheater = "vr/game_theater";
static const char * IVRApplications_Version = "IVRApplications_007";
static const char * IVRChaperone_Version = "IVRChaperone_004";
static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_006";
-static const char * IVRCompositor_Version = "IVRCompositor_026";
+static const char * IVRCompositor_Version = "IVRCompositor_027";
static const unsigned long k_unVROverlayMaxKeyLength = 128;
static const unsigned long k_unVROverlayMaxNameLength = 128;
static const unsigned long k_unMaxOverlayCount = 128;
static const unsigned long k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
-static const char * IVROverlay_Version = "IVROverlay_024";
+static const char * IVROverlay_Version = "IVROverlay_025";
static const char * IVROverlayView_Version = "IVROverlayView_003";
static const unsigned long k_unHeadsetViewMaxWidth = 3840;
static const unsigned long k_unHeadsetViewMaxHeight = 2160;
@@ -155,6 +155,7 @@ static const char * k_pch_SteamVR_GridColor_String = "gridColor";
static const char * k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
static const char * k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor";
static const char * k_pch_SteamVR_ShowStage_Bool = "showStage";
+static const char * k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences";
static const char * k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
static const char * k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
static const char * k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
@@ -165,6 +166,8 @@ static const char * k_pch_SteamVR_SupersampleScale_Float = "supersampleScale";
static const char * k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution";
static const char * k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing";
static const char * k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride";
+static const char * k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle";
+static const char * k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict";
static const char * k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync";
static const char * k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
static const char * k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView";
@@ -207,6 +210,8 @@ static const char * k_pch_SteamVR_AllowGlobalActionSetPriority = "globalActionSe
static const char * k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2";
static const char * k_pch_SteamVR_BlockOculusSDKOnOpenVRLaunchOption_Bool = "blockOculusSDKOnOpenVRLaunchOption";
static const char * k_pch_SteamVR_BlockOculusSDKOnAllLaunches_Bool = "blockOculusSDKOnAllLaunches";
+static const char * k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility";
+static const char * k_pch_SteamVR_UsePrism_Bool = "usePrism";
static const char * k_pch_DirectMode_Section = "direct_mode";
static const char * k_pch_DirectMode_Enable_Bool = "enable";
static const char * k_pch_DirectMode_Count_Int32 = "count";
@@ -299,6 +304,7 @@ static const char * k_pch_audio_EnablePlaybackMirrorIndependentVolume_Bool = "en
static const char * k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId";
static const char * k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
static const char * k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput";
+static const char * k_pch_audio_MuteMicMonitor_Bool = "muteMicMonitor";
static const char * k_pch_Power_Section = "power";
static const char * k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit";
static const char * k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout";
@@ -312,6 +318,7 @@ static const char * k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
static const char * k_pch_Dashboard_Position = "position";
static const char * k_pch_Dashboard_DesktopScale = "desktopScale";
static const char * k_pch_Dashboard_DashboardScale = "dashboardScale";
+static const char * k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer";
static const char * k_pch_modelskin_Section = "modelskins";
static const char * k_pch_Driver_Enable_Bool = "enable";
static const char * k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode";
@@ -614,9 +621,13 @@ typedef enum ETrackedDeviceProperty
ETrackedDeviceProperty_Prop_DisplaySupportsAnalogGain_Bool = 2085,
ETrackedDeviceProperty_Prop_DisplayMinAnalogGain_Float = 2086,
ETrackedDeviceProperty_Prop_DisplayMaxAnalogGain_Float = 2087,
+ ETrackedDeviceProperty_Prop_CameraExposureTime_Float = 2088,
+ ETrackedDeviceProperty_Prop_CameraGlobalGain_Float = 2089,
ETrackedDeviceProperty_Prop_DashboardScale_Float = 2091,
ETrackedDeviceProperty_Prop_IpdUIRangeMinMeters_Float = 2100,
ETrackedDeviceProperty_Prop_IpdUIRangeMaxMeters_Float = 2101,
+ ETrackedDeviceProperty_Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102,
+ ETrackedDeviceProperty_Prop_Hmd_SupportsMicMonitoring_Bool = 2103,
ETrackedDeviceProperty_Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200,
ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201,
ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202,
@@ -714,6 +725,8 @@ typedef enum EVRSubmitFlags
EVRSubmitFlags_Submit_TextureWithDepth = 16,
EVRSubmitFlags_Submit_FrameDiscontinuty = 32,
EVRSubmitFlags_Submit_VulkanTextureWithArrayData = 64,
+ EVRSubmitFlags_Submit_GlArrayTexture = 128,
+ EVRSubmitFlags_Submit_Reserved2 = 32768,
} EVRSubmitFlags;
typedef enum EVRState
@@ -1082,8 +1095,11 @@ typedef enum EVRApplicationType
EVRApplicationType_VRApplication_SteamWatchdog = 6,
EVRApplicationType_VRApplication_Bootstrapper = 7,
EVRApplicationType_VRApplication_WebHelper = 8,
- EVRApplicationType_VRApplication_OpenXR = 9,
- EVRApplicationType_VRApplication_Max = 10,
+ EVRApplicationType_VRApplication_OpenXRInstance = 9,
+ EVRApplicationType_VRApplication_OpenXRScene = 10,
+ EVRApplicationType_VRApplication_OpenXROverlay = 11,
+ EVRApplicationType_VRApplication_Prism = 12,
+ EVRApplicationType_VRApplication_Max = 13,
} EVRApplicationType;
typedef enum EVRFirmwareError
@@ -1168,6 +1184,15 @@ typedef enum EVRInitError
EVRInitError_VRInitError_Init_FailedForVrMonitor = 144,
EVRInitError_VRInitError_Init_PropertyManagerInitFailed = 145,
EVRInitError_VRInitError_Init_WebServerFailed = 146,
+ EVRInitError_VRInitError_Init_IllegalTypeTransition = 147,
+ EVRInitError_VRInitError_Init_MismatchedRuntimes = 148,
+ EVRInitError_VRInitError_Init_InvalidProcessId = 149,
+ EVRInitError_VRInitError_Init_VRServiceStartupFailed = 150,
+ EVRInitError_VRInitError_Init_PrismNeedsNewDrivers = 151,
+ EVRInitError_VRInitError_Init_PrismStartupTimedOut = 152,
+ EVRInitError_VRInitError_Init_CouldNotStartPrism = 153,
+ EVRInitError_VRInitError_Init_CreateDriverDirectDeviceFailed = 154,
+ EVRInitError_VRInitError_Init_PrismExitedUnexpectedly = 155,
EVRInitError_VRInitError_Driver_Failed = 200,
EVRInitError_VRInitError_Driver_Unknown = 201,
EVRInitError_VRInitError_Driver_HmdUnknown = 202,
@@ -1283,6 +1308,9 @@ typedef enum EVRInitError
EVRInitError_VRInitError_Compositor_CreateOverlayInvalidCall = 488,
EVRInitError_VRInitError_Compositor_CreateOverlayAlreadyInitialized = 489,
EVRInitError_VRInitError_Compositor_FailedToCreateMailbox = 490,
+ EVRInitError_VRInitError_Compositor_WindowInterfaceIsNull = 491,
+ EVRInitError_VRInitError_Compositor_SystemLayerCreateInstance = 492,
+ EVRInitError_VRInitError_Compositor_SystemLayerCreateSession = 493,
EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
EVRInitError_VRInitError_VendorSpecific_WindowsNotInDevMode = 1001,
EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101,
@@ -1410,6 +1438,7 @@ typedef enum EVRApplicationError
EVRApplicationError_VRApplicationError_PropertyNotSet = 201,
EVRApplicationError_VRApplicationError_UnknownProperty = 202,
EVRApplicationError_VRApplicationError_InvalidParameter = 203,
+ EVRApplicationError_VRApplicationError_NotImplemented = 300,
} EVRApplicationError;
typedef enum EVRApplicationProperty
@@ -1509,6 +1538,7 @@ typedef enum VROverlayTransformType
VROverlayTransformType_VROverlayTransform_DashboardTab = 5,
VROverlayTransformType_VROverlayTransform_DashboardThumb = 6,
VROverlayTransformType_VROverlayTransform_Mountable = 7,
+ VROverlayTransformType_VROverlayTransform_Projection = 8,
} VROverlayTransformType;
typedef enum VROverlayFlags
@@ -1869,6 +1899,12 @@ typedef struct HmdRect2_t
struct HmdVector2_t vBottomRight;
} HmdRect2_t;
+typedef struct VRBoneTransform_t
+{
+ struct HmdVector4_t position;
+ struct HmdQuaternionf_t orientation;
+} VRBoneTransform_t;
+
typedef struct DistortionCoordinates_t
{
float rfRed[2]; //float[2]
@@ -2008,6 +2044,7 @@ typedef struct VREvent_Overlay_t
{
uint64_t overlayHandle;
uint64_t devicePath;
+ uint64_t memoryBlockId;
} VREvent_Overlay_t;
typedef struct VREvent_Status_t
@@ -2173,12 +2210,6 @@ typedef struct VRControllerState_t
struct VRControllerAxis_t rAxis[5]; //struct vr::VRControllerAxis_t[5]
} VRControllerState_t;
-typedef struct VRBoneTransform_t
-{
- struct HmdVector4_t position;
- struct HmdQuaternionf_t orientation;
-} VRBoneTransform_t;
-
typedef struct CameraVideoStreamFrameHeader_t
{
enum EVRTrackedCameraFrameType eFrameType;
@@ -2310,6 +2341,14 @@ typedef struct IntersectionMaskCircle_t
float m_flRadius;
} IntersectionMaskCircle_t;
+typedef struct VROverlayProjection_t
+{
+ float fLeft;
+ float fRight;
+ float fTop;
+ float fBottom;
+} VROverlayProjection_t;
+
typedef struct VROverlayView_t
{
VROverlayHandle_t overlayHandle;
@@ -2758,7 +2797,7 @@ struct VR_IVRCompositor_FnTable
void (OPENVR_FNTABLE_CALLTYPE *GetCumulativeStats)(struct Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes);
void (OPENVR_FNTABLE_CALLTYPE *FadeToColor)(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground);
struct HmdColor_t (OPENVR_FNTABLE_CALLTYPE *GetCurrentFadeColor)(bool bBackground);
- void (OPENVR_FNTABLE_CALLTYPE *FadeGrid)(float fSeconds, bool bFadeIn);
+ void (OPENVR_FNTABLE_CALLTYPE *FadeGrid)(float fSeconds, bool bFadeGridIn);
float (OPENVR_FNTABLE_CALLTYPE *GetCurrentGridAlpha)();
EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SetSkyboxOverride)(struct Texture_t * pTextures, uint32_t unTextureCount);
void (OPENVR_FNTABLE_CALLTYPE *ClearSkyboxOverride)();
@@ -2839,6 +2878,7 @@ struct VR_IVROverlay_FnTable
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, struct HmdMatrix34_t * pmatParentOverlayToOverlayTransform);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformCursor)(VROverlayHandle_t ulCursorOverlayHandle, struct HmdVector2_t * pvHotspot);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformCursor)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvHotspot);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformProjection)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform, struct VROverlayProjection_t * pProjection, EVREye eEye);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowOverlay)(VROverlayHandle_t ulOverlayHandle);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *HideOverlay)(VROverlayHandle_t ulOverlayHandle);
bool (OPENVR_FNTABLE_CALLTYPE *IsOverlayVisible)(VROverlayHandle_t ulOverlayHandle);
diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h
index c75cc26..34b7053 100644
--- a/headers/openvr_driver.h
+++ b/headers/openvr_driver.h
@@ -12,39 +12,23 @@
// version.h
+
namespace vr
{
static const uint32_t k_nSteamVRVersionMajor = 1;
- static const uint32_t k_nSteamVRVersionMinor = 14;
- static const uint32_t k_nSteamVRVersionBuild = 15;
+ static const uint32_t k_nSteamVRVersionMinor = 16;
+ static const uint32_t k_nSteamVRVersionBuild = 8;
} // namespace vr
-// vrtypes.h
-#ifndef _INCLUDE_VRTYPES_H
-#define _INCLUDE_VRTYPES_H
-
-// Forward declarations to avoid requiring vulkan.h
-struct VkDevice_T;
-struct VkPhysicalDevice_T;
-struct VkInstance_T;
-struct VkQueue_T;
+// public_vrtypes.h
-// Forward declarations to avoid requiring d3d12.h
-struct ID3D12Resource;
-struct ID3D12CommandQueue;
+#ifndef _INCLUDE_CORE_VRTYPES_PUBLIC_H
+#define _INCLUDE_CORE_VRTYPES_PUBLIC_H
namespace vr
{
#pragma pack( push, 8 )
-/** A handle for a spatial anchor. This handle is only valid during the session it was created in.
-* Anchors that live beyond one session should be saved by their string descriptors. */
-typedef uint32_t SpatialAnchorHandle_t;
-
-typedef void* glSharedTextureHandle_t;
-typedef int32_t glInt_t;
-typedef uint32_t glUInt_t;
-
// right-handed system
// +y is up
// +x is to the right
@@ -111,8 +95,49 @@ struct HmdRect2_t
HmdVector2_t vBottomRight;
};
-/** Used to return the post-distortion UVs for each color channel.
-* UVs range from 0 to 1 with 0,0 in the upper left corner of the
+/** Holds the transform for a single bone */
+struct VRBoneTransform_t
+{
+ HmdVector4_t position;
+ HmdQuaternionf_t orientation;
+};
+
+#pragma pack( pop )
+
+} // namespace vr
+
+#endif
+
+// vrtypes.h
+
+#ifndef _INCLUDE_VRTYPES_H
+#define _INCLUDE_VRTYPES_H
+
+// Forward declarations to avoid requiring vulkan.h
+struct VkDevice_T;
+struct VkPhysicalDevice_T;
+struct VkInstance_T;
+struct VkQueue_T;
+
+// Forward declarations to avoid requiring d3d12.h
+struct ID3D12Resource;
+struct ID3D12CommandQueue;
+
+namespace vr
+{
+#pragma pack( push, 8 )
+
+/** A handle for a spatial anchor. This handle is only valid during the session it was created in.
+* Anchors that live beyond one session should be saved by their string descriptors. */
+typedef uint32_t SpatialAnchorHandle_t;
+
+typedef void* glSharedTextureHandle_t;
+typedef int32_t glInt_t;
+typedef uint32_t glUInt_t;
+
+
+/** Used to return the post-distortion UVs for each color channel.
+* UVs range from 0 to 1 with 0,0 in the upper left corner of the
* source render target. The 0,0 to 1,1 range covers a single eye. */
struct DistortionCoordinates_t
{
@@ -135,7 +160,7 @@ enum ETextureType
TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure
TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef, deprecated in favor of TextureType_Metal on supported platforms
TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure
- TextureType_DXGISharedHandle = 5, // Handle is a HANDLE DXGI share handle, only supported for Overlay render targets.
+ TextureType_DXGISharedHandle = 5, // Handle is a HANDLE DXGI share handle, only supported for Overlay render targets.
// this texture is used directly by our renderer, so only perform atomic (copyresource or resolve) on it
TextureType_Metal = 6, // Handle is a MTLTexture conforming to the MTLSharedTexture protocol. Textures submitted to IVRCompositor::Submit which
// are of type MTLTextureType2DArray assume layer 0 is the left eye texture (vr::EVREye::Eye_left), layer 1 is the right
@@ -368,8 +393,8 @@ enum ETrackedDeviceProperty
Prop_SecondsFromVsyncToPhotons_Float = 2001,
Prop_DisplayFrequency_Float = 2002,
Prop_UserIpdMeters_Float = 2003,
- Prop_CurrentUniverseId_Uint64 = 2004,
- Prop_PreviousUniverseId_Uint64 = 2005,
+ Prop_CurrentUniverseId_Uint64 = 2004,
+ Prop_PreviousUniverseId_Uint64 = 2005,
Prop_DisplayFirmwareVersion_Uint64 = 2006,
Prop_IsOnDesktop_Bool = 2007,
Prop_DisplayMCType_Int32 = 2008,
@@ -450,11 +475,14 @@ enum ETrackedDeviceProperty
Prop_DisplaySupportsAnalogGain_Bool = 2085,
Prop_DisplayMinAnalogGain_Float = 2086,
Prop_DisplayMaxAnalogGain_Float = 2087,
-
+ Prop_CameraExposureTime_Float = 2088,
+ Prop_CameraGlobalGain_Float = 2089,
// Prop_DashboardLayoutPathName_String = 2090, // DELETED
Prop_DashboardScale_Float = 2091,
Prop_IpdUIRangeMinMeters_Float = 2100,
Prop_IpdUIRangeMaxMeters_Float = 2101,
+ Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102,
+ Prop_Hmd_SupportsMicMonitoring_Bool = 2103,
// Driver requested mura correction properties
Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200,
@@ -529,7 +557,7 @@ enum ETrackedDeviceProperty
// Vendors are free to expose private debug data in this reserved region
Prop_VendorSpecific_Reserved_Start = 10000,
Prop_VendorSpecific_Reserved_End = 10999,
-
+
Prop_TrackedDeviceProperty_Max = 1000000,
};
@@ -638,10 +666,18 @@ enum EVRSubmitFlags
// Set to indicate that pTexture->handle is a contains VRVulkanTextureArrayData_t
Submit_VulkanTextureWithArrayData = 0x40,
+
+ // If the texture pointer passed in is an OpenGL Array texture, set this flag
+ Submit_GlArrayTexture = 0x80,
+
+ // Do not use
+ Submit_Reserved2 = 0x8000,
+
+
};
/** Data required for passing Vulkan textures to IVRCompositor::Submit.
-* Be sure to call OpenVR_Shutdown before destroying these resources.
+* Be sure to call OpenVR_Shutdown before destroying these resources.
* Please see https://github.com/ValveSoftware/openvr/wiki/Vulkan for Vulkan-specific documentation */
struct VRVulkanTextureData_t
{
@@ -655,7 +691,7 @@ struct VRVulkanTextureData_t
};
/** Data required for passing Vulkan texture arrays to IVRCompositor::Submit.
-* Be sure to call OpenVR_Shutdown before destroying these resources.
+* Be sure to call OpenVR_Shutdown before destroying these resources.
* Please see https://github.com/ValveSoftware/openvr/wiki/Vulkan for Vulkan-specific documentation */
struct VRVulkanTextureArrayData_t : public VRVulkanTextureData_t
{
@@ -718,7 +754,7 @@ enum EVREventType
// VREvent_DualAnalog_Move = 254, // No longer sent
// VREvent_DualAnalog_ModeSwitch1 = 255, // No longer sent
// VREvent_DualAnalog_ModeSwitch2 = 256, // No longer sent
- VREvent_Modal_Cancel = 257, // Sent to overlays with the
+ VREvent_Modal_Cancel = 257, // Sent to overlays with the
VREvent_MouseMove = 300, // data is mouse
VREvent_MouseButtonDown = 301, // data is mouse
@@ -728,7 +764,7 @@ enum EVREventType
VREvent_ScrollDiscrete = 305, // data is scroll
VREvent_TouchPadMove = 306, // data is mouse
VREvent_OverlayFocusChanged = 307, // data is overlay, global event
- VREvent_ReloadOverlays = 308,
+ VREvent_ReloadOverlays = 308,
VREvent_ScrollSmooth = 309, // data is scroll
VREvent_LockMousePosition = 310,
VREvent_UnlockMousePosition = 311,
@@ -882,7 +918,7 @@ enum EVREventType
VREvent_MessageOverlay_Closed = 1650,
VREvent_MessageOverlayCloseRequested = 1651,
-
+
VREvent_Input_HapticVibration = 1700, // data is hapticVibration
VREvent_Input_BindingLoadFailed = 1701, // data is inputBinding
VREvent_Input_BindingLoadSuccessful = 1702, // data is inputBinding
@@ -915,10 +951,10 @@ enum EVREventType
// VREvent_TrackedDeviceUserInteractionStarted fires when the devices transitions from Standby -> UserInteraction or Idle -> UserInteraction.
// VREvent_TrackedDeviceUserInteractionEnded fires when the devices transitions from UserInteraction_Timeout -> Idle
enum EDeviceActivityLevel
-{
- k_EDeviceActivityLevel_Unknown = -1,
+{
+ k_EDeviceActivityLevel_Unknown = -1,
k_EDeviceActivityLevel_Idle = 0, // No activity for the last 10 seconds
- k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now
+ k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now
k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds
k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management)
k_EDeviceActivityLevel_Idle_Timeout = 4,
@@ -936,7 +972,7 @@ enum EVRButtonId
k_EButton_DPad_Right = 5,
k_EButton_DPad_Down = 6,
k_EButton_A = 7,
-
+
k_EButton_ProximitySensor = 31,
k_EButton_Axis0 = 32,
@@ -1035,6 +1071,7 @@ struct VREvent_Overlay_t
{
uint64_t overlayHandle;
uint64_t devicePath;
+ uint64_t memoryBlockId;
};
@@ -1233,9 +1270,9 @@ typedef union
} VREvent_Data_t;
-#if defined(__linux__) || defined(__APPLE__)
-// This structure was originally defined mis-packed on Linux, preserved for
-// compatibility.
+#if defined(__linux__) || defined(__APPLE__)
+// This structure was originally defined mis-packed on Linux, preserved for
+// compatibility.
#pragma pack( push, 4 )
#endif
@@ -1249,7 +1286,7 @@ struct VREvent_t
VREvent_Data_t data;
};
-#if defined(__linux__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__APPLE__)
#pragma pack( pop )
#endif
@@ -1318,9 +1355,9 @@ enum EVRSpatialAnchorError
VRSpatialAnchorError_UnknownDriver = 13,
};
-/** The mesh to draw into the stencil (or depth) buffer to perform
+/** The mesh to draw into the stencil (or depth) buffer to perform
* early stencil (or depth) kills of pixels that will never appear on the HMD.
-* This mesh draws on all the pixels that will be hidden after distortion.
+* This mesh draws on all the pixels that will be hidden after distortion.
*
* If the HMD does not provide a visible area mesh pVertexData will be
* NULL and unTriangleCount will be 0. */
@@ -1341,7 +1378,7 @@ enum EHiddenAreaMeshType
};
-/** Identifies what kind of axis is on the controller at index n. Read this type
+/** Identifies what kind of axis is on the controller at index n. Read this type
* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n );
*/
enum EVRControllerAxisType
@@ -1365,16 +1402,16 @@ struct VRControllerAxis_t
static const uint32_t k_unControllerStateAxisCount = 5;
-#if defined(__linux__) || defined(__APPLE__)
-// This structure was originally defined mis-packed on Linux, preserved for
-// compatibility.
+#if defined(__linux__) || defined(__APPLE__)
+// This structure was originally defined mis-packed on Linux, preserved for
+// compatibility.
#pragma pack( push, 4 )
#endif
/** Holds all the state of a controller at one moment in time. */
struct VRControllerState001_t
{
- // If packet num matches that on your prior call, then the controller state hasn't been changed since
+ // If packet num matches that on your prior call, then the controller state hasn't been changed since
// your last call and there is no need to process it
uint32_t unPacketNum;
@@ -1385,7 +1422,7 @@ struct VRControllerState001_t
// Axis data for the controller's analog inputs
VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ];
};
-#if defined(__linux__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__APPLE__)
#pragma pack( pop )
#endif
@@ -1449,12 +1486,12 @@ enum EVROverlayError
VROverlayError_TextureNotLocked = 33,
};
-/** enum values to pass in to VR_Init to identify whether the application will
+/** enum values to pass in to VR_Init to identify whether the application will
* draw a 3D scene. */
enum EVRApplicationType
{
- VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries
- VRApplication_Scene = 1, // Application will submit 3D frames
+ VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries
+ VRApplication_Scene = 1, // Application will submit 3D frames
VRApplication_Overlay = 2, // Application only interacts with overlays
VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not
// keep it running if everything else quits.
@@ -1464,12 +1501,25 @@ enum EVRApplicationType
VRApplication_SteamWatchdog = 6,// Reserved for Steam
VRApplication_Bootstrapper = 7, // reserved for vrstartup
VRApplication_WebHelper = 8, // reserved for vrwebhelper
- VRApplication_OpenXR = 9, // reserved for openxr
+ VRApplication_OpenXRInstance = 9, // reserved for openxr (created instance, but not session yet)
+ VRApplication_OpenXRScene = 10, // reserved for openxr (started session)
+ VRApplication_OpenXROverlay = 11, // reserved for openxr (started overlay session)
+ VRApplication_Prism = 12, // reserved for the vrprismhost process
VRApplication_Max
};
+/** returns true if the specified application type is one of the
+* OpenXR types */
+inline bool IsOpenXRAppType( EVRApplicationType eType )
+{
+ return eType == VRApplication_OpenXRInstance
+ || eType == VRApplication_OpenXRScene
+ || eType == VRApplication_OpenXROverlay;
+}
+
+
/** error codes for firmware */
enum EVRFirmwareError
{
@@ -1505,17 +1555,17 @@ enum EVRSkeletalMotionRange
enum EVRSkeletalTrackingLevel
{
// body part location can't be directly determined by the device. Any skeletal pose provided by
- // the device is estimated by assuming the position required to active buttons, triggers, joysticks,
- // or other input sensors.
+ // the device is estimated by assuming the position required to active buttons, triggers, joysticks,
+ // or other input sensors.
// E.g. Vive Controller, Gamepad
VRSkeletalTracking_Estimated = 0,
- // body part location can be measured directly but with fewer degrees of freedom than the actual body
- // part. Certain body part positions may be unmeasured by the device and estimated from other input data.
+ // body part location can be measured directly but with fewer degrees of freedom than the actual body
+ // part. Certain body part positions may be unmeasured by the device and estimated from other input data.
// E.g. Index Controllers, gloves that only measure finger curl
VRSkeletalTracking_Partial = 1,
- // Body part location can be measured directly throughout the entire range of motion of the body part.
+ // Body part location can be measured directly throughout the entire range of motion of the body part.
// E.g. Mocap suit for the full body, gloves that measure rotation of each finger segment
VRSkeletalTracking_Full = 2,
@@ -1524,14 +1574,6 @@ enum EVRSkeletalTrackingLevel
};
-
-/** Holds the transform for a single bone */
-struct VRBoneTransform_t
-{
- HmdVector4_t position;
- HmdQuaternionf_t orientation;
-};
-
/** Type used for referring to bones by their index */
typedef int32_t BoneIndex_t;
const BoneIndex_t k_unInvalidBoneIndex = -1;
@@ -1562,8 +1604,8 @@ enum EVRInitError
VRInitError_Init_AppInfoInitFailed = 114,
VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver
VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup
- VRInitError_Init_AnotherAppLaunching = 117,
- VRInitError_Init_SettingsInitFailed = 118,
+ VRInitError_Init_AnotherAppLaunching = 117,
+ VRInitError_Init_SettingsInitFailed = 118,
VRInitError_Init_ShuttingDown = 119,
VRInitError_Init_TooManyObjects = 120,
VRInitError_Init_NoServerForBackgroundApp = 121,
@@ -1574,7 +1616,7 @@ enum EVRInitError
VRInitError_Init_HmdNotFoundPresenceFailed = 126,
VRInitError_Init_VRMonitorNotFound = 127,
VRInitError_Init_VRMonitorStartupFailed = 128,
- VRInitError_Init_LowPowerWatchdogNotSupported = 129,
+ VRInitError_Init_LowPowerWatchdogNotSupported = 129,
VRInitError_Init_InvalidApplicationType = 130,
VRInitError_Init_NotAvailableToWatchdogApps = 131,
VRInitError_Init_WatchdogDisabledInSettings = 132,
@@ -1592,6 +1634,15 @@ enum EVRInitError
VRInitError_Init_FailedForVrMonitor = 144,
VRInitError_Init_PropertyManagerInitFailed = 145,
VRInitError_Init_WebServerFailed = 146,
+ VRInitError_Init_IllegalTypeTransition = 147,
+ VRInitError_Init_MismatchedRuntimes = 148,
+ VRInitError_Init_InvalidProcessId = 149,
+ VRInitError_Init_VRServiceStartupFailed = 150,
+ VRInitError_Init_PrismNeedsNewDrivers = 151,
+ VRInitError_Init_PrismStartupTimedOut = 152,
+ VRInitError_Init_CouldNotStartPrism = 153,
+ VRInitError_Init_CreateDriverDirectDeviceFailed = 154,
+ VRInitError_Init_PrismExitedUnexpectedly = 155,
VRInitError_Driver_Failed = 200,
VRInitError_Driver_Unknown = 201,
@@ -1712,7 +1763,10 @@ enum EVRInitError
VRInitError_Compositor_CreateOverlayInvalidCall = 488,
VRInitError_Compositor_CreateOverlayAlreadyInitialized = 489,
VRInitError_Compositor_FailedToCreateMailbox = 490,
-
+ VRInitError_Compositor_WindowInterfaceIsNull = 491,
+ VRInitError_Compositor_SystemLayerCreateInstance = 492,
+ VRInitError_Compositor_SystemLayerCreateSession = 493,
+
VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
VRInitError_VendorSpecific_WindowsNotInDevMode = 1001,
@@ -1757,7 +1811,7 @@ enum EVRTrackedCameraError
{
VRTrackedCameraError_None = 0,
VRTrackedCameraError_OperationFailed = 100,
- VRTrackedCameraError_InvalidHandle = 101,
+ VRTrackedCameraError_InvalidHandle = 101,
VRTrackedCameraError_InvalidFrameHeaderVersion = 102,
VRTrackedCameraError_OutOfHandles = 103,
VRTrackedCameraError_IPCFailure = 104,
@@ -1781,7 +1835,7 @@ enum EVRTrackedCameraFrameLayout
EVRTrackedCameraFrameLayout_VerticalLayout = 0x0010, // Stereo frames are Top/Bottom (left/right)
EVRTrackedCameraFrameLayout_HorizontalLayout = 0x0020, // Stereo frames are Left/Right
};
-
+
enum EVRTrackedCameraFrameType
{
VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted.
@@ -1814,7 +1868,7 @@ struct CameraVideoStreamFrameHeader_t
uint32_t nFrameSequence;
TrackedDevicePose_t trackedDevicePose;
-
+
uint64_t ulFrameExposureTime; // mid-point of the exposure of the image in host system ticks
};
@@ -1835,18 +1889,18 @@ const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the
const uint32_t VRCompositor_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame
-const uint32_t VRCompositor_PredictionMask = 0x30; // The runtime may predict more than one frame (up to four) ahead if
+const uint32_t VRCompositor_PredictionMask = 0xF0; // The runtime may predict more than one frame (up to four) ahead if
// it detects the application is taking too long to render. These two
// bits will contain the count of additional frames (normally zero).
// Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from
// the latest frame timing entry.
-const uint32_t VRCompositor_ThrottleMask = 0xC0; // Number of frames the compositor is throttling the application.
+const uint32_t VRCompositor_ThrottleMask = 0xF00; // Number of frames the compositor is throttling the application.
// Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from
// the latest frame timing entry.
#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 )
-#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 6 )
+#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 8 )
/** Provides a single frame's timing information to the app */
struct Compositor_FrameTiming
@@ -1938,7 +1992,7 @@ enum Imu_OffScaleFlags
OffScale_GyroY = 0x10,
OffScale_GyroZ = 0x20,
};
-
+
struct ImuSample_t
{
double fSampleTime;
@@ -1967,7 +2021,7 @@ struct ImuSample_t
#ifdef VR_API_EXPORT
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
#else
- #define VR_INTERFACE extern "C"
+ #define VR_INTERFACE extern "C"
#endif
#else
@@ -1978,15 +2032,14 @@ struct ImuSample_t
#if defined( _WIN32 )
#define VR_CALLTYPE __cdecl
#else
- #define VR_CALLTYPE
+ #define VR_CALLTYPE
#endif
} // namespace vr
-
#endif // _INCLUDE_VRTYPES_H
-
// vrannotation.h
+
#ifdef API_GEN
# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
#else
@@ -2006,8 +2059,9 @@ struct ImuSample_t
#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" )
// vrtrackedcameratypes.h
+
#ifndef _VRTRACKEDCAMERATYPES_H
-#define _VRTRACKEDCAMERATYPES_H
+#define _VRTRACKEDCAMERATYPES_H
namespace vr
{
@@ -2110,7 +2164,9 @@ VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t
}
#endif // _VRTRACKEDCAMERATYPES_H
+
// ivrsettings.h
+
#include <string>
namespace vr
@@ -2156,14 +2212,14 @@ namespace vr
{
IVRSettings *m_pSettings;
public:
- CVRSettingHelper( IVRSettings *pSettings )
- {
- m_pSettings = pSettings;
+ CVRSettingHelper( IVRSettings *pSettings )
+ {
+ m_pSettings = pSettings;
}
- const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError )
- {
- return m_pSettings->GetSettingsErrorNameFromEnum( eError );
+ const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError )
+ {
+ return m_pSettings->GetSettingsErrorNameFromEnum( eError );
}
void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr )
@@ -2249,6 +2305,7 @@ namespace vr
static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
static const char * const k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor";
static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage";
+ static const char * const k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences";
static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
@@ -2259,6 +2316,8 @@ namespace vr
static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution";
static const char * const k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing";
static const char * const k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride";
+ static const char * const k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle";
+ static const char * const k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict";
static const char * const k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync";
static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView";
@@ -2301,6 +2360,8 @@ namespace vr
static const char * const k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2";
static const char * const k_pch_SteamVR_BlockOculusSDKOnOpenVRLaunchOption_Bool = "blockOculusSDKOnOpenVRLaunchOption";
static const char * const k_pch_SteamVR_BlockOculusSDKOnAllLaunches_Bool = "blockOculusSDKOnAllLaunches";
+ static const char * const k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility";
+ static const char * const k_pch_SteamVR_UsePrism_Bool = "usePrism";
//-----------------------------------------------------------------------------
// direct mode keys
@@ -2426,6 +2487,7 @@ namespace vr
static const char * const k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId";
static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
static const char * const k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput";
+ static const char * const k_pch_audio_MuteMicMonitor_Bool = "muteMicMonitor";
//-----------------------------------------------------------------------------
// power management keys
@@ -2445,6 +2507,7 @@ namespace vr
static const char * const k_pch_Dashboard_Position = "position";
static const char * const k_pch_Dashboard_DesktopScale = "desktopScale";
static const char * const k_pch_Dashboard_DashboardScale = "dashboardScale";
+ static const char * const k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer";
//-----------------------------------------------------------------------------
// model skin keys
@@ -2514,6 +2577,7 @@ namespace vr
} // namespace vr
// iservertrackeddevicedriver.h
+
namespace vr
{
@@ -2537,7 +2601,7 @@ struct DriverPose_t
* but instead an internal IMU or another reference point in the HMD.
* The following two transforms transform positions and orientations
* to app world space from driver world space,
- * and to HMD head space from driver local body space.
+ * and to HMD head space from driver local body space.
*
* We maintain the driver pose state in its internal coordinate system,
* so we can do the pose prediction math without having to
@@ -2569,13 +2633,13 @@ struct DriverPose_t
/* Orientation of the tracker, represented as a quaternion */
vr::HmdQuaternion_t qRotation;
- /* Angular velocity of the pose in axis-angle
+ /* Angular velocity of the pose in axis-angle
* representation. The direction is the angle of
* rotation and the magnitude is the angle around
* that axis in radians/second. */
double vecAngularVelocity[ 3 ];
- /* Angular acceleration of the pose in axis-angle
+ /* Angular acceleration of the pose in axis-angle
* representation. The direction is the angle of
* rotation and the magnitude is the angle around
* that axis in radians/second^2. */
@@ -2635,7 +2699,9 @@ public:
static const char *ITrackedDeviceServerDriver_Version = "ITrackedDeviceServerDriver_005";
}
+
// ivrdisplaycomponent.h
+
namespace vr
{
@@ -2681,6 +2747,7 @@ namespace vr
}
// ivrdriverdirectmodecomponent.h
+
namespace vr
{
enum VRSwapTextureFlag
@@ -2760,6 +2827,7 @@ namespace vr
}
// ivrcameracomponent.h
+
namespace vr
{
//-----------------------------------------------------------------------------
@@ -2804,7 +2872,9 @@ namespace vr
static const char *IVRCameraComponent_Version = "IVRCameraComponent_003";
}
+
// itrackeddevicedriverprovider.h
+
namespace vr
{
@@ -2812,7 +2882,7 @@ class ITrackedDeviceServerDriver;
struct TrackedDeviceDriverInfo_t;
struct DriverPose_t;
-/** This interface is provided by vrserver to allow the driver to notify
+/** This interface is provided by vrserver to allow the driver to notify
* the system when something changes about a device. These changes must
* not change the serial number or class of the device because those values
* are permanently associated with the device's index. */
@@ -2911,7 +2981,9 @@ public:
static const char *IVRCompositorPluginProvider_Version = "IVRCompositorPluginProvider_001";
}
+
// ivrproperties.h
+
#include <string>
#include <vector>
@@ -3358,6 +3430,7 @@ inline bool CVRPropertyHelpers::IsPropertySet( PropertyContainerHandle_t ulConta
// ivrdriverinput.h
+
namespace vr
{
@@ -3409,6 +3482,7 @@ namespace vr
} // namespace vr
// ivrdriverlog.h
+
namespace vr
{
@@ -3423,7 +3497,9 @@ public:
static const char *IVRDriverLog_Version = "IVRDriverLog_001";
}
+
// ivrserverdriverhost.h
+
namespace vr
{
@@ -3431,7 +3507,7 @@ class ITrackedDeviceServerDriver;
struct TrackedDeviceDriverInfo_t;
struct DriverPose_t;
-/** This interface is provided by vrserver to allow the driver to notify
+/** This interface is provided by vrserver to allow the driver to notify
* the system when something changes about a device. These changes must
* not change the serial number or class of the device because those values
* are permanently associated with the device's index. */
@@ -3491,6 +3567,7 @@ static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_006";
}
// ivrcompositordriverhost.h
+
namespace vr
{
@@ -3507,6 +3584,7 @@ static const char *IVRCompositorDriverHost_Version = "IVRCompositorDriverHost_00
}
// ivrhiddenarea.h
+
namespace vr
{
@@ -3561,7 +3639,9 @@ inline uint32_t CVRHiddenAreaHelpers::GetHiddenArea( EVREye eEye, EHiddenAreaMes
}
}
+
// ivrwatchdoghost.h
+
namespace vr
{
@@ -3581,6 +3661,7 @@ static const char *IVRWatchdogHost_Version = "IVRWatchdogHost_002";
// ivrvirtualdisplay.h
+
namespace vr
{
struct PresentInfo_t
@@ -3613,6 +3694,7 @@ namespace vr
// ivrresources.h
+
namespace vr
{
@@ -3629,7 +3711,7 @@ public:
virtual uint32_t LoadSharedResource( const char *pchResourceName, char *pchBuffer, uint32_t unBufferLen ) = 0;
/** Provides the full path to the specified resource. Resource names can include named directories for
- * drivers and other things, and this resolves all of those and returns the actual physical path.
+ * drivers and other things, and this resolves all of those and returns the actual physical path.
* pchResourceTypeDirectory is the subdirectory of resources to look in. */
virtual uint32_t GetResourceFullPath( const char *pchResourceName, const char *pchResourceTypeDirectory, VR_OUT_STRING() char *pchPathBuffer, uint32_t unBufferLen ) = 0;
};
@@ -3638,13 +3720,15 @@ static const char * const IVRResources_Version = "IVRResources_001";
}
+
// ivriobuffer.h
+
namespace vr
{
typedef uint64_t IOBufferHandle_t;
static const uint64_t k_ulInvalidIOBufferHandle = 0;
-
+
enum EIOBufferError
{
IOBuffer_Success = 0,
@@ -3671,16 +3755,16 @@ static const uint64_t k_ulInvalidIOBufferHandle = 0;
public:
/** opens an existing or creates a new IOBuffer of unSize bytes */
virtual vr::EIOBufferError Open( const char *pchPath, vr::EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, vr::IOBufferHandle_t *pulBuffer ) = 0;
-
+
/** closes a previously opened or created buffer */
virtual vr::EIOBufferError Close( vr::IOBufferHandle_t ulBuffer ) = 0;
-
+
/** reads up to unBytes from buffer into *pDst, returning number of bytes read in *punRead */
virtual vr::EIOBufferError Read( vr::IOBufferHandle_t ulBuffer, void *pDst, uint32_t unBytes, uint32_t *punRead ) = 0;
-
+
/** writes unBytes of data from *pSrc into a buffer. */
virtual vr::EIOBufferError Write( vr::IOBufferHandle_t ulBuffer, void *pSrc, uint32_t unBytes ) = 0;
-
+
/** retrieves the property container of an buffer. */
virtual vr::PropertyContainerHandle_t PropertyContainer( vr::IOBufferHandle_t ulBuffer ) = 0;
@@ -3692,6 +3776,7 @@ static const uint64_t k_ulInvalidIOBufferHandle = 0;
}
// ivrdrivermanager.h
+
namespace vr
{
@@ -3715,6 +3800,7 @@ static const char * const IVRDriverManager_Version = "IVRDriverManager_001";
// ivrdriverspatialanchors.h
+
namespace vr
{
struct SpatialAnchorDriverPose_t
diff --git a/lib/linux32/libopenvr_api.so b/lib/linux32/libopenvr_api.so
index fc6a65e..e8c6144 100755
--- a/lib/linux32/libopenvr_api.so
+++ b/lib/linux32/libopenvr_api.so
Binary files differ
diff --git a/lib/linux64/libopenvr_api.so b/lib/linux64/libopenvr_api.so
index e3bf34d..4bff11f 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 b61a5a0..3a9a3c3 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 3b95d6b..e4cc9b9 100644
--- a/lib/win64/openvr_api.lib
+++ b/lib/win64/openvr_api.lib
Binary files differ
diff --git a/samples/bin/linux32/libopenvr_api.so b/samples/bin/linux32/libopenvr_api.so
index af4b2e1..d87f274 100644
--- a/samples/bin/linux32/libopenvr_api.so
+++ b/samples/bin/linux32/libopenvr_api.so
Binary files differ
diff --git a/samples/bin/linux64/libopenvr_api.so b/samples/bin/linux64/libopenvr_api.so
index cfb9c13..906f06d 100644
--- a/samples/bin/linux64/libopenvr_api.so
+++ b/samples/bin/linux64/libopenvr_api.so
Binary files differ
diff --git a/samples/bin/win32/openvr_api.dll b/samples/bin/win32/openvr_api.dll
index 2c79942..6e423e6 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 e0113cd..a4ad764 100644
--- a/samples/bin/win64/openvr_api.dll
+++ b/samples/bin/win64/openvr_api.dll
Binary files differ
diff --git a/src/openvr_api_public.cpp b/src/openvr_api_public.cpp
index 54aa555..98ba762 100644
--- a/src/openvr_api_public.cpp
+++ b/src/openvr_api_public.cpp
@@ -2,12 +2,12 @@
#define VR_API_EXPORT 1
#include "openvr.h"
#include "ivrclientcore.h"
-#include "pathtools_public.h"
-#include "sharedlibtools_public.h"
-#include "envvartools_public.h"
+#include <vrcore/pathtools_public.h>
+#include <vrcore/sharedlibtools_public.h>
+#include <vrcore/envvartools_public.h>
#include "hmderrors_public.h"
-#include "strtools_public.h"
-#include "vrpathregistry_public.h"
+#include <vrcore/strtools_public.h>
+#include <vrcore/vrpathregistry_public.h>
#include <mutex>
using vr::EVRInitError;
@@ -88,22 +88,23 @@ uint32_t VR_InitInternal( EVRInitError *peError, vr::EVRApplicationType eApplica
void VR_ShutdownInternal()
{
std::lock_guard<std::recursive_mutex> lock( g_mutexSystem );
-
+
+#if !defined( VR_API_PUBLIC )
+ CleanupInternalInterfaces();
+#endif
+
if ( g_pHmdSystem )
{
g_pHmdSystem->Cleanup();
g_pHmdSystem = NULL;
}
+
if ( g_pVRModule )
{
SharedLib_Unload( g_pVRModule );
g_pVRModule = NULL;
}
-#if !defined( VR_API_PUBLIC )
- CleanupInternalInterfaces();
-#endif
-
++g_nVRToken;
}
diff --git a/src/vrcommon/dirtools_public.cpp b/src/vrcommon/dirtools_public.cpp
index e5cfc02..e5fccc1 100644
--- a/src/vrcommon/dirtools_public.cpp
+++ b/src/vrcommon/dirtools_public.cpp
@@ -1,7 +1,7 @@
//========= Copyright Valve Corporation ============//
-#include "dirtools_public.h"
-#include "strtools_public.h"
-#include "pathtools_public.h"
+#include <vrcore/dirtools_public.h>
+#include <vrcore/strtools_public.h>
+#include <vrcore/pathtools_public.h>
#include <errno.h>
#include <string.h>
diff --git a/src/vrcommon/envvartools_public.cpp b/src/vrcommon/envvartools_public.cpp
index 4fb4817..b6de2a8 100644
--- a/src/vrcommon/envvartools_public.cpp
+++ b/src/vrcommon/envvartools_public.cpp
@@ -1,6 +1,6 @@
//========= Copyright Valve Corporation ============//
-#include "envvartools_public.h"
-#include "strtools_public.h"
+#include <vrcore/envvartools_public.h>
+#include <vrcore/strtools_public.h>
#include <stdlib.h>
#include <string>
#include <cctype>
diff --git a/src/vrcommon/hmderrors_public.cpp b/src/vrcommon/hmderrors_public.cpp
index e02c370..6f44d3a 100644
--- a/src/vrcommon/hmderrors_public.cpp
+++ b/src/vrcommon/hmderrors_public.cpp
@@ -173,7 +173,16 @@ const char *GetIDForVRInitError( vr::EVRInitError eError )
RETURN_ENUM_AS_STRING( VRInitError_Init_FailedForVrMonitor);
RETURN_ENUM_AS_STRING( VRInitError_Init_PropertyManagerInitFailed );
RETURN_ENUM_AS_STRING( VRInitError_Init_WebServerFailed );
-
+ RETURN_ENUM_AS_STRING( VRInitError_Init_IllegalTypeTransition );
+ RETURN_ENUM_AS_STRING( VRInitError_Init_MismatchedRuntimes );
+ RETURN_ENUM_AS_STRING( VRInitError_Init_InvalidProcessId );
+ RETURN_ENUM_AS_STRING( VRInitError_Init_VRServiceStartupFailed );
+ RETURN_ENUM_AS_STRING( VRInitError_Init_PrismNeedsNewDrivers );
+ RETURN_ENUM_AS_STRING( VRInitError_Init_PrismStartupTimedOut );
+ RETURN_ENUM_AS_STRING( VRInitError_Init_CouldNotStartPrism );
+ RETURN_ENUM_AS_STRING( VRInitError_Init_CreateDriverDirectDeviceFailed );
+ RETURN_ENUM_AS_STRING( VRInitError_Init_PrismExitedUnexpectedly );
+
RETURN_ENUM_AS_STRING( VRInitError_Driver_Failed );
RETURN_ENUM_AS_STRING( VRInitError_Driver_Unknown );
RETURN_ENUM_AS_STRING( VRInitError_Driver_HmdUnknown);
@@ -292,6 +301,9 @@ const char *GetIDForVRInitError( vr::EVRInitError eError )
RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayInvalidCall );
RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayAlreadyInitialized );
RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateMailbox );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_WindowInterfaceIsNull );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_SystemLayerCreateInstance );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_SystemLayerCreateSession );
// Vendor-specific errors
RETURN_ENUM_AS_STRING( VRInitError_VendorSpecific_UnableToConnectToOculusRuntime);
diff --git a/src/vrcommon/pathtools_public.cpp b/src/vrcommon/pathtools_public.cpp
index 78d01af..2503ec6 100644
--- a/src/vrcommon/pathtools_public.cpp
+++ b/src/vrcommon/pathtools_public.cpp
@@ -1,6 +1,6 @@
//========= Copyright Valve Corporation ============//
-#include "strtools_public.h"
-#include "pathtools_public.h"
+#include <vrcore/strtools_public.h>
+#include <vrcore/pathtools_public.h>
#if defined( _WIN32)
#include <windows.h>
@@ -932,3 +932,57 @@ bool Path_UnlinkFile( const std::string &strFilename )
return ( 0 == unlink( strFilename.c_str() ) );
#endif
}
+
+
+// -----------------------------------------------------------------------------------------------------
+// Limits the set of characters that are allowed in filenames
+// -----------------------------------------------------------------------------------------------------
+std::string Path_SanitizeFilename( const std::string& sFilename )
+{
+ std::string sFixed = sFilename;
+ std::string::iterator iLastDot = sFixed.end();
+ for ( std::string::iterator i = sFixed.begin(); i != sFixed.end(); i++ )
+ {
+ if ( *i == '.' )
+ {
+ iLastDot = i;
+ }
+
+ // path-related characters are forbidden (except the last period)
+ switch ( *i )
+ {
+ case '\0':
+ case '.':
+ case '\\':
+ case '/':
+ case ':':
+ case '|':
+ case '?':
+ case '>':
+ case '<':
+ case '&':
+ case '%':
+ case '@':
+ case '$':
+ case '*':
+ case '\"':
+ *i = '_';
+ break;
+
+ default:
+ if ( *i < 32 )
+ {
+ *i = '_';
+ }
+ break;
+ }
+ }
+
+ if ( iLastDot != sFixed.end() && iLastDot != sFixed.begin()
+ && iLastDot+1 != sFixed.end() )
+ {
+ *iLastDot = '.';
+ }
+
+ return sFixed;
+}
diff --git a/src/vrcommon/pathtools_public.h b/src/vrcommon/pathtools_public.h
index f6a2be2..8bad50a 100644
--- a/src/vrcommon/pathtools_public.h
+++ b/src/vrcommon/pathtools_public.h
@@ -112,6 +112,8 @@ std::string GetUserDocumentsPath();
/** deletes / unlinks a single file */
bool Path_UnlinkFile( const std::string &strFilename );
+std::string Path_SanitizeFilename( const std::string& sFilename );
+
#ifndef MAX_UNICODE_PATH
#define MAX_UNICODE_PATH 32767
#endif
diff --git a/src/vrcommon/sharedlibtools_public.cpp b/src/vrcommon/sharedlibtools_public.cpp
index f2cf57f..cce1528 100644
--- a/src/vrcommon/sharedlibtools_public.cpp
+++ b/src/vrcommon/sharedlibtools_public.cpp
@@ -1,5 +1,5 @@
//========= Copyright Valve Corporation ============//
-#include "sharedlibtools_public.h"
+#include <vrcore/sharedlibtools_public.h>
#include <string.h>
#if defined(_WIN32)
diff --git a/src/vrcommon/strtools_public.cpp b/src/vrcommon/strtools_public.cpp
index 218a555..343ec42 100644
--- a/src/vrcommon/strtools_public.cpp
+++ b/src/vrcommon/strtools_public.cpp
@@ -1,5 +1,5 @@
//========= Copyright Valve Corporation ============//
-#include "strtools_public.h"
+#include <vrcore/strtools_public.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
@@ -9,11 +9,30 @@
#include <functional>
#include <locale>
#include <codecvt>
+#include <vrcore/assert.h>
#if defined( _WIN32 )
#include <windows.h>
#endif
+#if defined( OSX ) || defined( LINUX )
+//-----------------------------------------------------------------------------
+// Purpose: stricmp -> strcasecmp bridge
+//-----------------------------------------------------------------------------
+int stricmp( const char *pStr1, const char *pStr2 )
+{
+ return strcasecmp( pStr1, pStr2 );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: strincmp -> strncasecmp bridge
+//-----------------------------------------------------------------------------
+int strnicmp( const char *pStr1, const char *pStr2, size_t unBufferLen )
+{
+ return strncasecmp( pStr1, pStr2, unBufferLen );
+}
+#endif
+
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
@@ -92,6 +111,53 @@ std::wstring UTF8to16(const char * in)
std::wstring UTF8to16( const std::string & in ) { return UTF8to16( in.c_str() ); }
+//-----------------------------------------------------------------------------
+// Purpose: Format string to std::string converter
+//-----------------------------------------------------------------------------
+std::string Format( const char *pchFormat, ... )
+{
+ static constexpr size_t k_ulMaxStackString = 4096;
+
+ va_list args;
+ char pchBuffer[k_ulMaxStackString];
+
+ va_start( args, pchFormat );
+ int unSize = vsnprintf( pchBuffer, sizeof( pchBuffer ), pchFormat, args );
+ va_end( args );
+
+ // Something went fairly wrong
+ if ( unSize < 0 )
+ {
+ AssertMsg( false, "Format string parse failure" );
+ return "";
+ }
+
+ // Processing on the stack worked, success
+ if ( unSize < k_ulMaxStackString )
+ {
+ return pchBuffer;
+ }
+
+ // If processing on the stack failed, fallback to a dynamic allocation
+ std::vector< char > vecChar{};
+ vecChar.resize( unSize + 1 );
+
+ va_start( args, pchFormat );
+ unSize = vsnprintf( vecChar.data(), vecChar.size(), pchFormat, args );
+ va_end( args );
+
+ // Double check, just in case
+ if ( unSize < 0 )
+ {
+ AssertMsg( false, "Format string parse failure" );
+ return "";
+ }
+
+ return vecChar.data();
+}
+
+
+
#if defined( _WIN32 )
//-----------------------------------------------------------------------------
diff --git a/src/vrcommon/strtools_public.h b/src/vrcommon/strtools_public.h
index 349b5b3..0e8e349 100644
--- a/src/vrcommon/strtools_public.h
+++ b/src/vrcommon/strtools_public.h
@@ -39,6 +39,9 @@ void strcpy_safe( char (& buffer) [ bufferSize ], const char *pchSource )
strcpy_safe( buffer, bufferSize, pchSource );
}
+/** Turns printf-style format args into a std::string */
+std::string Format( const char *pchFormat, ... );
+
/** converts a string to upper case */
std::string StringToUpper( const std::string & sString );
@@ -48,12 +51,11 @@ std::string StringToLower( const std::string & sString );
// we stricmp (from WIN) but it isn't POSIX - OSX/LINUX have strcasecmp so just inline bridge to it
#if defined( OSX ) || defined( LINUX )
-#include <strings.h>
-inline int stricmp(const char *pStr1, const char *pStr2) { return strcasecmp(pStr1,pStr2); }
+int stricmp(const char *pStr1, const char *pStr2);
#ifndef _stricmp
#define _stricmp stricmp
#endif
-inline int strnicmp( const char *pStr1, const char *pStr2, size_t unBufferLen ) { return strncasecmp( pStr1,pStr2, unBufferLen ); }
+int strnicmp( const char *pStr1, const char *pStr2, size_t unBufferLen );
#ifndef _strnicmp
#define _strnicmp strnicmp
#endif
diff --git a/src/vrcommon/vrpathregistry_public.cpp b/src/vrcommon/vrpathregistry_public.cpp
index 6a7f457..2746bdb 100644
--- a/src/vrcommon/vrpathregistry_public.cpp
+++ b/src/vrcommon/vrpathregistry_public.cpp
@@ -1,11 +1,11 @@
//========= Copyright Valve Corporation ============//
-#include "vrpathregistry_public.h"
-#include "json/json.h"
-#include "pathtools_public.h"
-#include "envvartools_public.h"
-#include "strtools_public.h"
-#include "dirtools_public.h"
+#include <vrcore/vrpathregistry_public.h>
+#include <json/json.h>
+#include <vrcore/pathtools_public.h>
+#include <vrcore/envvartools_public.h>
+#include <vrcore/strtools_public.h>
+#include <vrcore/dirtools_public.h>
#if defined( WIN32 )
#include <windows.h>
@@ -21,6 +21,7 @@
#endif
#include <algorithm>
+#include <sstream>
#ifndef VRLog
#if defined( __MINGW32__ )
@@ -439,3 +440,44 @@ bool CVRPathRegistry_Public::GetPaths( std::string *psRuntimePath, std::string *
return bLoadedRegistry;
}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+uint32_t CVRPathRegistry_Public::GetSteamAppId()
+{
+#if !defined( REL_BRANCH_ONLY )
+ uint32_t nSteamAppId = k_unSteamVRMainAppId;
+#else
+ uint32_t nSteamAppId = k_unSteamVRAppId;
+#endif
+
+ return nSteamAppId;
+}
+
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+bool CVRPathRegistry_Public::IsSteamVRMain()
+{
+#if defined( REL_BRANCH_ONLY )
+ return false;
+#else
+ return true;
+#endif
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+uint32_t CVRPathRegistry_Public::InitSteamAppId()
+{
+ uint32_t nSteamAppId = CVRPathRegistry_Public::GetSteamAppId();
+
+ // Forcefully setting to what it should be before SteamAPI_Init() since SteamVR is more often
+ // started as child processes of the game app and otherwise Steam then considers us as the
+ // wrong app id.
+ SetEnvironmentVariable( "SteamAppId", std::to_string( nSteamAppId ).c_str() );
+ SetEnvironmentVariable( "SteamGameId", std::to_string( nSteamAppId ).c_str() );
+
+ return nSteamAppId;
+}
+
diff --git a/src/vrcommon/vrpathregistry_public.h b/src/vrcommon/vrpathregistry_public.h
index 776935a..6563286 100644
--- a/src/vrcommon/vrpathregistry_public.h
+++ b/src/vrcommon/vrpathregistry_public.h
@@ -9,11 +9,18 @@ static const char *k_pchRuntimeOverrideVar = "VR_OVERRIDE";
static const char *k_pchConfigOverrideVar = "VR_CONFIG_PATH";
static const char *k_pchLogOverrideVar = "VR_LOG_PATH";
+static const uint32_t k_unSteamVRAppId = 250820;
+static const uint32_t k_unSteamVRMainAppId = 330050;
+
+
class CVRPathRegistry_Public
{
public:
static std::string GetVRPathRegistryFilename();
static std::string GetOpenVRConfigPath();
+ static uint32_t GetSteamAppId();
+ static bool IsSteamVRMain();
+ static uint32_t InitSteamAppId();
public:
CVRPathRegistry_Public();