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>2020-03-17 04:03:23 +0300
committerJoe Ludwig <joe@valvesoftware.com>2020-03-17 04:03:23 +0300
commit26fa19eb86ab3c589af2bdbc77449d61a8ff799b (patch)
treee58c9d49f5fb751de759143e4243821ce2b5b469
parent39205f6b281a6131d1373d0217c1ab9ed19735ea (diff)
# OpenVR SDK 1.10.30v1.10.30
IVRHeadsetView: * Allows scene applications access the contents of the "VR View" window, including modifying properties of their own instances of that window. See the header file for details. IVROverlayView: * Allows applications to read overlay textures and send mouse events to those overlays. See the header file for details. IVRCompositor: * Added Submit_FrameDiscontinuity flag which can be passed to Submit to identify a discontinuity with the previous frame (e.g. when the player teleports). This prevents SteamVR’s Motion Smoothing from being applied using that pair of frames. * IVRCompositor::Submit – Can now handle DirectX Texture Arrays. Index 0 for the left eye, Index 1 for the right eye IVRRenderModels: * Added VRComponentProperty_IsHighlighted, which is set to true for any render model component that should be highlighted for an input binding. IVROverlay: * The DualAnalog input method is no longer supported. * Added VROverlayFlags_WantsModalBehavior. This flag causes an overlay to get a VREvent_Modal_Cancel event whenever the user clicks off of the overlay. This is ignored for dashboard overlays. * Added flags for keyboard usage. “minimal mode” is now specified with KeyboardFlag_Minimal. * Made modal keyboard behavior optional. To get the behavior from pre-1.10 SDKs, pass KeyboardFlag_Modal. * Added VREvent_LockMousePosition and VREvent_UnlockMousePosition, which are sent to overlays when a user is laser mousing over the overlay and performs the LockMousePosition compositor action. * Removed support for rendermodels attached to overlays. This feature is no longer supported. IVRInput: * Added global action set priority. When this is enabled in settings, overlay applications can override part or all of the input available to scene applications. See the header file comments for more details. * Added GetDominandHand/SetDominantHand. This allows an application to flip left and right hands on bindings. Applications that support this must add “supports_dominant_hand_setting” to true in their action manifest file. * Added GetComponentStateForBinding. This allows applications to get the render model component transform for any component on a render model for a set of input bindings. * Added GetBindingVariant. This allows applications to provide multiple binding files for a controller type and determine which of them the user currently has selected. The value returned here is the “variant” field from the options block in the binding JSON file. [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 5759046]
-rwxr-xr-xbin/linux32/libopenvr_api.sobin321663 -> 321917 bytes
-rwxr-xr-xbin/linux32/libopenvr_api.so.dbgbin2209696 -> 2215172 bytes
-rwxr-xr-xbin/linux64/libopenvr_api.sobin324888 -> 325190 bytes
-rwxr-xr-xbin/linux64/libopenvr_api.so.dbgbin2766861 -> 2777461 bytes
-rw-r--r--bin/win32/openvr_api.dllbin619472 -> 621520 bytes
-rw-r--r--bin/win32/openvr_api.dll.sigbin1450 -> 1450 bytes
-rw-r--r--bin/win32/openvr_api.pdbbin10964992 -> 10964992 bytes
-rw-r--r--bin/win64/openvr_api.dllbin815568 -> 819664 bytes
-rw-r--r--bin/win64/openvr_api.dll.sigbin1450 -> 1450 bytes
-rw-r--r--bin/win64/openvr_api.pdbbin10825728 -> 10842112 bytes
-rw-r--r--headers/openvr.h448
-rw-r--r--headers/openvr_api.cs504
-rw-r--r--headers/openvr_api.json368
-rw-r--r--headers/openvr_capi.h200
-rw-r--r--headers/openvr_driver.h125
-rwxr-xr-xlib/linux32/libopenvr_api.sobin2209696 -> 2215172 bytes
-rwxr-xr-xlib/linux64/libopenvr_api.sobin2766861 -> 2777461 bytes
-rw-r--r--lib/win32/openvr_api.libbin6956 -> 6732 bytes
-rw-r--r--lib/win64/openvr_api.libbin6844 -> 6626 bytes
-rw-r--r--samples/bin/linux32/libopenvr_api.sobin321663 -> 321917 bytes
-rw-r--r--samples/bin/linux64/libopenvr_api.sobin324888 -> 325190 bytes
-rw-r--r--samples/bin/win32/openvr_api.dllbin619472 -> 621520 bytes
-rw-r--r--samples/bin/win64/openvr_api.dllbin815568 -> 819664 bytes
-rw-r--r--src/vrcommon/hmderrors_public.cpp5
-rw-r--r--src/vrcommon/pathtools_public.cpp5
-rw-r--r--src/vrcommon/strtools_public.cpp90
-rw-r--r--src/vrcommon/strtools_public.h8
-rw-r--r--src/vrcommon/vrpathregistry_public.cpp39
-rw-r--r--src/vrcommon/vrpathregistry_public.h2
29 files changed, 1344 insertions, 450 deletions
diff --git a/bin/linux32/libopenvr_api.so b/bin/linux32/libopenvr_api.so
index fb7284c..6d7c2d3 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 40eed0e..3015231 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 1e035ae..32cc89c 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 ca2eded..367173b 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 f5c6e9b..b89d07b 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 df211b6..157be50 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 94cd443..408303e 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 bd76c2a..902b6c7 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 9bb697a..2415c0a 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 9c39aea..ec1a257 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 0a2e008..7f593f3 100644
--- a/headers/openvr.h
+++ b/headers/openvr.h
@@ -15,8 +15,8 @@
namespace vr
{
static const uint32_t k_nSteamVRVersionMajor = 1;
- static const uint32_t k_nSteamVRVersionMinor = 9;
- static const uint32_t k_nSteamVRVersionBuild = 16;
+ static const uint32_t k_nSteamVRVersionMinor = 10;
+ static const uint32_t k_nSteamVRVersionBuild = 30;
} // namespace vr
// vrtypes.h
@@ -206,7 +206,7 @@ enum ETrackedControllerRole
TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand
TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand
TrackedControllerRole_OptOut = 3, // Tracked device is opting out of left/right hand selection
- TrackedControllerRole_Treadmill = 4, // Tracked device is a treadmill
+ TrackedControllerRole_Treadmill = 4, // Tracked device is a treadmill or other locomotion device
TrackedControllerRole_Stylus = 5, // Tracked device is a stylus
TrackedControllerRole_Max = 5
};
@@ -278,6 +278,7 @@ static const PropertyTypeTag_t k_unUint64PropertyTag = 3;
static const PropertyTypeTag_t k_unBoolPropertyTag = 4;
static const PropertyTypeTag_t k_unStringPropertyTag = 5;
static const PropertyTypeTag_t k_unErrorPropertyTag = 6;
+static const PropertyTypeTag_t k_unDoublePropertyTag = 7;
static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20;
static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21;
@@ -450,7 +451,7 @@ enum ETrackedDeviceProperty
Prop_DisplayMinAnalogGain_Float = 2086,
Prop_DisplayMaxAnalogGain_Float = 2087,
- Prop_DashboardLayoutPathName_String = 2090,
+ // Prop_DashboardLayoutPathName_String = 2090, // DELETED
Prop_DashboardScale_Float = 2091,
Prop_IpdUIRangeMinMeters_Float = 2100,
Prop_IpdUIRangeMaxMeters_Float = 2101,
@@ -629,6 +630,10 @@ enum EVRSubmitFlags
// Set to indicate that pTexture is a pointer to a VRTextureWithDepth_t.
// This flag can be combined with Submit_TextureWithPose to pass a VRTextureWithPoseAndDepth_t.
Submit_TextureWithDepth = 0x10,
+
+ // Set to indicate a discontinuity between this and the last frame.
+ // This will prevent motion smoothing from attempting to extrapolate using the pair.
+ Submit_FrameDiscontinuty = 0x20,
};
/** Data required for passing Vulkan textures to IVRCompositor::Submit.
@@ -693,14 +698,14 @@ enum EVREventType
VREvent_ButtonTouch = 202, // data is controller
VREvent_ButtonUntouch = 203, // data is controller
- VREvent_DualAnalog_Press = 250, // data is dualAnalog
- VREvent_DualAnalog_Unpress = 251, // data is dualAnalog
- VREvent_DualAnalog_Touch = 252, // data is dualAnalog
- VREvent_DualAnalog_Untouch = 253, // data is dualAnalog
- VREvent_DualAnalog_Move = 254, // data is dualAnalog
- VREvent_DualAnalog_ModeSwitch1 = 255, // data is dualAnalog
- VREvent_DualAnalog_ModeSwitch2 = 256, // data is dualAnalog
- VREvent_DualAnalog_Cancel = 257, // data is dualAnalog
+ // VREvent_DualAnalog_Press = 250, // No longer sent
+ // VREvent_DualAnalog_Unpress = 251, // No longer sent
+ // VREvent_DualAnalog_Touch = 252, // No longer sent
+ // VREvent_DualAnalog_Untouch = 253, // No longer sent
+ // 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_MouseMove = 300, // data is mouse
VREvent_MouseButtonDown = 301, // data is mouse
@@ -712,6 +717,8 @@ enum EVREventType
VREvent_OverlayFocusChanged = 307, // data is overlay, global event
VREvent_ReloadOverlays = 308,
VREvent_ScrollSmooth = 309, // data is scroll
+ VREvent_LockMousePosition = 310,
+ VREvent_UnlockMousePosition = 311,
VREvent_InputFocusCaptured = 400, // data is process DEPRECATED
VREvent_InputFocusReleased = 401, // data is process DEPRECATED
@@ -1092,19 +1099,6 @@ struct VREvent_Property_t
ETrackedDeviceProperty prop;
};
-enum EDualAnalogWhich
-{
- k_EDualAnalog_Left = 0,
- k_EDualAnalog_Right = 1,
-};
-
-struct VREvent_DualAnalog_t
-{
- float x, y; // coordinates are -1..1 analog values
- float transformedX, transformedY; // transformed by the center and radius numbers provided by the overlay
- EDualAnalogWhich which;
-};
-
struct VREvent_HapticVibration_t
{
uint64_t containerHandle; // property container handle of the device with the haptic component
@@ -1159,6 +1153,7 @@ enum EShowUIType
ShowUI_Settings = 4,
ShowUI_DebugCommands = 5,
ShowUI_FullControllerBinding = 6,
+ ShowUI_ManageDrivers = 7,
};
struct VREvent_ShowUI_t
@@ -1207,7 +1202,6 @@ typedef union
VREvent_EditingCameraSurface_t cameraSurface;
VREvent_MessageOverlay_t messageOverlay;
VREvent_Property_t property;
- VREvent_DualAnalog_t dualAnalog;
VREvent_HapticVibration_t hapticVibration;
VREvent_WebConsole_t webConsole;
VREvent_InputBindingLoad_t inputBinding;
@@ -1241,6 +1235,28 @@ struct VREvent_t
#pragma pack( pop )
#endif
+typedef uint32_t VRComponentProperties;
+
+enum EVRComponentProperty
+{
+ VRComponentProperty_IsStatic = (1 << 0),
+ VRComponentProperty_IsVisible = (1 << 1),
+ VRComponentProperty_IsTouched = (1 << 2),
+ VRComponentProperty_IsPressed = (1 << 3),
+ VRComponentProperty_IsScrolled = (1 << 4),
+ VRComponentProperty_IsHighlighted = (1 << 5),
+};
+
+
+/** Describes state information about a render-model component, including transforms and other dynamic properties */
+struct RenderModel_ComponentState_t
+{
+ HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model
+ HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface )
+ VRComponentProperties uProperties;
+};
+
+
enum EVRInputError
{
VRInputError_None = 0,
@@ -1261,6 +1277,9 @@ enum EVRInputError
VRInputError_MismatchedActionManifest = 15,
VRInputError_MissingSkeletonData = 16,
VRInputError_InvalidBoneIndex = 17,
+ VRInputError_InvalidPriority = 18,
+ VRInputError_PermissionDenied = 19,
+ VRInputError_InvalidRenderModel = 20,
};
enum EVRSpatialAnchorError
@@ -1377,17 +1396,6 @@ enum ECollisionBoundsStyle
COLLISION_BOUNDS_STYLE_COUNT
};
-/** Allows the application to customize how the overlay appears in the compositor */
-struct Compositor_OverlaySettings
-{
- uint32_t size; // sizeof(Compositor_OverlaySettings)
- bool curved, antialias;
- float scale, distance, alpha;
- float uOffset, vOffset, uScale, vScale;
- float gridDivs, gridWidth, gridScale;
- HmdMatrix44_t transform;
-};
-
/** used to refer to a single VR overlay */
typedef uint64_t VROverlayHandle_t;
@@ -1486,11 +1494,11 @@ enum EVRSkeletalTrackingLevel
// 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,
+ VRSkeletalTracking_Partial = 1,
// 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,
+ VRSkeletalTracking_Full = 2,
VRSkeletalTrackingLevel_Count,
VRSkeletalTrackingLevel_Max = VRSkeletalTrackingLevel_Count - 1
@@ -1674,7 +1682,7 @@ enum EVRInitError
VRInitError_Compositor_CreateFallbackSyncTexture = 477,
VRInitError_Compositor_ShareFallbackSyncTexture = 478,
VRInitError_Compositor_CreateOverlayIndexBuffer = 479,
- VRInitError_Compositor_CreateOverlayVertextBuffer = 480,
+ VRInitError_Compositor_CreateOverlayVertexBuffer = 480,
VRInitError_Compositor_CreateTextVertexBuffer = 481,
VRInitError_Compositor_CreateTextIndexBuffer = 482,
VRInitError_Compositor_CreateMirrorTextures = 483,
@@ -1682,7 +1690,10 @@ enum EVRInitError
VRInitError_Compositor_CreateMirrorOverlay = 485,
VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486,
VRInitError_Compositor_DisplayModeNotSupported = 487,
-
+ VRInitError_Compositor_CreateOverlayInvalidCall = 488,
+ VRInitError_Compositor_CreateOverlayAlreadyInitialized = 489,
+ VRInitError_Compositor_FailedToCreateMailbox = 490,
+
VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
VRInitError_VendorSpecific_WindowsNotInDevMode = 1001,
@@ -1862,6 +1873,13 @@ struct Compositor_FrameTiming
uint32_t m_nNumVSyncsToFirstView;
};
+/** Provides compositor benchmark results to the app */
+struct Compositor_BenchmarkResults
+{
+ float m_flMegaPixelsPerSecond; // Measurement of GPU MP/s performed by compositor benchmark
+ float m_flHmdRecommendedMegaPixelsPerSecond; // Recommended default MP/s given the HMD resolution, refresh, and panel mask.
+};
+
/** Frame timing data provided by direct mode drivers. */
struct DriverDirectMode_FrameTiming
{
@@ -1872,6 +1890,12 @@ struct DriverDirectMode_FrameTiming
uint32_t m_nReprojectionFlags;
};
+/** These flags will be set on DriverDirectMode_FrameTiming::m_nReprojectionFlags when IVRDriverDirectModeComponent::GetFrameTiming is called for drivers to optionally respond to. */
+const uint32_t VRCompositor_ReprojectionMotion_Enabled = 0x100; // Motion Smoothing is enabled in the UI for the currently running application
+const uint32_t VRCompositor_ReprojectionMotion_ForcedOn = 0x200; // Motion Smoothing is forced on in the UI for the currently running application
+const uint32_t VRCompositor_ReprojectionMotion_AppThrottled = 0x400; // Application is requesting throttling via ForceInterleavedReprojectionOn
+
+
enum EVSync
{
VSync_None,
@@ -2672,6 +2696,8 @@ namespace vr
static const char * const k_pch_SteamVR_CustomIconStyle_String = "customIconStyle";
static const char * const k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle";
static const char * const k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate";
+ static const char * const k_pch_SteamVR_AllowGlobalActionSetPriority = "globalActionSetPriority";
+ static const char * const k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2";
//-----------------------------------------------------------------------------
// direct mode keys
@@ -2805,7 +2831,6 @@ namespace vr
static const char * const k_pch_Dashboard_Section = "dashboard";
static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
- static const char * const k_pch_Dashboard_UseWebKeyboard = "useWebKeyboard";
static const char * const k_pch_Dashboard_UseWebSettings = "useWebSettings";
static const char * const k_pch_Dashboard_Position = "position";
static const char * const k_pch_Dashboard_DesktopScale = "desktopScale";
@@ -2818,6 +2843,7 @@ namespace vr
//-----------------------------------------------------------------------------
// driver keys - These could be checked in any driver_<name> section
static const char * const k_pch_Driver_Enable_Bool = "enable";
+ static const char * const k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode";
static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority";
//-----------------------------------------------------------------------------
@@ -2838,9 +2864,12 @@ namespace vr
//-----------------------------------------------------------------------------
// per-app keys - the section name for these is the app key itself. Some of these are prefixed by the controller type
static const char* const k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL";
+ static const char* const k_pch_App_BindingLegacyAPISuffix_String = "_legacy";
+ static const char* const k_pch_App_BindingSteamVRInputAPISuffix_String = "_steamvrinput";
static const char* const k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL";
static const char* const k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
static const char* const k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
+ static const char* const k_pch_App_DominantHand_Int32 = "DominantHand";
//-----------------------------------------------------------------------------
// configuration for trackers
@@ -3107,28 +3136,48 @@ struct Compositor_CumulativeStats
struct Compositor_StageRenderSettings
{
/** Primary color is applied as a tint to (i.e. multiplied with) the model's texture */
- HmdColor_t m_PrimaryColor = { 1, 1, 1, 1 };
- HmdColor_t m_SecondaryColor = { 1, 1, 1, 1 };
+ HmdColor_t m_PrimaryColor;
+ HmdColor_t m_SecondaryColor;
/** Vignette radius is in meters and is used to fade to the specified secondary solid color over
* that 3D distance from the origin of the playspace. */
- float m_flVignetteInnerRadius = 0.0f;
- float m_flVignetteOuterRadius = 0.0f;
+ float m_flVignetteInnerRadius;
+ float m_flVignetteOuterRadius;
/** Fades to the secondary color based on view incidence. This variable controls the linearity
* of the effect. It is mutually exclusive with vignette. Additionally, it treats the mesh as faceted. */
- float m_flFresnelStrength = 0.0f;
+ float m_flFresnelStrength;
/** Controls backface culling. */
- bool m_bBackfaceCulling = false;
+ bool m_bBackfaceCulling;
/** Converts the render model's texture to luma and applies to rgb equally. This is useful to
* combat compression artifacts that can occur on desaturated source material. */
- bool m_bGreyscale = false;
+ bool m_bGreyscale;
/** Renders mesh as a wireframe. */
- bool m_bWireframe = false;
-};
+ bool m_bWireframe;
+};
+
+static inline Compositor_StageRenderSettings DefaultStageRenderSettings()
+{
+ Compositor_StageRenderSettings settings;
+ settings.m_PrimaryColor.r = 1.0f;
+ settings.m_PrimaryColor.g = 1.0f;
+ settings.m_PrimaryColor.b = 1.0f;
+ settings.m_PrimaryColor.a = 1.0f;
+ settings.m_SecondaryColor.r = 1.0f;
+ settings.m_SecondaryColor.g = 1.0f;
+ settings.m_SecondaryColor.b = 1.0f;
+ settings.m_SecondaryColor.a = 1.0f;
+ settings.m_flVignetteInnerRadius = 0.0f;
+ settings.m_flVignetteOuterRadius = 0.0f;
+ settings.m_flFresnelStrength = 0.0f;
+ settings.m_bBackfaceCulling = false;
+ settings.m_bGreyscale = false;
+ settings.m_bWireframe = false;
+ return settings;
+}
#pragma pack( pop )
@@ -3345,14 +3394,81 @@ public:
/** Resets the stage to its default user specified setting. */
virtual void ClearStageOverride() = 0;
+
+ /** Returns true if pBenchmarkResults is filled it. Sets pBenchmarkResults with the result of the compositor benchmark.
+ * nSizeOfBenchmarkResults should be set to sizeof(Compositor_BenchmarkResults) */
+ virtual bool GetCompositorBenchmarkResults( Compositor_BenchmarkResults *pBenchmarkResults, uint32_t nSizeOfBenchmarkResults ) = 0;
+
+ /** Returns the frame id associated with the poses last returned by WaitGetPoses. Deltas between IDs correspond to number of headset vsync intervals. */
+ virtual EVRCompositorError GetLastPosePredictionIDs( uint32_t *pRenderPosePredictionID, uint32_t *pGamePosePredictionID ) = 0;
+
+ /** Get the most up-to-date predicted (or recorded - up to 100ms old) set of poses for a given frame id. */
+ virtual EVRCompositorError GetPosesForFrame( uint32_t unPosePredictionID, VR_ARRAY_COUNT( unPoseArrayCount ) TrackedDevicePose_t* pPoseArray, uint32_t unPoseArrayCount ) = 0;
};
-static const char * const IVRCompositor_Version = "IVRCompositor_024";
+static const char * const IVRCompositor_Version = "IVRCompositor_026";
} // namespace vr
+// ivrheadsetview.h
+namespace vr
+{
+ enum HeadsetViewMode_t
+ {
+ HeadsetViewMode_Left = 0,
+ HeadsetViewMode_Right,
+ HeadsetViewMode_Both
+ };
+
+ class IVRHeadsetView
+ {
+ public:
+ /** Sets the resolution in pixels to render the headset view. These values are clamped to k_unHeadsetViewMaxWidth
+ * and k_unHeadsetViewMaxHeight respectively. For cropped views, the rendered output will be fit to aspect ratio
+ * defined by the the specified dimensions. For uncropped views, the caller should use GetHeadsetViewAspectRation
+ * to adjust the requested render size to avoid squashing or stretching, and then apply letterboxing to compensate
+ * when displaying the results. */
+ virtual void SetHeadsetViewSize( uint32_t nWidth, uint32_t nHeight ) = 0;
+
+ /** Gets the current resolution used to render the headset view. */
+ virtual void GetHeadsetViewSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
+
+ /** Set the mode used to render the headset view. */
+ virtual void SetHeadsetViewMode( HeadsetViewMode_t eHeadsetViewMode ) = 0;
+
+ /** Get the current mode used to render the headset view. */
+ virtual HeadsetViewMode_t GetHeadsetViewMode() = 0;
+
+ /** Set whether or not the headset view should be rendered cropped to hide the hidden area mesh or not. */
+ virtual void SetHeadsetViewCropped( bool bCropped ) = 0;
+
+ /** Get the current cropping status of the headset view. */
+ virtual bool GetHeadsetViewCropped() = 0;
+
+ /** Get the aspect ratio (width:height) of the uncropped headset view (accounting for the current set mode). */
+ virtual float GetHeadsetViewAspectRatio() = 0;
+
+ /** Set the range [0..1] that the headset view blends across the stereo overlapped area in cropped both mode. */
+ virtual void SetHeadsetViewBlendRange( float flStartPct, float flEndPct ) = 0;
+
+ /** Get the current range [0..1] that the headset view blends across the stereo overlapped area in cropped both mode. */
+ virtual void GetHeadsetViewBlendRange( float *pStartPct, float *pEndPct ) = 0;
+ };
+
+ static const uint32_t k_unHeadsetViewMaxWidth = 3840;
+ static const uint32_t k_unHeadsetViewMaxHeight = 2160;
+ static const char * const k_pchHeadsetViewOverlayKey = "system.HeadsetView";
+
+ static const char * const IVRHeadsetView_Version = "IVRHeadsetView_001";
+
+ /** Returns the current IVRHeadsetView pointer or NULL the interface could not be found. */
+ VR_INTERFACE vr::IVRHeadsetView *VR_CALLTYPE VRHeadsetView();
+
+} // namespace vr
+
+
// ivrnotifications.h
namespace vr
{
@@ -3463,7 +3579,7 @@ namespace vr
{
VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay
VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically
- VROverlayInputMethod_DualAnalog = 2, // Analog inputs from tracked controllers are turned into DualAnalog events
+ // VROverlayInputMethod_DualAnalog = 2, // No longer supported
};
/** Allows the caller to figure out which overlay transform getter to call. */
@@ -3477,6 +3593,7 @@ namespace vr
VROverlayTransform_Cursor = 4,
VROverlayTransform_DashboardTab = 5,
VROverlayTransform_DashboardThumb = 6,
+ VROverlayTransform_Mountable = 7,
};
/** Overlay control settings */
@@ -3528,6 +3645,13 @@ namespace vr
// If this is set, the laser mouse splat will not be drawn over this overlay. The overlay will
// be responsible for drawing its own "cursor".
VROverlayFlags_HideLaserIntersection = 1 << 19,
+
+ // If this is set, clicking away from the overlay will cause it to receive a VREvent_Modal_Cancel event.
+ // This is ignored for dashboard overlays.
+ VROverlayFlags_WantsModalBehavior = 1 << 20,
+
+ // If this is set, alpha composition assumes the texture is pre-multiplied
+ VROverlayFlags_IsPremultiplied = 1 << 21,
};
enum VRMessageOverlayResponse
@@ -3605,6 +3729,13 @@ namespace vr
VROverlayIntersectionMaskPrimitive_Data_t m_Primitive;
};
+ enum EKeyboardFlags
+ {
+ KeyboardFlag_Minimal = 1 << 0, // makes the keyboard send key events immediately instead of accumulating a buffer
+ KeyboardFlag_Modal = 2 << 0, // makes the keyboard take all focus and dismiss when clicking off the panel
+ };
+
+
class IVROverlay
{
public:
@@ -3720,13 +3851,6 @@ namespace vr
/** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */
virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0;
- /** Gets render model to draw behind this overlay */
- virtual uint32_t GetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, HmdColor_t *pColor, vr::EVROverlayError *pError ) = 0;
-
- /** Sets render model to draw behind this overlay and the vertex color to use, pass null for pColor to match the overlays vertex color.
- The model is scaled by the same amount as the overlay, with a default of 1m. */
- virtual vr::EVROverlayError SetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, const char *pchRenderModel, const HmdColor_t *pColor ) = 0;
-
/** Returns the transform type of this overlay. */
virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0;
@@ -3804,12 +3928,6 @@ namespace vr
* by the virtual mouse pointer */
virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0;
- /** Sets the analog input to Dual Analog coordinate scale for the specified overlay. */
- virtual EVROverlayError SetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, const HmdVector2_t *pvCenter, float fRadius ) = 0;
-
- /** Gets the analog input to Dual Analog coordinate scale for the specified overlay. */
- virtual EVROverlayError GetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t *pvCenter, float *pfRadius ) = 0;
-
/** Sets a list of primitives to be used for controller ray intersection
* typically the size of the underlying UI in pixels (not in world space). */
virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0;
@@ -3898,10 +4016,16 @@ namespace vr
// Keyboard methods
// ---------------------------------------------
- /** Show the virtual keyboard to accept input **/
- virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0;
+ /** 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,
+ const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, uint64_t uUserValue ) = 0;
- virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, 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
+ * 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,
+ const char *pchExistingText, uint64_t uUserValue ) = 0;
/** Get the text that was entered into the text input **/
virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0;
@@ -3926,10 +4050,87 @@ namespace vr
virtual void CloseMessageOverlay() = 0;
};
- static const char * const IVROverlay_Version = "IVROverlay_022";
+ static const char * const IVROverlay_Version = "IVROverlay_024";
} // namespace vr
+// ivroverlayview.h
+namespace vr
+{
+ struct VROverlayView_t
+ {
+ VROverlayHandle_t overlayHandle;
+ Texture_t texture;
+ VRTextureBounds_t textureBounds;
+ };
+
+ enum EDeviceType
+ {
+ DeviceType_Invalid = -1, // Invalid handle
+ DeviceType_DirectX11 = 0, // Handle is an ID3D11Device
+ DeviceType_Vulkan = 1, // Handle is a pointer to a VRVulkanDevice_t structure
+ };
+
+ struct VRVulkanDevice_t
+ {
+ VkInstance_T *m_pInstance;
+ VkDevice_T *m_pDevice;
+ VkPhysicalDevice_T *m_pPhysicalDevice;
+ VkQueue_T *m_pQueue;
+ uint32_t m_uQueueFamilyIndex;
+ };
+
+ struct VRNativeDevice_t
+ {
+ void *handle; // See EDeviceType definition above
+ EDeviceType eType;
+ };
+
+ class IVROverlayView
+ {
+ public:
+ /** Acquire an OverlayView_t from an overlay handle
+ *
+ * The overlay view can be used to sample the contents directly by a native API. The
+ * contents of the OverlayView_t will remain unchanged through the lifetime of the
+ * OverlayView_t.
+ *
+ * The caller acquires read privileges over the OverlayView_t, but should not
+ * write to it.
+ *
+ * AcquireOverlayView() may be called on the same ulOverlayHandle multiple times to
+ * refresh the image contents. In this case the caller is strongly encouraged to re-use
+ * the same pOverlayView for all re-acquisition calls.
+ *
+ * If the producer has not yet queued an image, AcquireOverlayView will return success,
+ * and the Texture_t will have the expected ETextureType. However, the Texture_t->handle
+ * will be nullptr. Once the producer generates the first overlay frame, Texture_t->handle
+ * will become a valid handle.
+ */
+ virtual EVROverlayError AcquireOverlayView(VROverlayHandle_t ulOverlayHandle, VRNativeDevice_t *pNativeDevice, VROverlayView_t *pOverlayView, uint32_t unOverlayViewSize ) = 0;
+
+ /** Release an acquired OverlayView_t
+ *
+ * Denotes that pOverlayView will no longer require access to the resources it acquired in
+ * all previous calls to AcquireOverlayView().
+ *
+ * All OverlayView_t*'s provided to AcquireOverlayView() as pOverlayViews must be
+ * passed into ReleaseOverlayView() in order for the underlying GPU resources to be freed.
+ */
+ virtual EVROverlayError ReleaseOverlayView(VROverlayView_t *pOverlayView) = 0;
+
+ /** Posts an overlay event */
+ virtual void PostOverlayEvent(VROverlayHandle_t ulOverlayHandle, const VREvent_t *pvrEvent) = 0;
+
+ /** Determines whether this process is permitted to view an overlay's content. */
+ virtual bool IsViewingPermitted( VROverlayHandle_t ulOverlayHandle ) = 0;
+
+ };
+
+ static const char * const IVROverlayView_Version = "IVROverlayView_003";
+
+}
+
// ivrrendermodels.h
namespace vr
{
@@ -3961,25 +4162,6 @@ enum EVRRenderModelError
VRRenderModelError_InvalidTexture = 400,
};
-typedef uint32_t VRComponentProperties;
-
-enum EVRComponentProperty
-{
- VRComponentProperty_IsStatic = (1 << 0),
- VRComponentProperty_IsVisible = (1 << 1),
- VRComponentProperty_IsTouched = (1 << 2),
- VRComponentProperty_IsPressed = (1 << 3),
- VRComponentProperty_IsScrolled = (1 << 4),
-};
-
-/** Describes state information about a render-model component, including transforms and other dynamic properties */
-struct RenderModel_ComponentState_t
-{
- HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model
- HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface )
- VRComponentProperties uProperties;
-};
-
/** A single vertex in a render model */
struct RenderModel_Vertex_t
{
@@ -4384,10 +4566,17 @@ static const char * const IVRDriverManager_Version = "IVRDriverManager_001";
// ivrinput.h
namespace vr
{
- static const uint32_t k_unMaxActionNameLength = 64;
+ // Maximum number of characters in an action name, including the trailing null
+ 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;
- static const uint32_t k_unMaxActionOriginCount = 16;
- static const uint32_t k_unMaxBoneNameLength = 32;
+
+ // Maximum number of origins for an action
+ 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;
enum EVRSkeletalTransformSpace
{
@@ -4517,8 +4706,24 @@ namespace vr
char rchInputPathName[128];
char rchModeName[128];
char rchSlotName[128];
+ char rchInputSourceType[ 32 ];
};
+ // * Experimental global action set priority *
+ // 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
+ // SteamVR settings.
+ //
+ // To use this system, set the nPriority field of an action set to any number in
+ // this range.
+ static const int32_t k_nActionSetOverlayGlobalPriorityMin = 0x01000000;
+ static const int32_t k_nActionSetOverlayGlobalPriorityMax = 0x01FFFFFF;
+
+ static const int32_t k_nActionSetPriorityReservedMin = 0x02000000;
+
struct VRActiveActionSet_t
{
/** This is the handle of the action set to activate for this frame. */
@@ -4538,7 +4743,14 @@ 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
+ * 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.
+ *
+ * No action set priority may value may be larger than k_nActionSetPriorityReservedMin
+ */
int32_t nPriority;
};
@@ -4605,6 +4817,14 @@ namespace vr
/** Reads the state of a skeletal action given its handle. */
virtual EVRInputError GetSkeletalActionData( VRActionHandle_t action, InputSkeletalActionData_t *pActionData, uint32_t unActionDataSize ) = 0;
+ /** Returns the current dominant hand for the user for this application. This function will only return success for applications
+ * which include "supports_dominant_hand_setting": true in their action manifests. The dominant hand will only change after
+ * a call to UpdateActionState, and the action data returned after that point will use the new dominant hand. */
+ virtual EVRInputError GetDominantHand( ETrackedControllerRole *peDominantHand ) = 0;
+
+ /** Sets the dominant hand for the user for this application. */
+ virtual EVRInputError SetDominantHand( ETrackedControllerRole eDominantHand ) = 0;
+
// --------------- Static Skeletal Data ------------------- //
/** Reads the number of bones in skeleton associated with the given action */
@@ -4664,6 +4884,12 @@ namespace vr
/** Shows the current binding all the actions in the specified action sets */
virtual EVRInputError ShowBindingsForActionSet( VR_ARRAY_COUNT( unSetCount ) VRActiveActionSet_t *pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight ) = 0;
+ /** Use this to query what action on the component returned by GetOriginTrackedDeviceInfo would trigger this binding. */
+ virtual EVRInputError GetComponentStateForBinding( const char *pchRenderModelName, const char *pchComponentName,
+ const InputBindingInfo_t *pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount,
+ vr::RenderModel_ComponentState_t *pComponentState ) = 0;
+
+
// --------------- Legacy Input ------------------- //
virtual bool IsUsingLegacyInput() = 0;
@@ -4673,9 +4899,15 @@ namespace vr
/** Opens the binding user interface. If no app key is provided it will use the key from the calling process.
* 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
+ * will return an empty string */
+ virtual EVRInputError GetBindingVariant( vr::VRInputValueHandle_t ulDevicePath,
+ VR_OUT_STRING() char *pchVariantArray, uint32_t unVariantArraySize ) = 0;
+
};
- static const char * const IVRInput_Version = "IVRInput_007";
+ static const char * const IVRInput_Version = "IVRInput_010";
} // namespace vr
@@ -4975,6 +5207,28 @@ namespace vr
return m_pVROverlay;
}
+ IVROverlayView *VROverlayView()
+ {
+ CheckClear();
+ if ( m_pVROverlayView == nullptr )
+ {
+ EVRInitError eError;
+ m_pVROverlayView = ( IVROverlayView * ) VR_GetGenericInterface( IVROverlayView_Version, &eError );
+ }
+ return m_pVROverlayView;
+ }
+
+ IVRHeadsetView *VRHeadsetView()
+ {
+ CheckClear();
+ if ( m_pVRHeadsetView == nullptr )
+ {
+ EVRInitError eError;
+ m_pVRHeadsetView = ( IVRHeadsetView * ) VR_GetGenericInterface( IVRHeadsetView_Version, &eError );
+ }
+ return m_pVRHeadsetView;
+ }
+
IVRResources *VRResources()
{
CheckClear();
@@ -5122,7 +5376,9 @@ namespace vr
IVRChaperone *m_pVRChaperone;
IVRChaperoneSetup *m_pVRChaperoneSetup;
IVRCompositor *m_pVRCompositor;
+ IVRHeadsetView *m_pVRHeadsetView;
IVROverlay *m_pVROverlay;
+ IVROverlayView *m_pVROverlayView;
IVRResources *m_pVRResources;
IVRRenderModels *m_pVRRenderModels;
IVRExtendedDisplay *m_pVRExtendedDisplay;
@@ -5149,6 +5405,8 @@ namespace vr
inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); }
inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); }
inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); }
+ inline IVROverlayView *VR_CALLTYPE VROverlayView() { return OpenVRInternal_ModuleContext().VROverlayView(); }
+ inline IVRHeadsetView *VR_CALLTYPE VRHeadsetView() { return OpenVRInternal_ModuleContext().VRHeadsetView(); }
inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); }
inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); }
inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); }
@@ -5170,6 +5428,8 @@ namespace vr
m_pVRChaperoneSetup = nullptr;
m_pVRCompositor = nullptr;
m_pVROverlay = nullptr;
+ m_pVROverlayView = nullptr;
+ m_pVRHeadsetView = nullptr;
m_pVRRenderModels = nullptr;
m_pVRExtendedDisplay = nullptr;
m_pVRSettings = nullptr;
diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs
index 2f30de3..5abb193 100644
--- a/headers/openvr_api.cs
+++ b/headers/openvr_api.cs
@@ -899,6 +899,21 @@ public struct IVRCompositor
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ClearStageOverride ClearStageOverride;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate bool _GetCompositorBenchmarkResults(ref Compositor_BenchmarkResults pBenchmarkResults, uint nSizeOfBenchmarkResults);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetCompositorBenchmarkResults GetCompositorBenchmarkResults;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRCompositorError _GetLastPosePredictionIDs(ref uint pRenderPosePredictionID, ref uint pGamePosePredictionID);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetLastPosePredictionIDs GetLastPosePredictionIDs;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRCompositorError _GetPosesForFrame(uint unPosePredictionID, [In, Out] TrackedDevicePose_t[] pPoseArray, uint unPoseArrayCount);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetPosesForFrame GetPosesForFrame;
+
}
[StructLayout(LayoutKind.Sequential)]
@@ -1050,16 +1065,6 @@ public struct IVROverlay
internal _GetOverlayTextureBounds GetOverlayTextureBounds;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate uint _GetOverlayRenderModel(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref HmdColor_t pColor, ref EVROverlayError pError);
- [MarshalAs(UnmanagedType.FunctionPtr)]
- internal _GetOverlayRenderModel GetOverlayRenderModel;
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVROverlayError _SetOverlayRenderModel(ulong ulOverlayHandle, string pchRenderModel, ref HmdColor_t pColor);
- [MarshalAs(UnmanagedType.FunctionPtr)]
- internal _SetOverlayRenderModel SetOverlayRenderModel;
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTransformType(ulong ulOverlayHandle, ref VROverlayTransformType peTransformType);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTransformType GetOverlayTransformType;
@@ -1170,16 +1175,6 @@ public struct IVROverlay
internal _IsHoverTargetOverlay IsHoverTargetOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVROverlayError _SetOverlayDualAnalogTransform(ulong ulOverlay, EDualAnalogWhich eWhich, ref HmdVector2_t pvCenter, float fRadius);
- [MarshalAs(UnmanagedType.FunctionPtr)]
- internal _SetOverlayDualAnalogTransform SetOverlayDualAnalogTransform;
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVROverlayError _GetOverlayDualAnalogTransform(ulong ulOverlay, EDualAnalogWhich eWhich, ref HmdVector2_t pvCenter, ref float pfRadius);
- [MarshalAs(UnmanagedType.FunctionPtr)]
- internal _GetOverlayDualAnalogTransform GetOverlayDualAnalogTransform;
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayIntersectionMask(ulong ulOverlayHandle, ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, uint unNumMaskPrimitives, uint unPrimitiveSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayIntersectionMask SetOverlayIntersectionMask;
@@ -1275,12 +1270,12 @@ public struct IVROverlay
internal _GetPrimaryDashboardDevice GetPrimaryDashboardDevice;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVROverlayError _ShowKeyboard(int eInputMode, int eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText, bool bUseMinimalMode, ulong uUserValue);
+ internal delegate EVROverlayError _ShowKeyboard(int eInputMode, int eLineInputMode, uint unFlags, string pchDescription, uint unCharMax, string pchExistingText, ulong uUserValue);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowKeyboard ShowKeyboard;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVROverlayError _ShowKeyboardForOverlay(ulong ulOverlayHandle, int eInputMode, int eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText, bool bUseMinimalMode, ulong uUserValue);
+ internal delegate EVROverlayError _ShowKeyboardForOverlay(ulong ulOverlayHandle, int eInputMode, int eLineInputMode, uint unFlags, string pchDescription, uint unCharMax, string pchExistingText, ulong uUserValue);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowKeyboardForOverlay ShowKeyboardForOverlay;
@@ -1317,6 +1312,81 @@ public struct IVROverlay
}
[StructLayout(LayoutKind.Sequential)]
+public struct IVROverlayView
+{
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _AcquireOverlayView(ulong ulOverlayHandle, ref VRNativeDevice_t pNativeDevice, ref VROverlayView_t pOverlayView, uint unOverlayViewSize);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _AcquireOverlayView AcquireOverlayView;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _ReleaseOverlayView(ref VROverlayView_t pOverlayView);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _ReleaseOverlayView ReleaseOverlayView;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate void _PostOverlayEvent(ulong ulOverlayHandle, ref VREvent_t pvrEvent);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _PostOverlayEvent PostOverlayEvent;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate bool _IsViewingPermitted(ulong ulOverlayHandle);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _IsViewingPermitted IsViewingPermitted;
+
+}
+
+[StructLayout(LayoutKind.Sequential)]
+public struct IVRHeadsetView
+{
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate void _SetHeadsetViewSize(uint nWidth, uint nHeight);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetHeadsetViewSize SetHeadsetViewSize;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate void _GetHeadsetViewSize(ref uint pnWidth, ref uint pnHeight);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetHeadsetViewSize GetHeadsetViewSize;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate void _SetHeadsetViewMode(uint eHeadsetViewMode);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetHeadsetViewMode SetHeadsetViewMode;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate uint _GetHeadsetViewMode();
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetHeadsetViewMode GetHeadsetViewMode;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate void _SetHeadsetViewCropped(bool bCropped);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetHeadsetViewCropped SetHeadsetViewCropped;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate bool _GetHeadsetViewCropped();
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetHeadsetViewCropped GetHeadsetViewCropped;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate float _GetHeadsetViewAspectRatio();
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetHeadsetViewAspectRatio GetHeadsetViewAspectRatio;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate void _SetHeadsetViewBlendRange(float flStartPct, float flEndPct);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetHeadsetViewBlendRange SetHeadsetViewBlendRange;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate void _GetHeadsetViewBlendRange(ref float pStartPct, ref float pEndPct);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetHeadsetViewBlendRange GetHeadsetViewBlendRange;
+
+}
+
+[StructLayout(LayoutKind.Sequential)]
public struct IVRRenderModels
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
@@ -1625,6 +1695,16 @@ public struct IVRInput
internal _GetSkeletalActionData GetSkeletalActionData;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRInputError _GetDominantHand(ref ETrackedControllerRole peDominantHand);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetDominantHand GetDominantHand;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRInputError _SetDominantHand(ETrackedControllerRole eDominantHand);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetDominantHand SetDominantHand;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetBoneCount(ulong action, ref uint pBoneCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetBoneCount GetBoneCount;
@@ -1705,6 +1785,11 @@ public struct IVRInput
internal _ShowBindingsForActionSet ShowBindingsForActionSet;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRInputError _GetComponentStateForBinding(string pchRenderModelName, string pchComponentName, ref InputBindingInfo_t pOriginInfo, uint unBindingInfoSize, uint unBindingInfoCount, ref RenderModel_ComponentState_t pComponentState);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetComponentStateForBinding GetComponentStateForBinding;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsUsingLegacyInput();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsUsingLegacyInput IsUsingLegacyInput;
@@ -1714,6 +1799,11 @@ public struct IVRInput
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _OpenBindingUI OpenBindingUI;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRInputError _GetBindingVariant(ulong ulDevicePath, System.Text.StringBuilder pchVariantArray, uint unVariantArraySize);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetBindingVariant GetBindingVariant;
+
}
[StructLayout(LayoutKind.Sequential)]
@@ -2789,6 +2879,23 @@ public class CVRCompositor
{
FnTable.ClearStageOverride();
}
+ public bool GetCompositorBenchmarkResults(ref Compositor_BenchmarkResults pBenchmarkResults,uint nSizeOfBenchmarkResults)
+ {
+ bool result = FnTable.GetCompositorBenchmarkResults(ref pBenchmarkResults,nSizeOfBenchmarkResults);
+ return result;
+ }
+ public EVRCompositorError GetLastPosePredictionIDs(ref uint pRenderPosePredictionID,ref uint pGamePosePredictionID)
+ {
+ pRenderPosePredictionID = 0;
+ pGamePosePredictionID = 0;
+ EVRCompositorError result = FnTable.GetLastPosePredictionIDs(ref pRenderPosePredictionID,ref pGamePosePredictionID);
+ return result;
+ }
+ public EVRCompositorError GetPosesForFrame(uint unPosePredictionID,TrackedDevicePose_t [] pPoseArray)
+ {
+ EVRCompositorError result = FnTable.GetPosesForFrame(unPosePredictionID,pPoseArray,(uint) pPoseArray.Length);
+ return result;
+ }
}
@@ -2958,16 +3065,6 @@ public class CVROverlay
EVROverlayError result = FnTable.GetOverlayTextureBounds(ulOverlayHandle,ref pOverlayTextureBounds);
return result;
}
- public uint GetOverlayRenderModel(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref HmdColor_t pColor,ref EVROverlayError pError)
- {
- uint result = FnTable.GetOverlayRenderModel(ulOverlayHandle,pchValue,unBufferSize,ref pColor,ref pError);
- return result;
- }
- public EVROverlayError SetOverlayRenderModel(ulong ulOverlayHandle,string pchRenderModel,ref HmdColor_t pColor)
- {
- EVROverlayError result = FnTable.SetOverlayRenderModel(ulOverlayHandle,pchRenderModel,ref pColor);
- return result;
- }
public EVROverlayError GetOverlayTransformType(ulong ulOverlayHandle,ref VROverlayTransformType peTransformType)
{
EVROverlayError result = FnTable.GetOverlayTransformType(ulOverlayHandle,ref peTransformType);
@@ -3107,17 +3204,6 @@ public class CVROverlay
bool result = FnTable.IsHoverTargetOverlay(ulOverlayHandle);
return result;
}
- public EVROverlayError SetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,ref HmdVector2_t pvCenter,float fRadius)
- {
- EVROverlayError result = FnTable.SetOverlayDualAnalogTransform(ulOverlay,eWhich,ref pvCenter,fRadius);
- return result;
- }
- public EVROverlayError GetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,ref HmdVector2_t pvCenter,ref float pfRadius)
- {
- pfRadius = 0;
- EVROverlayError result = FnTable.GetOverlayDualAnalogTransform(ulOverlay,eWhich,ref pvCenter,ref pfRadius);
- return result;
- }
public EVROverlayError SetOverlayIntersectionMask(ulong ulOverlayHandle,ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives,uint unNumMaskPrimitives,uint unPrimitiveSize)
{
EVROverlayError result = FnTable.SetOverlayIntersectionMask(ulOverlayHandle,ref pMaskPrimitives,unNumMaskPrimitives,unPrimitiveSize);
@@ -3220,14 +3306,14 @@ public class CVROverlay
uint result = FnTable.GetPrimaryDashboardDevice();
return result;
}
- public EVROverlayError ShowKeyboard(int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue)
+ public EVROverlayError ShowKeyboard(int eInputMode,int eLineInputMode,uint unFlags,string pchDescription,uint unCharMax,string pchExistingText,ulong uUserValue)
{
- EVROverlayError result = FnTable.ShowKeyboard(eInputMode,eLineInputMode,pchDescription,unCharMax,pchExistingText,bUseMinimalMode,uUserValue);
+ EVROverlayError result = FnTable.ShowKeyboard(eInputMode,eLineInputMode,unFlags,pchDescription,unCharMax,pchExistingText,uUserValue);
return result;
}
- public EVROverlayError ShowKeyboardForOverlay(ulong ulOverlayHandle,int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue)
+ public EVROverlayError ShowKeyboardForOverlay(ulong ulOverlayHandle,int eInputMode,int eLineInputMode,uint unFlags,string pchDescription,uint unCharMax,string pchExistingText,ulong uUserValue)
{
- EVROverlayError result = FnTable.ShowKeyboardForOverlay(ulOverlayHandle,eInputMode,eLineInputMode,pchDescription,unCharMax,pchExistingText,bUseMinimalMode,uUserValue);
+ EVROverlayError result = FnTable.ShowKeyboardForOverlay(ulOverlayHandle,eInputMode,eLineInputMode,unFlags,pchDescription,unCharMax,pchExistingText,uUserValue);
return result;
}
public uint GetKeyboardText(System.Text.StringBuilder pchText,uint cchText)
@@ -3259,6 +3345,88 @@ public class CVROverlay
}
+public class CVROverlayView
+{
+ IVROverlayView FnTable;
+ internal CVROverlayView(IntPtr pInterface)
+ {
+ FnTable = (IVROverlayView)Marshal.PtrToStructure(pInterface, typeof(IVROverlayView));
+ }
+ public EVROverlayError AcquireOverlayView(ulong ulOverlayHandle,ref VRNativeDevice_t pNativeDevice,ref VROverlayView_t pOverlayView,uint unOverlayViewSize)
+ {
+ EVROverlayError result = FnTable.AcquireOverlayView(ulOverlayHandle,ref pNativeDevice,ref pOverlayView,unOverlayViewSize);
+ return result;
+ }
+ public EVROverlayError ReleaseOverlayView(ref VROverlayView_t pOverlayView)
+ {
+ EVROverlayError result = FnTable.ReleaseOverlayView(ref pOverlayView);
+ return result;
+ }
+ public void PostOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pvrEvent)
+ {
+ FnTable.PostOverlayEvent(ulOverlayHandle,ref pvrEvent);
+ }
+ public bool IsViewingPermitted(ulong ulOverlayHandle)
+ {
+ bool result = FnTable.IsViewingPermitted(ulOverlayHandle);
+ return result;
+ }
+}
+
+
+public class CVRHeadsetView
+{
+ IVRHeadsetView FnTable;
+ internal CVRHeadsetView(IntPtr pInterface)
+ {
+ FnTable = (IVRHeadsetView)Marshal.PtrToStructure(pInterface, typeof(IVRHeadsetView));
+ }
+ public void SetHeadsetViewSize(uint nWidth,uint nHeight)
+ {
+ FnTable.SetHeadsetViewSize(nWidth,nHeight);
+ }
+ public void GetHeadsetViewSize(ref uint pnWidth,ref uint pnHeight)
+ {
+ pnWidth = 0;
+ pnHeight = 0;
+ FnTable.GetHeadsetViewSize(ref pnWidth,ref pnHeight);
+ }
+ public void SetHeadsetViewMode(uint eHeadsetViewMode)
+ {
+ FnTable.SetHeadsetViewMode(eHeadsetViewMode);
+ }
+ public uint GetHeadsetViewMode()
+ {
+ uint result = FnTable.GetHeadsetViewMode();
+ return result;
+ }
+ public void SetHeadsetViewCropped(bool bCropped)
+ {
+ FnTable.SetHeadsetViewCropped(bCropped);
+ }
+ public bool GetHeadsetViewCropped()
+ {
+ bool result = FnTable.GetHeadsetViewCropped();
+ return result;
+ }
+ public float GetHeadsetViewAspectRatio()
+ {
+ float result = FnTable.GetHeadsetViewAspectRatio();
+ return result;
+ }
+ public void SetHeadsetViewBlendRange(float flStartPct,float flEndPct)
+ {
+ FnTable.SetHeadsetViewBlendRange(flStartPct,flEndPct);
+ }
+ public void GetHeadsetViewBlendRange(ref float pStartPct,ref float pEndPct)
+ {
+ pStartPct = 0;
+ pEndPct = 0;
+ FnTable.GetHeadsetViewBlendRange(ref pStartPct,ref pEndPct);
+ }
+}
+
+
public class CVRRenderModels
{
IVRRenderModels FnTable;
@@ -3623,6 +3791,16 @@ public class CVRInput
EVRInputError result = FnTable.GetSkeletalActionData(action,ref pActionData,unActionDataSize);
return result;
}
+ public EVRInputError GetDominantHand(ref ETrackedControllerRole peDominantHand)
+ {
+ EVRInputError result = FnTable.GetDominantHand(ref peDominantHand);
+ return result;
+ }
+ public EVRInputError SetDominantHand(ETrackedControllerRole eDominantHand)
+ {
+ EVRInputError result = FnTable.SetDominantHand(eDominantHand);
+ return result;
+ }
public EVRInputError GetBoneCount(ulong action,ref uint pBoneCount)
{
pBoneCount = 0;
@@ -3706,6 +3884,11 @@ public class CVRInput
EVRInputError result = FnTable.ShowBindingsForActionSet(pSets,unSizeOfVRSelectedActionSet_t,(uint) pSets.Length,originToHighlight);
return result;
}
+ public EVRInputError GetComponentStateForBinding(string pchRenderModelName,string pchComponentName,ref InputBindingInfo_t pOriginInfo,uint unBindingInfoSize,uint unBindingInfoCount,ref RenderModel_ComponentState_t pComponentState)
+ {
+ EVRInputError result = FnTable.GetComponentStateForBinding(pchRenderModelName,pchComponentName,ref pOriginInfo,unBindingInfoSize,unBindingInfoCount,ref pComponentState);
+ return result;
+ }
public bool IsUsingLegacyInput()
{
bool result = FnTable.IsUsingLegacyInput();
@@ -3716,6 +3899,11 @@ public class CVRInput
EVRInputError result = FnTable.OpenBindingUI(pchAppKey,ulActionSetHandle,ulDeviceHandle,bShowOnDesktop);
return result;
}
+ public EVRInputError GetBindingVariant(ulong ulDevicePath,System.Text.StringBuilder pchVariantArray,uint unVariantArraySize)
+ {
+ EVRInputError result = FnTable.GetBindingVariant(ulDevicePath,pchVariantArray,unVariantArraySize);
+ return result;
+ }
}
@@ -4055,7 +4243,6 @@ public enum ETrackedDeviceProperty
Prop_DisplaySupportsAnalogGain_Bool = 2085,
Prop_DisplayMinAnalogGain_Float = 2086,
Prop_DisplayMaxAnalogGain_Float = 2087,
- Prop_DashboardLayoutPathName_String = 2090,
Prop_DashboardScale_Float = 2091,
Prop_IpdUIRangeMinMeters_Float = 2100,
Prop_IpdUIRangeMaxMeters_Float = 2101,
@@ -4150,6 +4337,7 @@ public enum EVRSubmitFlags
Submit_Reserved = 4,
Submit_TextureWithPose = 8,
Submit_TextureWithDepth = 16,
+ Submit_FrameDiscontinuty = 32,
}
public enum EVRState
{
@@ -4184,14 +4372,7 @@ public enum EVREventType
VREvent_ButtonUnpress = 201,
VREvent_ButtonTouch = 202,
VREvent_ButtonUntouch = 203,
- VREvent_DualAnalog_Press = 250,
- VREvent_DualAnalog_Unpress = 251,
- VREvent_DualAnalog_Touch = 252,
- VREvent_DualAnalog_Untouch = 253,
- VREvent_DualAnalog_Move = 254,
- VREvent_DualAnalog_ModeSwitch1 = 255,
- VREvent_DualAnalog_ModeSwitch2 = 256,
- VREvent_DualAnalog_Cancel = 257,
+ VREvent_Modal_Cancel = 257,
VREvent_MouseMove = 300,
VREvent_MouseButtonDown = 301,
VREvent_MouseButtonUp = 302,
@@ -4202,6 +4383,8 @@ public enum EVREventType
VREvent_OverlayFocusChanged = 307,
VREvent_ReloadOverlays = 308,
VREvent_ScrollSmooth = 309,
+ VREvent_LockMousePosition = 310,
+ VREvent_UnlockMousePosition = 311,
VREvent_InputFocusCaptured = 400,
VREvent_InputFocusReleased = 401,
VREvent_SceneApplicationChanged = 404,
@@ -4369,11 +4552,6 @@ public enum EVRMouseButton
Right = 2,
Middle = 4,
}
-public enum EDualAnalogWhich
-{
- k_EDualAnalog_Left = 0,
- k_EDualAnalog_Right = 1,
-}
public enum EShowUIType
{
ShowUI_ControllerBinding = 0,
@@ -4382,6 +4560,7 @@ public enum EShowUIType
ShowUI_Settings = 4,
ShowUI_DebugCommands = 5,
ShowUI_FullControllerBinding = 6,
+ ShowUI_ManageDrivers = 7,
}
public enum EHDCPError
{
@@ -4391,6 +4570,15 @@ public enum EHDCPError
DeviceRevoked = 3,
Unknown = 4,
}
+public enum EVRComponentProperty
+{
+ IsStatic = 1,
+ IsVisible = 2,
+ IsTouched = 4,
+ IsPressed = 8,
+ IsScrolled = 16,
+ IsHighlighted = 32,
+}
public enum EVRInputError
{
None = 0,
@@ -4411,6 +4599,9 @@ public enum EVRInputError
MismatchedActionManifest = 15,
MissingSkeletonData = 16,
InvalidBoneIndex = 17,
+ InvalidPriority = 18,
+ PermissionDenied = 19,
+ InvalidRenderModel = 20,
}
public enum EVRSpatialAnchorError
{
@@ -4679,7 +4870,7 @@ public enum EVRInitError
Compositor_CreateFallbackSyncTexture = 477,
Compositor_ShareFallbackSyncTexture = 478,
Compositor_CreateOverlayIndexBuffer = 479,
- Compositor_CreateOverlayVertextBuffer = 480,
+ Compositor_CreateOverlayVertexBuffer = 480,
Compositor_CreateTextVertexBuffer = 481,
Compositor_CreateTextIndexBuffer = 482,
Compositor_CreateMirrorTextures = 483,
@@ -4687,6 +4878,9 @@ public enum EVRInitError
Compositor_CreateMirrorOverlay = 485,
Compositor_FailedToCreateVirtualDisplayBackbuffer = 486,
Compositor_DisplayModeNotSupported = 487,
+ Compositor_CreateOverlayInvalidCall = 488,
+ Compositor_CreateOverlayAlreadyInitialized = 489,
+ Compositor_FailedToCreateMailbox = 490,
VendorSpecific_UnableToConnectToOculusRuntime = 1000,
VendorSpecific_WindowsNotInDevMode = 1001,
VendorSpecific_HmdFound_CantOpenDevice = 1101,
@@ -4882,7 +5076,6 @@ public enum VROverlayInputMethod
{
None = 0,
Mouse = 1,
- DualAnalog = 2,
}
public enum VROverlayTransformType
{
@@ -4894,6 +5087,7 @@ public enum VROverlayTransformType
VROverlayTransform_Cursor = 4,
VROverlayTransform_DashboardTab = 5,
VROverlayTransform_DashboardThumb = 6,
+ VROverlayTransform_Mountable = 7,
}
public enum VROverlayFlags
{
@@ -4912,6 +5106,8 @@ public enum VROverlayFlags
SendVRSmoothScrollEvents = 131072,
ProtectedContent = 262144,
HideLaserIntersection = 524288,
+ WantsModalBehavior = 1048576,
+ IsPremultiplied = 2097152,
}
public enum VRMessageOverlayResponse
{
@@ -4939,6 +5135,23 @@ public enum EVROverlayIntersectionMaskPrimitiveType
OverlayIntersectionPrimitiveType_Rectangle = 0,
OverlayIntersectionPrimitiveType_Circle = 1,
}
+public enum EKeyboardFlags
+{
+ KeyboardFlag_Minimal = 1,
+ KeyboardFlag_Modal = 2,
+}
+public enum EDeviceType
+{
+ Invalid = -1,
+ DirectX11 = 0,
+ Vulkan = 1,
+}
+public enum HeadsetViewMode_t
+{
+ HeadsetViewMode_Left = 0,
+ HeadsetViewMode_Right = 1,
+ HeadsetViewMode_Both = 2,
+}
public enum EVRRenderModelError
{
None = 0,
@@ -4955,14 +5168,6 @@ public enum EVRRenderModelError
NotEnoughTexCoords = 308,
InvalidTexture = 400,
}
-public enum EVRComponentProperty
-{
- IsStatic = 1,
- IsVisible = 2,
- IsTouched = 4,
- IsPressed = 8,
- IsScrolled = 16,
-}
public enum EVRNotificationType
{
Transient = 0,
@@ -5084,7 +5289,6 @@ public enum EVRDebugError
[FieldOffset(0)] public VREvent_EditingCameraSurface_t cameraSurface;
[FieldOffset(0)] public VREvent_MessageOverlay_t messageOverlay;
[FieldOffset(0)] public VREvent_Property_t property;
- [FieldOffset(0)] public VREvent_DualAnalog_t dualAnalog;
[FieldOffset(0)] public VREvent_HapticVibration_t hapticVibration;
[FieldOffset(0)] public VREvent_WebConsole_t webConsole;
[FieldOffset(0)] public VREvent_InputBindingLoad_t inputBinding;
@@ -5439,14 +5643,6 @@ public enum EVRDebugError
public ulong container;
public ETrackedDeviceProperty prop;
}
-[StructLayout(LayoutKind.Sequential)] public struct VREvent_DualAnalog_t
-{
- public float x;
- public float y;
- public float transformedX;
- public float transformedY;
- public EDualAnalogWhich which;
-}
[StructLayout(LayoutKind.Sequential)] public struct VREvent_HapticVibration_t
{
public ulong containerHandle;
@@ -5527,6 +5723,12 @@ public enum EVRDebugError
unpacked.data = this.data;
}
}
+[StructLayout(LayoutKind.Sequential)] public struct RenderModel_ComponentState_t
+{
+ public HmdMatrix34_t mTrackingToComponentRenderModel;
+ public HmdMatrix34_t mTrackingToComponentLocal;
+ public uint uProperties;
+}
[StructLayout(LayoutKind.Sequential)] public struct HiddenAreaMesh_t
{
public IntPtr pVertexData; // const struct vr::HmdVector2_t *
@@ -5582,25 +5784,6 @@ public enum EVRDebugError
unpacked.rAxis4 = this.rAxis4;
}
}
-[StructLayout(LayoutKind.Sequential)] public struct Compositor_OverlaySettings
-{
- public uint size;
- [MarshalAs(UnmanagedType.I1)]
- public bool curved;
- [MarshalAs(UnmanagedType.I1)]
- public bool antialias;
- public float scale;
- public float distance;
- public float alpha;
- public float uOffset;
- public float vOffset;
- public float uScale;
- public float vScale;
- public float gridDivs;
- public float gridWidth;
- public float gridScale;
- public HmdMatrix44_t transform;
-}
[StructLayout(LayoutKind.Sequential)] public struct VRBoneTransform_t
{
public HmdVector4_t position;
@@ -5645,6 +5828,11 @@ public enum EVRDebugError
public uint m_nNumVSyncsReadyForUse;
public uint m_nNumVSyncsToFirstView;
}
+[StructLayout(LayoutKind.Sequential)] public struct Compositor_BenchmarkResults
+{
+ public float m_flMegaPixelsPerSecond;
+ public float m_flHmdRecommendedMegaPixelsPerSecond;
+}
[StructLayout(LayoutKind.Sequential)] public struct DriverDirectMode_FrameTiming
{
public uint m_nSize;
@@ -5728,11 +5916,24 @@ public enum EVRDebugError
public EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType;
public VROverlayIntersectionMaskPrimitive_Data_t m_Primitive;
}
-[StructLayout(LayoutKind.Sequential)] public struct RenderModel_ComponentState_t
+[StructLayout(LayoutKind.Sequential)] public struct VROverlayView_t
{
- public HmdMatrix34_t mTrackingToComponentRenderModel;
- public HmdMatrix34_t mTrackingToComponentLocal;
- public uint uProperties;
+ public ulong overlayHandle;
+ public Texture_t texture;
+ public VRTextureBounds_t textureBounds;
+}
+[StructLayout(LayoutKind.Sequential)] public struct VRVulkanDevice_t
+{
+ public IntPtr m_pInstance; // struct VkInstance_T *
+ public IntPtr m_pDevice; // struct VkDevice_T *
+ public IntPtr m_pPhysicalDevice; // struct VkPhysicalDevice_T *
+ public IntPtr m_pQueue; // struct VkQueue_T *
+ public uint m_uQueueFamilyIndex;
+}
+[StructLayout(LayoutKind.Sequential)] public struct VRNativeDevice_t
+{
+ public IntPtr handle; // void *
+ public EDeviceType eType;
}
[StructLayout(LayoutKind.Sequential)] public struct RenderModel_Vertex_t
{
@@ -6544,6 +6745,47 @@ public enum EVRDebugError
}).TrimEnd('\0');
}
}
+ public byte rchInputSourceType0,rchInputSourceType1,rchInputSourceType2,rchInputSourceType3,rchInputSourceType4,rchInputSourceType5,rchInputSourceType6,rchInputSourceType7,rchInputSourceType8,rchInputSourceType9,rchInputSourceType10,rchInputSourceType11,rchInputSourceType12,rchInputSourceType13,rchInputSourceType14,rchInputSourceType15,rchInputSourceType16,rchInputSourceType17,rchInputSourceType18,rchInputSourceType19,rchInputSourceType20,rchInputSourceType21,rchInputSourceType22,rchInputSourceType23,rchInputSourceType24,rchInputSourceType25,rchInputSourceType26,rchInputSourceType27,rchInputSourceType28,rchInputSourceType29,rchInputSourceType30,rchInputSourceType31;
+ public string rchInputSourceType
+ {
+ get
+ {
+ return new string(new char[] {
+ (char)rchInputSourceType0,
+ (char)rchInputSourceType1,
+ (char)rchInputSourceType2,
+ (char)rchInputSourceType3,
+ (char)rchInputSourceType4,
+ (char)rchInputSourceType5,
+ (char)rchInputSourceType6,
+ (char)rchInputSourceType7,
+ (char)rchInputSourceType8,
+ (char)rchInputSourceType9,
+ (char)rchInputSourceType10,
+ (char)rchInputSourceType11,
+ (char)rchInputSourceType12,
+ (char)rchInputSourceType13,
+ (char)rchInputSourceType14,
+ (char)rchInputSourceType15,
+ (char)rchInputSourceType16,
+ (char)rchInputSourceType17,
+ (char)rchInputSourceType18,
+ (char)rchInputSourceType19,
+ (char)rchInputSourceType20,
+ (char)rchInputSourceType21,
+ (char)rchInputSourceType22,
+ (char)rchInputSourceType23,
+ (char)rchInputSourceType24,
+ (char)rchInputSourceType25,
+ (char)rchInputSourceType26,
+ (char)rchInputSourceType27,
+ (char)rchInputSourceType28,
+ (char)rchInputSourceType29,
+ (char)rchInputSourceType30,
+ (char)rchInputSourceType31
+ }).TrimEnd('\0');
+ }
+ }
}
[StructLayout(LayoutKind.Sequential)] public struct VRActiveActionSet_t
{
@@ -6575,7 +6817,9 @@ public enum EVRDebugError
public IntPtr m_pVRChaperone; // class vr::IVRChaperone *
public IntPtr m_pVRChaperoneSetup; // class vr::IVRChaperoneSetup *
public IntPtr m_pVRCompositor; // class vr::IVRCompositor *
+ public IntPtr m_pVRHeadsetView; // class vr::IVRHeadsetView *
public IntPtr m_pVROverlay; // class vr::IVROverlay *
+ public IntPtr m_pVROverlayView; // class vr::IVROverlayView *
public IntPtr m_pVRResources; // class vr::IVRResources *
public IntPtr m_pVRRenderModels; // class vr::IVRRenderModels *
public IntPtr m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay *
@@ -6674,6 +6918,7 @@ public class OpenVR
public const uint k_unBoolPropertyTag = 4;
public const uint k_unStringPropertyTag = 5;
public const uint k_unErrorPropertyTag = 6;
+ public const uint k_unDoublePropertyTag = 7;
public const uint k_unHmdMatrix34PropertyTag = 20;
public const uint k_unHmdMatrix44PropertyTag = 21;
public const uint k_unHmdVector3PropertyTag = 22;
@@ -6709,12 +6954,17 @@ public class OpenVR
public const string IVRApplications_Version = "IVRApplications_007";
public const string IVRChaperone_Version = "IVRChaperone_003";
public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_006";
- public const string IVRCompositor_Version = "IVRCompositor_024";
+ public const string IVRCompositor_Version = "IVRCompositor_026";
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_022";
+ public const string IVROverlay_Version = "IVROverlay_024";
+ public const string IVROverlayView_Version = "IVROverlayView_003";
+ public const uint k_unHeadsetViewMaxWidth = 3840;
+ public const uint k_unHeadsetViewMaxHeight = 2160;
+ public const string k_pchHeadsetViewOverlayKey = "system.HeadsetView";
+ public const string IVRHeadsetView_Version = "IVRHeadsetView_001";
public const string k_pch_Controller_Component_GDC2015 = "gdc2015";
public const string k_pch_Controller_Component_Base = "base";
public const string k_pch_Controller_Component_Tip = "tip";
@@ -6792,6 +7042,8 @@ public class OpenVR
public const string k_pch_SteamVR_CustomIconStyle_String = "customIconStyle";
public const string k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle";
public const string k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate";
+ public const string k_pch_SteamVR_AllowGlobalActionSetPriority = "globalActionSetPriority";
+ public const string k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2";
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";
@@ -6889,13 +7141,13 @@ public class OpenVR
public const string k_pch_Dashboard_Section = "dashboard";
public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
- public const string k_pch_Dashboard_UseWebKeyboard = "useWebKeyboard";
public const string k_pch_Dashboard_UseWebSettings = "useWebSettings";
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_modelskin_Section = "modelskins";
public const string k_pch_Driver_Enable_Bool = "enable";
+ public const string k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode";
public const string k_pch_Driver_LoadPriority_Int32 = "loadPriority";
public const string k_pch_WebInterface_Section = "WebInterface";
public const string k_pch_VRWebHelper_Section = "VRWebHelper";
@@ -6903,9 +7155,12 @@ public class OpenVR
public const string k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort";
public const string k_pch_TrackingOverride_Section = "TrackingOverrides";
public const string k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL";
+ public const string k_pch_App_BindingLegacyAPISuffix_String = "_legacy";
+ public const string k_pch_App_BindingSteamVRInputAPISuffix_String = "_steamvrinput";
public const string k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL";
public const string k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
public const string k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
+ public const string k_pch_App_DominantHand_Int32 = "DominantHand";
public const string k_pch_Trackers_Section = "trackers";
public const string k_pch_DesktopUI_Section = "DesktopUI";
public const string k_pch_LastKnown_Section = "LastKnown";
@@ -6924,7 +7179,10 @@ public class OpenVR
public const uint k_unMaxActionSetNameLength = 64;
public const uint k_unMaxActionOriginCount = 16;
public const uint k_unMaxBoneNameLength = 32;
- public const string IVRInput_Version = "IVRInput_007";
+ public const int k_nActionSetOverlayGlobalPriorityMin = 16777216;
+ public const int k_nActionSetOverlayGlobalPriorityMax = 33554431;
+ public const int k_nActionSetPriorityReservedMin = 33554432;
+ public const string IVRInput_Version = "IVRInput_010";
public const ulong k_ulInvalidIOBufferHandle = 0;
public const string IVRIOBuffer_Version = "IVRIOBuffer_002";
public const uint k_ulInvalidSpatialAnchorHandle = 0;
@@ -6945,7 +7203,9 @@ public class OpenVR
m_pVRChaperone = null;
m_pVRChaperoneSetup = null;
m_pVRCompositor = null;
+ m_pVRHeadsetView = null;
m_pVROverlay = null;
+ m_pVROverlayView = null;
m_pVRRenderModels = null;
m_pVRExtendedDisplay = null;
m_pVRSettings = null;
@@ -7020,6 +7280,19 @@ public class OpenVR
return m_pVRCompositor;
}
+ public CVRHeadsetView VRHeadsetView()
+ {
+ CheckClear();
+ if (m_pVRHeadsetView == null)
+ {
+ var eError = EVRInitError.None;
+ var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRHeadsetView_Version, ref eError);
+ if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
+ m_pVRHeadsetView = new CVRHeadsetView(pInterface);
+ }
+ return m_pVRHeadsetView;
+ }
+
public CVROverlay VROverlay()
{
CheckClear();
@@ -7033,6 +7306,19 @@ public class OpenVR
return m_pVROverlay;
}
+ public CVROverlayView VROverlayView()
+ {
+ CheckClear();
+ if (m_pVROverlayView == null)
+ {
+ var eError = EVRInitError.None;
+ var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVROverlayView_Version, ref eError);
+ if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
+ m_pVROverlayView = new CVROverlayView(pInterface);
+ }
+ return m_pVROverlayView;
+ }
+
public CVRRenderModels VRRenderModels()
{
CheckClear();
@@ -7180,7 +7466,9 @@ public class OpenVR
private CVRChaperone m_pVRChaperone;
private CVRChaperoneSetup m_pVRChaperoneSetup;
private CVRCompositor m_pVRCompositor;
+ private CVRHeadsetView m_pVRHeadsetView;
private CVROverlay m_pVROverlay;
+ private CVROverlayView m_pVROverlayView;
private CVRRenderModels m_pVRRenderModels;
private CVRExtendedDisplay m_pVRExtendedDisplay;
private CVRSettings m_pVRSettings;
@@ -7209,7 +7497,9 @@ public class OpenVR
public static CVRChaperone Chaperone { get { return OpenVRInternal_ModuleContext.VRChaperone(); } }
public static CVRChaperoneSetup ChaperoneSetup { get { return OpenVRInternal_ModuleContext.VRChaperoneSetup(); } }
public static CVRCompositor Compositor { get { return OpenVRInternal_ModuleContext.VRCompositor(); } }
+ public static CVRHeadsetView HeadsetView { get { return OpenVRInternal_ModuleContext.VRHeadsetView(); } }
public static CVROverlay Overlay { get { return OpenVRInternal_ModuleContext.VROverlay(); } }
+ public static CVROverlayView OverlayView { get { return OpenVRInternal_ModuleContext.VROverlayView(); } }
public static CVRRenderModels RenderModels { get { return OpenVRInternal_ModuleContext.VRRenderModels(); } }
public static CVRExtendedDisplay ExtendedDisplay { get { return OpenVRInternal_ModuleContext.VRExtendedDisplay(); } }
public static CVRSettings Settings { get { return OpenVRInternal_ModuleContext.VRSettings(); } }
diff --git a/headers/openvr_api.json b/headers/openvr_api.json
index b481362..dd2d972 100644
--- a/headers/openvr_api.json
+++ b/headers/openvr_api.json
@@ -13,13 +13,13 @@
,{"typedef": "vr::VRActionSetHandle_t","type": "uint64_t"}
,{"typedef": "vr::VRInputValueHandle_t","type": "uint64_t"}
,{"typedef": "vr::VREvent_Data_t","type": "union VREvent_Data_t"}
+,{"typedef": "vr::VRComponentProperties","type": "uint32_t"}
,{"typedef": "vr::VRControllerState_t","type": "struct vr::VRControllerState001_t"}
,{"typedef": "vr::VROverlayHandle_t","type": "uint64_t"}
,{"typedef": "vr::BoneIndex_t","type": "int32_t"}
,{"typedef": "vr::TrackedCameraHandle_t","type": "uint64_t"}
,{"typedef": "vr::ScreenshotHandle_t","type": "uint32_t"}
,{"typedef": "vr::VROverlayIntersectionMaskPrimitive_Data_t","type": "union VROverlayIntersectionMaskPrimitive_Data_t"}
-,{"typedef": "vr::VRComponentProperties","type": "uint32_t"}
,{"typedef": "vr::TextureID_t","type": "int32_t"}
,{"typedef": "vr::VRNotificationId","type": "uint32_t"}
,{"typedef": "vr::IOBufferHandle_t","type": "uint64_t"}
@@ -235,7 +235,6 @@
,{"name": "Prop_DisplaySupportsAnalogGain_Bool","value": "2085"}
,{"name": "Prop_DisplayMinAnalogGain_Float","value": "2086"}
,{"name": "Prop_DisplayMaxAnalogGain_Float","value": "2087"}
- ,{"name": "Prop_DashboardLayoutPathName_String","value": "2090"}
,{"name": "Prop_DashboardScale_Float","value": "2091"}
,{"name": "Prop_IpdUIRangeMinMeters_Float","value": "2100"}
,{"name": "Prop_IpdUIRangeMaxMeters_Float","value": "2101"}
@@ -327,6 +326,7 @@
,{"name": "Submit_Reserved","value": "4"}
,{"name": "Submit_TextureWithPose","value": "8"}
,{"name": "Submit_TextureWithDepth","value": "16"}
+ ,{"name": "Submit_FrameDiscontinuty","value": "32"}
]}
, {"enumname": "vr::EVRState","values": [
{"name": "VRState_Undefined","value": "-1"}
@@ -359,14 +359,7 @@
,{"name": "VREvent_ButtonUnpress","value": "201"}
,{"name": "VREvent_ButtonTouch","value": "202"}
,{"name": "VREvent_ButtonUntouch","value": "203"}
- ,{"name": "VREvent_DualAnalog_Press","value": "250"}
- ,{"name": "VREvent_DualAnalog_Unpress","value": "251"}
- ,{"name": "VREvent_DualAnalog_Touch","value": "252"}
- ,{"name": "VREvent_DualAnalog_Untouch","value": "253"}
- ,{"name": "VREvent_DualAnalog_Move","value": "254"}
- ,{"name": "VREvent_DualAnalog_ModeSwitch1","value": "255"}
- ,{"name": "VREvent_DualAnalog_ModeSwitch2","value": "256"}
- ,{"name": "VREvent_DualAnalog_Cancel","value": "257"}
+ ,{"name": "VREvent_Modal_Cancel","value": "257"}
,{"name": "VREvent_MouseMove","value": "300"}
,{"name": "VREvent_MouseButtonDown","value": "301"}
,{"name": "VREvent_MouseButtonUp","value": "302"}
@@ -377,6 +370,8 @@
,{"name": "VREvent_OverlayFocusChanged","value": "307"}
,{"name": "VREvent_ReloadOverlays","value": "308"}
,{"name": "VREvent_ScrollSmooth","value": "309"}
+ ,{"name": "VREvent_LockMousePosition","value": "310"}
+ ,{"name": "VREvent_UnlockMousePosition","value": "311"}
,{"name": "VREvent_InputFocusCaptured","value": "400"}
,{"name": "VREvent_InputFocusReleased","value": "401"}
,{"name": "VREvent_SceneApplicationChanged","value": "404"}
@@ -541,10 +536,6 @@
,{"name": "VRMouseButton_Right","value": "2"}
,{"name": "VRMouseButton_Middle","value": "4"}
]}
-, {"enumname": "vr::EDualAnalogWhich","values": [
- {"name": "k_EDualAnalog_Left","value": "0"}
- ,{"name": "k_EDualAnalog_Right","value": "1"}
-]}
, {"enumname": "vr::EShowUIType","values": [
{"name": "ShowUI_ControllerBinding","value": "0"}
,{"name": "ShowUI_ManageTrackers","value": "1"}
@@ -552,6 +543,7 @@
,{"name": "ShowUI_Settings","value": "4"}
,{"name": "ShowUI_DebugCommands","value": "5"}
,{"name": "ShowUI_FullControllerBinding","value": "6"}
+ ,{"name": "ShowUI_ManageDrivers","value": "7"}
]}
, {"enumname": "vr::EHDCPError","values": [
{"name": "HDCPError_None","value": "0"}
@@ -560,6 +552,14 @@
,{"name": "HDCPError_DeviceRevoked","value": "3"}
,{"name": "HDCPError_Unknown","value": "4"}
]}
+, {"enumname": "vr::EVRComponentProperty","values": [
+ {"name": "VRComponentProperty_IsStatic","value": "1"}
+ ,{"name": "VRComponentProperty_IsVisible","value": "2"}
+ ,{"name": "VRComponentProperty_IsTouched","value": "4"}
+ ,{"name": "VRComponentProperty_IsPressed","value": "8"}
+ ,{"name": "VRComponentProperty_IsScrolled","value": "16"}
+ ,{"name": "VRComponentProperty_IsHighlighted","value": "32"}
+]}
, {"enumname": "vr::EVRInputError","values": [
{"name": "VRInputError_None","value": "0"}
,{"name": "VRInputError_NameNotFound","value": "1"}
@@ -579,6 +579,9 @@
,{"name": "VRInputError_MismatchedActionManifest","value": "15"}
,{"name": "VRInputError_MissingSkeletonData","value": "16"}
,{"name": "VRInputError_InvalidBoneIndex","value": "17"}
+ ,{"name": "VRInputError_InvalidPriority","value": "18"}
+ ,{"name": "VRInputError_PermissionDenied","value": "19"}
+ ,{"name": "VRInputError_InvalidRenderModel","value": "20"}
]}
, {"enumname": "vr::EVRSpatialAnchorError","values": [
{"name": "VRSpatialAnchorError_Success","value": "0"}
@@ -835,7 +838,7 @@
,{"name": "VRInitError_Compositor_CreateFallbackSyncTexture","value": "477"}
,{"name": "VRInitError_Compositor_ShareFallbackSyncTexture","value": "478"}
,{"name": "VRInitError_Compositor_CreateOverlayIndexBuffer","value": "479"}
- ,{"name": "VRInitError_Compositor_CreateOverlayVertextBuffer","value": "480"}
+ ,{"name": "VRInitError_Compositor_CreateOverlayVertexBuffer","value": "480"}
,{"name": "VRInitError_Compositor_CreateTextVertexBuffer","value": "481"}
,{"name": "VRInitError_Compositor_CreateTextIndexBuffer","value": "482"}
,{"name": "VRInitError_Compositor_CreateMirrorTextures","value": "483"}
@@ -843,6 +846,9 @@
,{"name": "VRInitError_Compositor_CreateMirrorOverlay","value": "485"}
,{"name": "VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer","value": "486"}
,{"name": "VRInitError_Compositor_DisplayModeNotSupported","value": "487"}
+ ,{"name": "VRInitError_Compositor_CreateOverlayInvalidCall","value": "488"}
+ ,{"name": "VRInitError_Compositor_CreateOverlayAlreadyInitialized","value": "489"}
+ ,{"name": "VRInitError_Compositor_FailedToCreateMailbox","value": "490"}
,{"name": "VRInitError_VendorSpecific_UnableToConnectToOculusRuntime","value": "1000"}
,{"name": "VRInitError_VendorSpecific_WindowsNotInDevMode","value": "1001"}
,{"name": "VRInitError_VendorSpecific_HmdFound_CantOpenDevice","value": "1101"}
@@ -1020,7 +1026,6 @@
, {"enumname": "vr::VROverlayInputMethod","values": [
{"name": "VROverlayInputMethod_None","value": "0"}
,{"name": "VROverlayInputMethod_Mouse","value": "1"}
- ,{"name": "VROverlayInputMethod_DualAnalog","value": "2"}
]}
, {"enumname": "vr::VROverlayTransformType","values": [
{"name": "VROverlayTransform_Invalid","value": "-1"}
@@ -1031,6 +1036,7 @@
,{"name": "VROverlayTransform_Cursor","value": "4"}
,{"name": "VROverlayTransform_DashboardTab","value": "5"}
,{"name": "VROverlayTransform_DashboardThumb","value": "6"}
+ ,{"name": "VROverlayTransform_Mountable","value": "7"}
]}
, {"enumname": "vr::VROverlayFlags","values": [
{"name": "VROverlayFlags_NoDashboardTab","value": "8"}
@@ -1048,6 +1054,8 @@
,{"name": "VROverlayFlags_SendVRSmoothScrollEvents","value": "131072"}
,{"name": "VROverlayFlags_ProtectedContent","value": "262144"}
,{"name": "VROverlayFlags_HideLaserIntersection","value": "524288"}
+ ,{"name": "VROverlayFlags_WantsModalBehavior","value": "1048576"}
+ ,{"name": "VROverlayFlags_IsPremultiplied","value": "2097152"}
]}
, {"enumname": "vr::VRMessageOverlayResponse","values": [
{"name": "VRMessageOverlayResponse_ButtonPress_0","value": "0"}
@@ -1071,6 +1079,20 @@
{"name": "OverlayIntersectionPrimitiveType_Rectangle","value": "0"}
,{"name": "OverlayIntersectionPrimitiveType_Circle","value": "1"}
]}
+, {"enumname": "vr::EKeyboardFlags","values": [
+ {"name": "KeyboardFlag_Minimal","value": "1"}
+ ,{"name": "KeyboardFlag_Modal","value": "2"}
+]}
+, {"enumname": "vr::EDeviceType","values": [
+ {"name": "DeviceType_Invalid","value": "-1"}
+ ,{"name": "DeviceType_DirectX11","value": "0"}
+ ,{"name": "DeviceType_Vulkan","value": "1"}
+]}
+, {"enumname": "vr::HeadsetViewMode_t","values": [
+ {"name": "HeadsetViewMode_Left","value": "0"}
+ ,{"name": "HeadsetViewMode_Right","value": "1"}
+ ,{"name": "HeadsetViewMode_Both","value": "2"}
+]}
, {"enumname": "vr::EVRRenderModelError","values": [
{"name": "VRRenderModelError_None","value": "0"}
,{"name": "VRRenderModelError_Loading","value": "100"}
@@ -1086,13 +1108,6 @@
,{"name": "VRRenderModelError_NotEnoughTexCoords","value": "308"}
,{"name": "VRRenderModelError_InvalidTexture","value": "400"}
]}
-, {"enumname": "vr::EVRComponentProperty","values": [
- {"name": "VRComponentProperty_IsStatic","value": "1"}
- ,{"name": "VRComponentProperty_IsVisible","value": "2"}
- ,{"name": "VRComponentProperty_IsTouched","value": "4"}
- ,{"name": "VRComponentProperty_IsPressed","value": "8"}
- ,{"name": "VRComponentProperty_IsScrolled","value": "16"}
-]}
, {"enumname": "vr::EVRNotificationType","values": [
{"name": "EVRNotificationType_Transient","value": "0"}
,{"name": "EVRNotificationType_Persistent","value": "1"}
@@ -1210,6 +1225,8 @@
,{
"constname": "k_unErrorPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "6"}
,{
+ "constname": "k_unDoublePropertyTag","consttype": "const PropertyTypeTag_t", "constval": "7"}
+,{
"constname": "k_unHmdMatrix34PropertyTag","consttype": "const PropertyTypeTag_t", "constval": "20"}
,{
"constname": "k_unHmdMatrix44PropertyTag","consttype": "const PropertyTypeTag_t", "constval": "21"}
@@ -1280,7 +1297,7 @@
,{
"constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_006"}
,{
- "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_024"}
+ "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_026"}
,{
"constname": "k_unVROverlayMaxKeyLength","consttype": "const uint32_t", "constval": "128"}
,{
@@ -1290,7 +1307,17 @@
,{
"constname": "k_unMaxOverlayIntersectionMaskPrimitivesCount","consttype": "const uint32_t", "constval": "32"}
,{
- "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_022"}
+ "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_024"}
+,{
+ "constname": "IVROverlayView_Version","consttype": "const char *const", "constval": "IVROverlayView_003"}
+,{
+ "constname": "k_unHeadsetViewMaxWidth","consttype": "const uint32_t", "constval": "3840"}
+,{
+ "constname": "k_unHeadsetViewMaxHeight","consttype": "const uint32_t", "constval": "2160"}
+,{
+ "constname": "k_pchHeadsetViewOverlayKey","consttype": "const char *const", "constval": "system.HeadsetView"}
+,{
+ "constname": "IVRHeadsetView_Version","consttype": "const char *const", "constval": "IVRHeadsetView_001"}
,{
"constname": "k_pch_Controller_Component_GDC2015","consttype": "const char *const", "constval": "gdc2015"}
,{
@@ -1446,6 +1473,10 @@
,{
"constname": "k_pch_SteamVR_CustomIconForceUpdate_String","consttype": "const char *const", "constval": "customIconForceUpdate"}
,{
+ "constname": "k_pch_SteamVR_AllowGlobalActionSetPriority","consttype": "const char *const", "constval": "globalActionSetPriority"}
+,{
+ "constname": "k_pch_SteamVR_OverlayRenderQuality","consttype": "const char *const", "constval": "overlayRenderQuality_2"}
+,{
"constname": "k_pch_DirectMode_Section","consttype": "const char *const", "constval": "direct_mode"}
,{
"constname": "k_pch_DirectMode_Enable_Bool","consttype": "const char *const", "constval": "enable"}
@@ -1640,8 +1671,6 @@
,{
"constname": "k_pch_Dashboard_ArcadeMode_Bool","consttype": "const char *const", "constval": "arcadeMode"}
,{
- "constname": "k_pch_Dashboard_UseWebKeyboard","consttype": "const char *const", "constval": "useWebKeyboard"}
-,{
"constname": "k_pch_Dashboard_UseWebSettings","consttype": "const char *const", "constval": "useWebSettings"}
,{
"constname": "k_pch_Dashboard_Position","consttype": "const char *const", "constval": "position"}
@@ -1654,6 +1683,8 @@
,{
"constname": "k_pch_Driver_Enable_Bool","consttype": "const char *const", "constval": "enable"}
,{
+ "constname": "k_pch_Driver_BlockedBySafemode_Bool","consttype": "const char *const", "constval": "blocked_by_safe_mode"}
+,{
"constname": "k_pch_Driver_LoadPriority_Int32","consttype": "const char *const", "constval": "loadPriority"}
,{
"constname": "k_pch_WebInterface_Section","consttype": "const char *const", "constval": "WebInterface"}
@@ -1668,12 +1699,18 @@
,{
"constname": "k_pch_App_BindingAutosaveURLSuffix_String","consttype": "const char *const", "constval": "AutosaveURL"}
,{
+ "constname": "k_pch_App_BindingLegacyAPISuffix_String","consttype": "const char *const", "constval": "_legacy"}
+,{
+ "constname": "k_pch_App_BindingSteamVRInputAPISuffix_String","consttype": "const char *const", "constval": "_steamvrinput"}
+,{
"constname": "k_pch_App_BindingCurrentURLSuffix_String","consttype": "const char *const", "constval": "CurrentURL"}
,{
"constname": "k_pch_App_BindingPreviousURLSuffix_String","consttype": "const char *const", "constval": "PreviousURL"}
,{
"constname": "k_pch_App_NeedToUpdateAutosaveSuffix_Bool","consttype": "const char *const", "constval": "NeedToUpdateAutosave"}
,{
+ "constname": "k_pch_App_DominantHand_Int32","consttype": "const char *const", "constval": "DominantHand"}
+,{
"constname": "k_pch_Trackers_Section","consttype": "const char *const", "constval": "trackers"}
,{
"constname": "k_pch_DesktopUI_Section","consttype": "const char *const", "constval": "DesktopUI"}
@@ -1710,7 +1747,13 @@
,{
"constname": "k_unMaxBoneNameLength","consttype": "const uint32_t", "constval": "32"}
,{
- "constname": "IVRInput_Version","consttype": "const char *const", "constval": "IVRInput_007"}
+ "constname": "k_nActionSetOverlayGlobalPriorityMin","consttype": "const int32_t", "constval": "16777216"}
+,{
+ "constname": "k_nActionSetOverlayGlobalPriorityMax","consttype": "const int32_t", "constval": "33554431"}
+,{
+ "constname": "k_nActionSetPriorityReservedMin","consttype": "const int32_t", "constval": "33554432"}
+,{
+ "constname": "IVRInput_Version","consttype": "const char *const", "constval": "IVRInput_010"}
,{
"constname": "k_ulInvalidIOBufferHandle","consttype": "const uint64_t", "constval": "0"}
,{
@@ -1867,12 +1910,6 @@
,{"struct": "vr::VREvent_Property_t","fields": [
{ "fieldname": "container", "fieldtype": "PropertyContainerHandle_t"},
{ "fieldname": "prop", "fieldtype": "enum vr::ETrackedDeviceProperty"}]}
-,{"struct": "vr::VREvent_DualAnalog_t","fields": [
-{ "fieldname": "x", "fieldtype": "float"},
-{ "fieldname": "y", "fieldtype": "float"},
-{ "fieldname": "transformedX", "fieldtype": "float"},
-{ "fieldname": "transformedY", "fieldtype": "float"},
-{ "fieldname": "which", "fieldtype": "enum vr::EDualAnalogWhich"}]}
,{"struct": "vr::VREvent_HapticVibration_t","fields": [
{ "fieldname": "containerHandle", "fieldtype": "uint64_t"},
{ "fieldname": "componentHandle", "fieldtype": "uint64_t"},
@@ -1927,7 +1964,6 @@
{ "fieldname": "cameraSurface", "fieldtype": "struct vr::VREvent_EditingCameraSurface_t"},
{ "fieldname": "messageOverlay", "fieldtype": "struct vr::VREvent_MessageOverlay_t"},
{ "fieldname": "property", "fieldtype": "struct vr::VREvent_Property_t"},
-{ "fieldname": "dualAnalog", "fieldtype": "struct vr::VREvent_DualAnalog_t"},
{ "fieldname": "hapticVibration", "fieldtype": "struct vr::VREvent_HapticVibration_t"},
{ "fieldname": "webConsole", "fieldtype": "struct vr::VREvent_WebConsole_t"},
{ "fieldname": "inputBinding", "fieldtype": "struct vr::VREvent_InputBindingLoad_t"},
@@ -1942,6 +1978,10 @@
{ "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"},
{ "fieldname": "eventAgeSeconds", "fieldtype": "float"},
{ "fieldname": "data", "fieldtype": "VREvent_Data_t"}]}
+,{"struct": "vr::RenderModel_ComponentState_t","fields": [
+{ "fieldname": "mTrackingToComponentRenderModel", "fieldtype": "struct vr::HmdMatrix34_t"},
+{ "fieldname": "mTrackingToComponentLocal", "fieldtype": "struct vr::HmdMatrix34_t"},
+{ "fieldname": "uProperties", "fieldtype": "VRComponentProperties"}]}
,{"struct": "vr::HiddenAreaMesh_t","fields": [
{ "fieldname": "pVertexData", "fieldtype": "const struct vr::HmdVector2_t *"},
{ "fieldname": "unTriangleCount", "fieldtype": "uint32_t"}]}
@@ -1953,21 +1993,6 @@
{ "fieldname": "ulButtonPressed", "fieldtype": "uint64_t"},
{ "fieldname": "ulButtonTouched", "fieldtype": "uint64_t"},
{ "fieldname": "rAxis", "fieldtype": "struct vr::VRControllerAxis_t [5]"}]}
-,{"struct": "vr::Compositor_OverlaySettings","fields": [
-{ "fieldname": "size", "fieldtype": "uint32_t"},
-{ "fieldname": "curved", "fieldtype": "_Bool"},
-{ "fieldname": "antialias", "fieldtype": "_Bool"},
-{ "fieldname": "scale", "fieldtype": "float"},
-{ "fieldname": "distance", "fieldtype": "float"},
-{ "fieldname": "alpha", "fieldtype": "float"},
-{ "fieldname": "uOffset", "fieldtype": "float"},
-{ "fieldname": "vOffset", "fieldtype": "float"},
-{ "fieldname": "uScale", "fieldtype": "float"},
-{ "fieldname": "vScale", "fieldtype": "float"},
-{ "fieldname": "gridDivs", "fieldtype": "float"},
-{ "fieldname": "gridWidth", "fieldtype": "float"},
-{ "fieldname": "gridScale", "fieldtype": "float"},
-{ "fieldname": "transform", "fieldtype": "struct vr::HmdMatrix44_t"}]}
,{"struct": "vr::VRBoneTransform_t","fields": [
{ "fieldname": "position", "fieldtype": "struct vr::HmdVector4_t"},
{ "fieldname": "orientation", "fieldtype": "struct vr::HmdQuaternionf_t"}]}
@@ -2006,6 +2031,9 @@
{ "fieldname": "m_HmdPose", "fieldtype": "vr::TrackedDevicePose_t"},
{ "fieldname": "m_nNumVSyncsReadyForUse", "fieldtype": "uint32_t"},
{ "fieldname": "m_nNumVSyncsToFirstView", "fieldtype": "uint32_t"}]}
+,{"struct": "vr::Compositor_BenchmarkResults","fields": [
+{ "fieldname": "m_flMegaPixelsPerSecond", "fieldtype": "float"},
+{ "fieldname": "m_flHmdRecommendedMegaPixelsPerSecond", "fieldtype": "float"}]}
,{"struct": "vr::DriverDirectMode_FrameTiming","fields": [
{ "fieldname": "m_nSize", "fieldtype": "uint32_t"},
{ "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"},
@@ -2069,10 +2097,19 @@
,{"struct": "vr::VROverlayIntersectionMaskPrimitive_t","fields": [
{ "fieldname": "m_nPrimitiveType", "fieldtype": "enum vr::EVROverlayIntersectionMaskPrimitiveType"},
{ "fieldname": "m_Primitive", "fieldtype": "VROverlayIntersectionMaskPrimitive_Data_t"}]}
-,{"struct": "vr::RenderModel_ComponentState_t","fields": [
-{ "fieldname": "mTrackingToComponentRenderModel", "fieldtype": "struct vr::HmdMatrix34_t"},
-{ "fieldname": "mTrackingToComponentLocal", "fieldtype": "struct vr::HmdMatrix34_t"},
-{ "fieldname": "uProperties", "fieldtype": "VRComponentProperties"}]}
+,{"struct": "vr::VROverlayView_t","fields": [
+{ "fieldname": "overlayHandle", "fieldtype": "VROverlayHandle_t"},
+{ "fieldname": "texture", "fieldtype": "struct vr::Texture_t"},
+{ "fieldname": "textureBounds", "fieldtype": "struct vr::VRTextureBounds_t"}]}
+,{"struct": "vr::VRVulkanDevice_t","fields": [
+{ "fieldname": "m_pInstance", "fieldtype": "struct VkInstance_T *"},
+{ "fieldname": "m_pDevice", "fieldtype": "struct VkDevice_T *"},
+{ "fieldname": "m_pPhysicalDevice", "fieldtype": "struct VkPhysicalDevice_T *"},
+{ "fieldname": "m_pQueue", "fieldtype": "struct VkQueue_T *"},
+{ "fieldname": "m_uQueueFamilyIndex", "fieldtype": "uint32_t"}]}
+,{"struct": "vr::VRNativeDevice_t","fields": [
+{ "fieldname": "handle", "fieldtype": "void *"},
+{ "fieldname": "eType", "fieldtype": "enum vr::EDeviceType"}]}
,{"struct": "vr::RenderModel_Vertex_t","fields": [
{ "fieldname": "vPosition", "fieldtype": "struct vr::HmdVector3_t"},
{ "fieldname": "vNormal", "fieldtype": "struct vr::HmdVector3_t"},
@@ -2127,7 +2164,8 @@
{ "fieldname": "rchDevicePathName", "fieldtype": "char [128]"},
{ "fieldname": "rchInputPathName", "fieldtype": "char [128]"},
{ "fieldname": "rchModeName", "fieldtype": "char [128]"},
-{ "fieldname": "rchSlotName", "fieldtype": "char [128]"}]}
+{ "fieldname": "rchSlotName", "fieldtype": "char [128]"},
+{ "fieldname": "rchInputSourceType", "fieldtype": "char [32]"}]}
,{"struct": "vr::VRActiveActionSet_t","fields": [
{ "fieldname": "ulActionSet", "fieldtype": "VRActionSetHandle_t"},
{ "fieldname": "ulRestrictedToDevice", "fieldtype": "VRInputValueHandle_t"},
@@ -2144,7 +2182,9 @@
{ "fieldname": "m_pVRChaperone", "fieldtype": "class vr::IVRChaperone *"},
{ "fieldname": "m_pVRChaperoneSetup", "fieldtype": "class vr::IVRChaperoneSetup *"},
{ "fieldname": "m_pVRCompositor", "fieldtype": "class vr::IVRCompositor *"},
+{ "fieldname": "m_pVRHeadsetView", "fieldtype": "class vr::IVRHeadsetView *"},
{ "fieldname": "m_pVROverlay", "fieldtype": "class vr::IVROverlay *"},
+{ "fieldname": "m_pVROverlayView", "fieldtype": "class vr::IVROverlayView *"},
{ "fieldname": "m_pVRResources", "fieldtype": "class vr::IVRResources *"},
{ "fieldname": "m_pVRRenderModels", "fieldtype": "class vr::IVRRenderModels *"},
{ "fieldname": "m_pVRExtendedDisplay", "fieldtype": "class vr::IVRExtendedDisplay *"},
@@ -3553,6 +3593,34 @@
"returntype": "void"
}
,{
+ "classname": "vr::IVRCompositor",
+ "methodname": "GetCompositorBenchmarkResults",
+ "returntype": "bool",
+ "params": [
+{ "paramname": "pBenchmarkResults" ,"paramtype": "struct vr::Compositor_BenchmarkResults *"},
+{ "paramname": "nSizeOfBenchmarkResults" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRCompositor",
+ "methodname": "GetLastPosePredictionIDs",
+ "returntype": "vr::EVRCompositorError",
+ "params": [
+{ "paramname": "pRenderPosePredictionID" ,"paramtype": "uint32_t *"},
+{ "paramname": "pGamePosePredictionID" ,"paramtype": "uint32_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVRCompositor",
+ "methodname": "GetPosesForFrame",
+ "returntype": "vr::EVRCompositorError",
+ "params": [
+{ "paramname": "unPosePredictionID" ,"paramtype": "uint32_t"},
+{ "paramname": "pPoseArray" ,"array_count": "unPoseArrayCount" ,"paramtype": "struct vr::TrackedDevicePose_t *"},
+{ "paramname": "unPoseArrayCount" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
"classname": "vr::IVROverlay",
"methodname": "FindOverlay",
"returntype": "vr::EVROverlayError",
@@ -3826,28 +3894,6 @@
}
,{
"classname": "vr::IVROverlay",
- "methodname": "GetOverlayRenderModel",
- "returntype": "uint32_t",
- "params": [
-{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
-{ "paramname": "pchValue" ,"out_string": " " ,"paramtype": "char *"},
-{ "paramname": "unBufferSize" ,"paramtype": "uint32_t"},
-{ "paramname": "pColor" ,"paramtype": "struct vr::HmdColor_t *"},
-{ "paramname": "pError" ,"paramtype": "vr::EVROverlayError *"}
- ]
-}
-,{
- "classname": "vr::IVROverlay",
- "methodname": "SetOverlayRenderModel",
- "returntype": "vr::EVROverlayError",
- "params": [
-{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
-{ "paramname": "pchRenderModel" ,"paramtype": "const char *"},
-{ "paramname": "pColor" ,"paramtype": "const struct vr::HmdColor_t *"}
- ]
-}
-,{
- "classname": "vr::IVROverlay",
"methodname": "GetOverlayTransformType",
"returntype": "vr::EVROverlayError",
"params": [
@@ -4055,28 +4101,6 @@
}
,{
"classname": "vr::IVROverlay",
- "methodname": "SetOverlayDualAnalogTransform",
- "returntype": "vr::EVROverlayError",
- "params": [
-{ "paramname": "ulOverlay" ,"paramtype": "vr::VROverlayHandle_t"},
-{ "paramname": "eWhich" ,"paramtype": "vr::EDualAnalogWhich"},
-{ "paramname": "pvCenter" ,"paramtype": "const struct vr::HmdVector2_t *"},
-{ "paramname": "fRadius" ,"paramtype": "float"}
- ]
-}
-,{
- "classname": "vr::IVROverlay",
- "methodname": "GetOverlayDualAnalogTransform",
- "returntype": "vr::EVROverlayError",
- "params": [
-{ "paramname": "ulOverlay" ,"paramtype": "vr::VROverlayHandle_t"},
-{ "paramname": "eWhich" ,"paramtype": "vr::EDualAnalogWhich"},
-{ "paramname": "pvCenter" ,"paramtype": "struct vr::HmdVector2_t *"},
-{ "paramname": "pfRadius" ,"paramtype": "float *"}
- ]
-}
-,{
- "classname": "vr::IVROverlay",
"methodname": "SetOverlayIntersectionMask",
"returntype": "vr::EVROverlayError",
"params": [
@@ -4258,10 +4282,10 @@
"params": [
{ "paramname": "eInputMode" ,"paramtype": "vr::EGamepadTextInputMode"},
{ "paramname": "eLineInputMode" ,"paramtype": "vr::EGamepadTextInputLineMode"},
+{ "paramname": "unFlags" ,"paramtype": "uint32_t"},
{ "paramname": "pchDescription" ,"paramtype": "const char *"},
{ "paramname": "unCharMax" ,"paramtype": "uint32_t"},
{ "paramname": "pchExistingText" ,"paramtype": "const char *"},
-{ "paramname": "bUseMinimalMode" ,"paramtype": "bool"},
{ "paramname": "uUserValue" ,"paramtype": "uint64_t"}
]
}
@@ -4273,10 +4297,10 @@
{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
{ "paramname": "eInputMode" ,"paramtype": "vr::EGamepadTextInputMode"},
{ "paramname": "eLineInputMode" ,"paramtype": "vr::EGamepadTextInputLineMode"},
+{ "paramname": "unFlags" ,"paramtype": "uint32_t"},
{ "paramname": "pchDescription" ,"paramtype": "const char *"},
{ "paramname": "unCharMax" ,"paramtype": "uint32_t"},
{ "paramname": "pchExistingText" ,"paramtype": "const char *"},
-{ "paramname": "bUseMinimalMode" ,"paramtype": "bool"},
{ "paramname": "uUserValue" ,"paramtype": "uint64_t"}
]
}
@@ -4331,6 +4355,109 @@
"returntype": "void"
}
,{
+ "classname": "vr::IVROverlayView",
+ "methodname": "AcquireOverlayView",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "pNativeDevice" ,"paramtype": "struct vr::VRNativeDevice_t *"},
+{ "paramname": "pOverlayView" ,"paramtype": "struct vr::VROverlayView_t *"},
+{ "paramname": "unOverlayViewSize" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlayView",
+ "methodname": "ReleaseOverlayView",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "pOverlayView" ,"paramtype": "struct vr::VROverlayView_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlayView",
+ "methodname": "PostOverlayEvent",
+ "returntype": "void",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "pvrEvent" ,"paramtype": "const struct vr::VREvent_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlayView",
+ "methodname": "IsViewingPermitted",
+ "returntype": "bool",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRHeadsetView",
+ "methodname": "SetHeadsetViewSize",
+ "returntype": "void",
+ "params": [
+{ "paramname": "nWidth" ,"paramtype": "uint32_t"},
+{ "paramname": "nHeight" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRHeadsetView",
+ "methodname": "GetHeadsetViewSize",
+ "returntype": "void",
+ "params": [
+{ "paramname": "pnWidth" ,"paramtype": "uint32_t *"},
+{ "paramname": "pnHeight" ,"paramtype": "uint32_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVRHeadsetView",
+ "methodname": "SetHeadsetViewMode",
+ "returntype": "void",
+ "params": [
+{ "paramname": "eHeadsetViewMode" ,"paramtype": "vr::HeadsetViewMode_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRHeadsetView",
+ "methodname": "GetHeadsetViewMode",
+ "returntype": "vr::HeadsetViewMode_t"
+}
+,{
+ "classname": "vr::IVRHeadsetView",
+ "methodname": "SetHeadsetViewCropped",
+ "returntype": "void",
+ "params": [
+{ "paramname": "bCropped" ,"paramtype": "bool"}
+ ]
+}
+,{
+ "classname": "vr::IVRHeadsetView",
+ "methodname": "GetHeadsetViewCropped",
+ "returntype": "bool"
+}
+,{
+ "classname": "vr::IVRHeadsetView",
+ "methodname": "GetHeadsetViewAspectRatio",
+ "returntype": "float"
+}
+,{
+ "classname": "vr::IVRHeadsetView",
+ "methodname": "SetHeadsetViewBlendRange",
+ "returntype": "void",
+ "params": [
+{ "paramname": "flStartPct" ,"paramtype": "float"},
+{ "paramname": "flEndPct" ,"paramtype": "float"}
+ ]
+}
+,{
+ "classname": "vr::IVRHeadsetView",
+ "methodname": "GetHeadsetViewBlendRange",
+ "returntype": "void",
+ "params": [
+{ "paramname": "pStartPct" ,"paramtype": "float *"},
+{ "paramname": "pEndPct" ,"paramtype": "float *"}
+ ]
+}
+,{
"classname": "vr::IVRRenderModels",
"methodname": "LoadRenderModel_Async",
"returntype": "vr::EVRRenderModelError",
@@ -4870,6 +4997,22 @@
}
,{
"classname": "vr::IVRInput",
+ "methodname": "GetDominantHand",
+ "returntype": "vr::EVRInputError",
+ "params": [
+{ "paramname": "peDominantHand" ,"paramtype": "vr::ETrackedControllerRole *"}
+ ]
+}
+,{
+ "classname": "vr::IVRInput",
+ "methodname": "SetDominantHand",
+ "returntype": "vr::EVRInputError",
+ "params": [
+{ "paramname": "eDominantHand" ,"paramtype": "vr::ETrackedControllerRole"}
+ ]
+}
+,{
+ "classname": "vr::IVRInput",
"methodname": "GetBoneCount",
"returntype": "vr::EVRInputError",
"params": [
@@ -5044,6 +5187,19 @@
}
,{
"classname": "vr::IVRInput",
+ "methodname": "GetComponentStateForBinding",
+ "returntype": "vr::EVRInputError",
+ "params": [
+{ "paramname": "pchRenderModelName" ,"paramtype": "const char *"},
+{ "paramname": "pchComponentName" ,"paramtype": "const char *"},
+{ "paramname": "pOriginInfo" ,"paramtype": "const struct vr::InputBindingInfo_t *"},
+{ "paramname": "unBindingInfoSize" ,"paramtype": "uint32_t"},
+{ "paramname": "unBindingInfoCount" ,"paramtype": "uint32_t"},
+{ "paramname": "pComponentState" ,"paramtype": "vr::RenderModel_ComponentState_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVRInput",
"methodname": "IsUsingLegacyInput",
"returntype": "bool"
}
@@ -5059,6 +5215,16 @@
]
}
,{
+ "classname": "vr::IVRInput",
+ "methodname": "GetBindingVariant",
+ "returntype": "vr::EVRInputError",
+ "params": [
+{ "paramname": "ulDevicePath" ,"paramtype": "vr::VRInputValueHandle_t"},
+{ "paramname": "pchVariantArray" ,"out_string": " " ,"paramtype": "char *"},
+{ "paramname": "unVariantArraySize" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
"classname": "vr::IVRIOBuffer",
"methodname": "Open",
"returntype": "vr::EIOBufferError",
diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h
index c636d53..6feb2c6 100644
--- a/headers/openvr_capi.h
+++ b/headers/openvr_capi.h
@@ -78,6 +78,7 @@ static const unsigned int k_unUint64PropertyTag = 3;
static const unsigned int k_unBoolPropertyTag = 4;
static const unsigned int k_unStringPropertyTag = 5;
static const unsigned int k_unErrorPropertyTag = 6;
+static const unsigned int k_unDoublePropertyTag = 7;
static const unsigned int k_unHmdMatrix34PropertyTag = 20;
static const unsigned int k_unHmdMatrix44PropertyTag = 21;
static const unsigned int k_unHmdVector3PropertyTag = 22;
@@ -113,12 +114,17 @@ static const char * k_pch_MimeType_GameTheater = "vr/game_theater";
static const char * IVRApplications_Version = "IVRApplications_007";
static const char * IVRChaperone_Version = "IVRChaperone_003";
static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_006";
-static const char * IVRCompositor_Version = "IVRCompositor_024";
+static const char * IVRCompositor_Version = "IVRCompositor_026";
static const unsigned int k_unVROverlayMaxKeyLength = 128;
static const unsigned int k_unVROverlayMaxNameLength = 128;
static const unsigned int k_unMaxOverlayCount = 128;
static const unsigned int k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
-static const char * IVROverlay_Version = "IVROverlay_022";
+static const char * IVROverlay_Version = "IVROverlay_024";
+static const char * IVROverlayView_Version = "IVROverlayView_003";
+static const unsigned int k_unHeadsetViewMaxWidth = 3840;
+static const unsigned int k_unHeadsetViewMaxHeight = 2160;
+static const char * k_pchHeadsetViewOverlayKey = "system.HeadsetView";
+static const char * IVRHeadsetView_Version = "IVRHeadsetView_001";
static const char * k_pch_Controller_Component_GDC2015 = "gdc2015";
static const char * k_pch_Controller_Component_Base = "base";
static const char * k_pch_Controller_Component_Tip = "tip";
@@ -196,6 +202,8 @@ static const char * k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorG
static const char * k_pch_SteamVR_CustomIconStyle_String = "customIconStyle";
static const char * k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle";
static const char * k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate";
+static const char * k_pch_SteamVR_AllowGlobalActionSetPriority = "globalActionSetPriority";
+static const char * k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2";
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";
@@ -293,13 +301,13 @@ static const char * k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositor
static const char * k_pch_Dashboard_Section = "dashboard";
static const char * k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
static const char * k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
-static const char * k_pch_Dashboard_UseWebKeyboard = "useWebKeyboard";
static const char * k_pch_Dashboard_UseWebSettings = "useWebSettings";
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_modelskin_Section = "modelskins";
static const char * k_pch_Driver_Enable_Bool = "enable";
+static const char * k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode";
static const char * k_pch_Driver_LoadPriority_Int32 = "loadPriority";
static const char * k_pch_WebInterface_Section = "WebInterface";
static const char * k_pch_VRWebHelper_Section = "VRWebHelper";
@@ -307,9 +315,12 @@ static const char * k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled";
static const char * k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort";
static const char * k_pch_TrackingOverride_Section = "TrackingOverrides";
static const char * k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL";
+static const char * k_pch_App_BindingLegacyAPISuffix_String = "_legacy";
+static const char * k_pch_App_BindingSteamVRInputAPISuffix_String = "_steamvrinput";
static const char * k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL";
static const char * k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
static const char * k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
+static const char * k_pch_App_DominantHand_Int32 = "DominantHand";
static const char * k_pch_Trackers_Section = "trackers";
static const char * k_pch_DesktopUI_Section = "DesktopUI";
static const char * k_pch_LastKnown_Section = "LastKnown";
@@ -328,7 +339,10 @@ static const unsigned int k_unMaxActionNameLength = 64;
static const unsigned int k_unMaxActionSetNameLength = 64;
static const unsigned int k_unMaxActionOriginCount = 16;
static const unsigned int k_unMaxBoneNameLength = 32;
-static const char * IVRInput_Version = "IVRInput_007";
+static const int k_nActionSetOverlayGlobalPriorityMin = 16777216;
+static const int k_nActionSetOverlayGlobalPriorityMax = 33554431;
+static const int k_nActionSetPriorityReservedMin = 33554432;
+static const char * IVRInput_Version = "IVRInput_010";
static const unsigned long k_ulInvalidIOBufferHandle = 0;
static const char * IVRIOBuffer_Version = "IVRIOBuffer_002";
static const unsigned int k_ulInvalidSpatialAnchorHandle = 0;
@@ -548,7 +562,6 @@ typedef enum ETrackedDeviceProperty
ETrackedDeviceProperty_Prop_DisplaySupportsAnalogGain_Bool = 2085,
ETrackedDeviceProperty_Prop_DisplayMinAnalogGain_Float = 2086,
ETrackedDeviceProperty_Prop_DisplayMaxAnalogGain_Float = 2087,
- ETrackedDeviceProperty_Prop_DashboardLayoutPathName_String = 2090,
ETrackedDeviceProperty_Prop_DashboardScale_Float = 2091,
ETrackedDeviceProperty_Prop_IpdUIRangeMinMeters_Float = 2100,
ETrackedDeviceProperty_Prop_IpdUIRangeMaxMeters_Float = 2101,
@@ -646,6 +659,7 @@ typedef enum EVRSubmitFlags
EVRSubmitFlags_Submit_Reserved = 4,
EVRSubmitFlags_Submit_TextureWithPose = 8,
EVRSubmitFlags_Submit_TextureWithDepth = 16,
+ EVRSubmitFlags_Submit_FrameDiscontinuty = 32,
} EVRSubmitFlags;
typedef enum EVRState
@@ -682,14 +696,7 @@ typedef enum EVREventType
EVREventType_VREvent_ButtonUnpress = 201,
EVREventType_VREvent_ButtonTouch = 202,
EVREventType_VREvent_ButtonUntouch = 203,
- EVREventType_VREvent_DualAnalog_Press = 250,
- EVREventType_VREvent_DualAnalog_Unpress = 251,
- EVREventType_VREvent_DualAnalog_Touch = 252,
- EVREventType_VREvent_DualAnalog_Untouch = 253,
- EVREventType_VREvent_DualAnalog_Move = 254,
- EVREventType_VREvent_DualAnalog_ModeSwitch1 = 255,
- EVREventType_VREvent_DualAnalog_ModeSwitch2 = 256,
- EVREventType_VREvent_DualAnalog_Cancel = 257,
+ EVREventType_VREvent_Modal_Cancel = 257,
EVREventType_VREvent_MouseMove = 300,
EVREventType_VREvent_MouseButtonDown = 301,
EVREventType_VREvent_MouseButtonUp = 302,
@@ -700,6 +707,8 @@ typedef enum EVREventType
EVREventType_VREvent_OverlayFocusChanged = 307,
EVREventType_VREvent_ReloadOverlays = 308,
EVREventType_VREvent_ScrollSmooth = 309,
+ EVREventType_VREvent_LockMousePosition = 310,
+ EVREventType_VREvent_UnlockMousePosition = 311,
EVREventType_VREvent_InputFocusCaptured = 400,
EVREventType_VREvent_InputFocusReleased = 401,
EVREventType_VREvent_SceneApplicationChanged = 404,
@@ -871,12 +880,6 @@ typedef enum EVRMouseButton
EVRMouseButton_VRMouseButton_Middle = 4,
} EVRMouseButton;
-typedef enum EDualAnalogWhich
-{
- EDualAnalogWhich_k_EDualAnalog_Left = 0,
- EDualAnalogWhich_k_EDualAnalog_Right = 1,
-} EDualAnalogWhich;
-
typedef enum EShowUIType
{
EShowUIType_ShowUI_ControllerBinding = 0,
@@ -885,6 +888,7 @@ typedef enum EShowUIType
EShowUIType_ShowUI_Settings = 4,
EShowUIType_ShowUI_DebugCommands = 5,
EShowUIType_ShowUI_FullControllerBinding = 6,
+ EShowUIType_ShowUI_ManageDrivers = 7,
} EShowUIType;
typedef enum EHDCPError
@@ -896,6 +900,16 @@ typedef enum EHDCPError
EHDCPError_HDCPError_Unknown = 4,
} EHDCPError;
+typedef enum EVRComponentProperty
+{
+ EVRComponentProperty_VRComponentProperty_IsStatic = 1,
+ EVRComponentProperty_VRComponentProperty_IsVisible = 2,
+ EVRComponentProperty_VRComponentProperty_IsTouched = 4,
+ EVRComponentProperty_VRComponentProperty_IsPressed = 8,
+ EVRComponentProperty_VRComponentProperty_IsScrolled = 16,
+ EVRComponentProperty_VRComponentProperty_IsHighlighted = 32,
+} EVRComponentProperty;
+
typedef enum EVRInputError
{
EVRInputError_VRInputError_None = 0,
@@ -916,6 +930,9 @@ typedef enum EVRInputError
EVRInputError_VRInputError_MismatchedActionManifest = 15,
EVRInputError_VRInputError_MissingSkeletonData = 16,
EVRInputError_VRInputError_InvalidBoneIndex = 17,
+ EVRInputError_VRInputError_InvalidPriority = 18,
+ EVRInputError_VRInputError_PermissionDenied = 19,
+ EVRInputError_VRInputError_InvalidRenderModel = 20,
} EVRInputError;
typedef enum EVRSpatialAnchorError
@@ -1196,7 +1213,7 @@ typedef enum EVRInitError
EVRInitError_VRInitError_Compositor_CreateFallbackSyncTexture = 477,
EVRInitError_VRInitError_Compositor_ShareFallbackSyncTexture = 478,
EVRInitError_VRInitError_Compositor_CreateOverlayIndexBuffer = 479,
- EVRInitError_VRInitError_Compositor_CreateOverlayVertextBuffer = 480,
+ EVRInitError_VRInitError_Compositor_CreateOverlayVertexBuffer = 480,
EVRInitError_VRInitError_Compositor_CreateTextVertexBuffer = 481,
EVRInitError_VRInitError_Compositor_CreateTextIndexBuffer = 482,
EVRInitError_VRInitError_Compositor_CreateMirrorTextures = 483,
@@ -1204,6 +1221,9 @@ typedef enum EVRInitError
EVRInitError_VRInitError_Compositor_CreateMirrorOverlay = 485,
EVRInitError_VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486,
EVRInitError_VRInitError_Compositor_DisplayModeNotSupported = 487,
+ EVRInitError_VRInitError_Compositor_CreateOverlayInvalidCall = 488,
+ EVRInitError_VRInitError_Compositor_CreateOverlayAlreadyInitialized = 489,
+ EVRInitError_VRInitError_Compositor_FailedToCreateMailbox = 490,
EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
EVRInitError_VRInitError_VendorSpecific_WindowsNotInDevMode = 1001,
EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101,
@@ -1417,7 +1437,6 @@ typedef enum VROverlayInputMethod
{
VROverlayInputMethod_None = 0,
VROverlayInputMethod_Mouse = 1,
- VROverlayInputMethod_DualAnalog = 2,
} VROverlayInputMethod;
typedef enum VROverlayTransformType
@@ -1430,6 +1449,7 @@ typedef enum VROverlayTransformType
VROverlayTransformType_VROverlayTransform_Cursor = 4,
VROverlayTransformType_VROverlayTransform_DashboardTab = 5,
VROverlayTransformType_VROverlayTransform_DashboardThumb = 6,
+ VROverlayTransformType_VROverlayTransform_Mountable = 7,
} VROverlayTransformType;
typedef enum VROverlayFlags
@@ -1449,6 +1469,8 @@ typedef enum VROverlayFlags
VROverlayFlags_SendVRSmoothScrollEvents = 131072,
VROverlayFlags_ProtectedContent = 262144,
VROverlayFlags_HideLaserIntersection = 524288,
+ VROverlayFlags_WantsModalBehavior = 1048576,
+ VROverlayFlags_IsPremultiplied = 2097152,
} VROverlayFlags;
typedef enum VRMessageOverlayResponse
@@ -1481,6 +1503,26 @@ typedef enum EVROverlayIntersectionMaskPrimitiveType
EVROverlayIntersectionMaskPrimitiveType_OverlayIntersectionPrimitiveType_Circle = 1,
} EVROverlayIntersectionMaskPrimitiveType;
+typedef enum EKeyboardFlags
+{
+ EKeyboardFlags_KeyboardFlag_Minimal = 1,
+ EKeyboardFlags_KeyboardFlag_Modal = 2,
+} EKeyboardFlags;
+
+typedef enum EDeviceType
+{
+ EDeviceType_DeviceType_Invalid = -1,
+ EDeviceType_DeviceType_DirectX11 = 0,
+ EDeviceType_DeviceType_Vulkan = 1,
+} EDeviceType;
+
+typedef enum HeadsetViewMode_t
+{
+ HeadsetViewMode_t_HeadsetViewMode_Left = 0,
+ HeadsetViewMode_t_HeadsetViewMode_Right = 1,
+ HeadsetViewMode_t_HeadsetViewMode_Both = 2,
+} HeadsetViewMode_t;
+
typedef enum EVRRenderModelError
{
EVRRenderModelError_VRRenderModelError_None = 0,
@@ -1498,15 +1540,6 @@ typedef enum EVRRenderModelError
EVRRenderModelError_VRRenderModelError_InvalidTexture = 400,
} EVRRenderModelError;
-typedef enum EVRComponentProperty
-{
- EVRComponentProperty_VRComponentProperty_IsStatic = 1,
- EVRComponentProperty_VRComponentProperty_IsVisible = 2,
- EVRComponentProperty_VRComponentProperty_IsTouched = 4,
- EVRComponentProperty_VRComponentProperty_IsPressed = 8,
- EVRComponentProperty_VRComponentProperty_IsScrolled = 16,
-} EVRComponentProperty;
-
typedef enum EVRNotificationType
{
EVRNotificationType_Transient = 0,
@@ -1641,11 +1674,11 @@ typedef PropertyContainerHandle_t DriverHandle_t;
typedef uint64_t VRActionHandle_t;
typedef uint64_t VRActionSetHandle_t;
typedef uint64_t VRInputValueHandle_t;
+typedef uint32_t VRComponentProperties;
typedef uint64_t VROverlayHandle_t;
typedef int32_t BoneIndex_t;
typedef uint64_t TrackedCameraHandle_t;
typedef uint32_t ScreenshotHandle_t;
-typedef uint32_t VRComponentProperties;
typedef int32_t TextureID_t;
typedef uint32_t VRNotificationId;
typedef uint64_t IOBufferHandle_t;
@@ -1939,15 +1972,6 @@ typedef struct VREvent_Property_t
enum ETrackedDeviceProperty prop;
} VREvent_Property_t;
-typedef struct VREvent_DualAnalog_t
-{
- float x;
- float y;
- float transformedX;
- float transformedY;
- enum EDualAnalogWhich which;
-} VREvent_DualAnalog_t;
-
typedef struct VREvent_HapticVibration_t
{
uint64_t containerHandle;
@@ -2008,6 +2032,13 @@ typedef struct VREvent_HDCPError_t
enum EHDCPError eCode;
} VREvent_HDCPError_t;
+typedef struct RenderModel_ComponentState_t
+{
+ struct HmdMatrix34_t mTrackingToComponentRenderModel;
+ struct HmdMatrix34_t mTrackingToComponentLocal;
+ VRComponentProperties uProperties;
+} RenderModel_ComponentState_t;
+
typedef struct HiddenAreaMesh_t
{
struct HmdVector2_t * pVertexData; // const struct vr::HmdVector2_t *
@@ -2028,24 +2059,6 @@ typedef struct VRControllerState_t
struct VRControllerAxis_t rAxis[5]; //struct vr::VRControllerAxis_t[5]
} VRControllerState_t;
-typedef struct Compositor_OverlaySettings
-{
- uint32_t size;
- bool curved;
- bool antialias;
- float scale;
- float distance;
- float alpha;
- float uOffset;
- float vOffset;
- float uScale;
- float vScale;
- float gridDivs;
- float gridWidth;
- float gridScale;
- struct HmdMatrix44_t transform;
-} Compositor_OverlaySettings;
-
typedef struct VRBoneTransform_t
{
struct HmdVector4_t position;
@@ -2093,6 +2106,12 @@ typedef struct Compositor_FrameTiming
uint32_t m_nNumVSyncsToFirstView;
} Compositor_FrameTiming;
+typedef struct Compositor_BenchmarkResults
+{
+ float m_flMegaPixelsPerSecond;
+ float m_flHmdRecommendedMegaPixelsPerSecond;
+} Compositor_BenchmarkResults;
+
typedef struct DriverDirectMode_FrameTiming
{
uint32_t m_nSize;
@@ -2177,12 +2196,27 @@ typedef struct IntersectionMaskCircle_t
float m_flRadius;
} IntersectionMaskCircle_t;
-typedef struct RenderModel_ComponentState_t
+typedef struct VROverlayView_t
{
- struct HmdMatrix34_t mTrackingToComponentRenderModel;
- struct HmdMatrix34_t mTrackingToComponentLocal;
- VRComponentProperties uProperties;
-} RenderModel_ComponentState_t;
+ VROverlayHandle_t overlayHandle;
+ struct Texture_t texture;
+ struct VRTextureBounds_t textureBounds;
+} VROverlayView_t;
+
+typedef struct VRVulkanDevice_t
+{
+ struct VkInstance_T * m_pInstance; // struct VkInstance_T *
+ struct VkDevice_T * m_pDevice; // struct VkDevice_T *
+ struct VkPhysicalDevice_T * m_pPhysicalDevice; // struct VkPhysicalDevice_T *
+ struct VkQueue_T * m_pQueue; // struct VkQueue_T *
+ uint32_t m_uQueueFamilyIndex;
+} VRVulkanDevice_t;
+
+typedef struct VRNativeDevice_t
+{
+ void * handle; // void *
+ enum EDeviceType eType;
+} VRNativeDevice_t;
typedef struct RenderModel_Vertex_t
{
@@ -2285,6 +2319,7 @@ typedef struct InputBindingInfo_t
char rchInputPathName[128]; //char[128]
char rchModeName[128]; //char[128]
char rchSlotName[128]; //char[128]
+ char rchInputSourceType[32]; //char[32]
} InputBindingInfo_t;
typedef struct VRActiveActionSet_t
@@ -2313,7 +2348,9 @@ typedef struct COpenVRContext
intptr_t m_pVRChaperone; // class vr::IVRChaperone *
intptr_t m_pVRChaperoneSetup; // class vr::IVRChaperoneSetup *
intptr_t m_pVRCompositor; // class vr::IVRCompositor *
+ intptr_t m_pVRHeadsetView; // class vr::IVRHeadsetView *
intptr_t m_pVROverlay; // class vr::IVROverlay *
+ intptr_t m_pVROverlayView; // class vr::IVROverlayView *
intptr_t m_pVRResources; // class vr::IVRResources *
intptr_t m_pVRRenderModels; // class vr::IVRRenderModels *
intptr_t m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay *
@@ -2352,7 +2389,6 @@ typedef union
VREvent_EditingCameraSurface_t cameraSurface;
VREvent_MessageOverlay_t messageOverlay;
VREvent_Property_t property;
- VREvent_DualAnalog_t dualAnalog;
VREvent_HapticVibration_t hapticVibration;
VREvent_WebConsole_t webConsole;
VREvent_InputBindingLoad_t inputBinding;
@@ -2592,6 +2628,9 @@ struct VR_IVRCompositor_FnTable
bool (OPENVR_FNTABLE_CALLTYPE *IsCurrentSceneFocusAppLoading)();
EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SetStageOverride_Async)(char * pchRenderModelPath, struct HmdMatrix34_t * pTransform, struct Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings);
void (OPENVR_FNTABLE_CALLTYPE *ClearStageOverride)();
+ bool (OPENVR_FNTABLE_CALLTYPE *GetCompositorBenchmarkResults)(struct Compositor_BenchmarkResults * pBenchmarkResults, uint32_t nSizeOfBenchmarkResults);
+ EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetLastPosePredictionIDs)(uint32_t * pRenderPosePredictionID, uint32_t * pGamePosePredictionID);
+ EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetPosesForFrame)(uint32_t unPosePredictionID, struct TrackedDevicePose_t * pPoseArray, uint32_t unPoseArrayCount);
};
struct VR_IVROverlay_FnTable
@@ -2625,8 +2664,6 @@ struct VR_IVROverlay_FnTable
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, struct VRTextureBounds_t * pOverlayTextureBounds);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, struct VRTextureBounds_t * pOverlayTextureBounds);
- uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayRenderModel)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, struct HmdColor_t * pColor, EVROverlayError * pError);
- EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRenderModel)(VROverlayHandle_t ulOverlayHandle, char * pchRenderModel, struct HmdColor_t * pColor);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformType)(VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform);
@@ -2649,8 +2686,6 @@ struct VR_IVROverlay_FnTable
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvecMouseScale);
bool (OPENVR_FNTABLE_CALLTYPE *ComputeOverlayIntersection)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionParams_t * pParams, struct VROverlayIntersectionResults_t * pResults);
bool (OPENVR_FNTABLE_CALLTYPE *IsHoverTargetOverlay)(VROverlayHandle_t ulOverlayHandle);
- EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, struct HmdVector2_t * pvCenter, float fRadius);
- EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, struct HmdVector2_t * pvCenter, float * pfRadius);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayIntersectionMask)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *TriggerLaserMouseHapticVibration)(VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayCursor)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle);
@@ -2670,8 +2705,8 @@ struct VR_IVROverlay_FnTable
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId);
void (OPENVR_FNTABLE_CALLTYPE *ShowDashboard)(char * pchOverlayToShow);
TrackedDeviceIndex_t (OPENVR_FNTABLE_CALLTYPE *GetPrimaryDashboardDevice)();
- EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowKeyboard)(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, char * pchDescription, uint32_t unCharMax, char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue);
- EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowKeyboardForOverlay)(VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, char * pchDescription, uint32_t unCharMax, char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowKeyboard)(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, char * pchDescription, uint32_t unCharMax, char * pchExistingText, uint64_t uUserValue);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowKeyboardForOverlay)(VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, char * pchDescription, uint32_t unCharMax, char * pchExistingText, uint64_t uUserValue);
uint32_t (OPENVR_FNTABLE_CALLTYPE *GetKeyboardText)(char * pchText, uint32_t cchText);
void (OPENVR_FNTABLE_CALLTYPE *HideKeyboard)();
void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform);
@@ -2680,6 +2715,27 @@ struct VR_IVROverlay_FnTable
void (OPENVR_FNTABLE_CALLTYPE *CloseMessageOverlay)();
};
+struct VR_IVROverlayView_FnTable
+{
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *AcquireOverlayView)(VROverlayHandle_t ulOverlayHandle, struct VRNativeDevice_t * pNativeDevice, struct VROverlayView_t * pOverlayView, uint32_t unOverlayViewSize);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ReleaseOverlayView)(struct VROverlayView_t * pOverlayView);
+ void (OPENVR_FNTABLE_CALLTYPE *PostOverlayEvent)(VROverlayHandle_t ulOverlayHandle, struct VREvent_t * pvrEvent);
+ bool (OPENVR_FNTABLE_CALLTYPE *IsViewingPermitted)(VROverlayHandle_t ulOverlayHandle);
+};
+
+struct VR_IVRHeadsetView_FnTable
+{
+ void (OPENVR_FNTABLE_CALLTYPE *SetHeadsetViewSize)(uint32_t nWidth, uint32_t nHeight);
+ void (OPENVR_FNTABLE_CALLTYPE *GetHeadsetViewSize)(uint32_t * pnWidth, uint32_t * pnHeight);
+ void (OPENVR_FNTABLE_CALLTYPE *SetHeadsetViewMode)(HeadsetViewMode_t eHeadsetViewMode);
+ HeadsetViewMode_t (OPENVR_FNTABLE_CALLTYPE *GetHeadsetViewMode)();
+ void (OPENVR_FNTABLE_CALLTYPE *SetHeadsetViewCropped)(bool bCropped);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetHeadsetViewCropped)();
+ float (OPENVR_FNTABLE_CALLTYPE *GetHeadsetViewAspectRatio)();
+ void (OPENVR_FNTABLE_CALLTYPE *SetHeadsetViewBlendRange)(float flStartPct, float flEndPct);
+ void (OPENVR_FNTABLE_CALLTYPE *GetHeadsetViewBlendRange)(float * pStartPct, float * pEndPct);
+};
+
struct VR_IVRRenderModels_FnTable
{
EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadRenderModel_Async)(char * pchRenderModelName, struct RenderModel_t ** ppRenderModel);
@@ -2761,6 +2817,8 @@ struct VR_IVRInput_FnTable
EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetPoseActionDataRelativeToNow)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, struct InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice);
EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetPoseActionDataForNextFrame)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, struct InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice);
EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalActionData)(VRActionHandle_t action, struct InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize);
+ EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetDominantHand)(ETrackedControllerRole * peDominantHand);
+ EVRInputError (OPENVR_FNTABLE_CALLTYPE *SetDominantHand)(ETrackedControllerRole eDominantHand);
EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneCount)(VRActionHandle_t action, uint32_t * pBoneCount);
EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneHierarchy)(VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount);
EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneName)(VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize);
@@ -2777,8 +2835,10 @@ struct VR_IVRInput_FnTable
EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetActionBindingInfo)(VRActionHandle_t action, struct InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount);
EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle);
EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowBindingsForActionSet)(struct VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight);
+ EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetComponentStateForBinding)(char * pchRenderModelName, char * pchComponentName, struct InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, RenderModel_ComponentState_t * pComponentState);
bool (OPENVR_FNTABLE_CALLTYPE *IsUsingLegacyInput)();
EVRInputError (OPENVR_FNTABLE_CALLTYPE *OpenBindingUI)(char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop);
+ EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBindingVariant)(VRInputValueHandle_t ulDevicePath, char * pchVariantArray, uint32_t unVariantArraySize);
};
struct VR_IVRIOBuffer_FnTable
diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h
index 4d9fe6a..e2a757c 100644
--- a/headers/openvr_driver.h
+++ b/headers/openvr_driver.h
@@ -15,8 +15,8 @@
namespace vr
{
static const uint32_t k_nSteamVRVersionMajor = 1;
- static const uint32_t k_nSteamVRVersionMinor = 9;
- static const uint32_t k_nSteamVRVersionBuild = 16;
+ static const uint32_t k_nSteamVRVersionMinor = 10;
+ static const uint32_t k_nSteamVRVersionBuild = 30;
} // namespace vr
// vrtypes.h
@@ -206,7 +206,7 @@ enum ETrackedControllerRole
TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand
TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand
TrackedControllerRole_OptOut = 3, // Tracked device is opting out of left/right hand selection
- TrackedControllerRole_Treadmill = 4, // Tracked device is a treadmill
+ TrackedControllerRole_Treadmill = 4, // Tracked device is a treadmill or other locomotion device
TrackedControllerRole_Stylus = 5, // Tracked device is a stylus
TrackedControllerRole_Max = 5
};
@@ -278,6 +278,7 @@ static const PropertyTypeTag_t k_unUint64PropertyTag = 3;
static const PropertyTypeTag_t k_unBoolPropertyTag = 4;
static const PropertyTypeTag_t k_unStringPropertyTag = 5;
static const PropertyTypeTag_t k_unErrorPropertyTag = 6;
+static const PropertyTypeTag_t k_unDoublePropertyTag = 7;
static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20;
static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21;
@@ -450,7 +451,7 @@ enum ETrackedDeviceProperty
Prop_DisplayMinAnalogGain_Float = 2086,
Prop_DisplayMaxAnalogGain_Float = 2087,
- Prop_DashboardLayoutPathName_String = 2090,
+ // Prop_DashboardLayoutPathName_String = 2090, // DELETED
Prop_DashboardScale_Float = 2091,
Prop_IpdUIRangeMinMeters_Float = 2100,
Prop_IpdUIRangeMaxMeters_Float = 2101,
@@ -629,6 +630,10 @@ enum EVRSubmitFlags
// Set to indicate that pTexture is a pointer to a VRTextureWithDepth_t.
// This flag can be combined with Submit_TextureWithPose to pass a VRTextureWithPoseAndDepth_t.
Submit_TextureWithDepth = 0x10,
+
+ // Set to indicate a discontinuity between this and the last frame.
+ // This will prevent motion smoothing from attempting to extrapolate using the pair.
+ Submit_FrameDiscontinuty = 0x20,
};
/** Data required for passing Vulkan textures to IVRCompositor::Submit.
@@ -693,14 +698,14 @@ enum EVREventType
VREvent_ButtonTouch = 202, // data is controller
VREvent_ButtonUntouch = 203, // data is controller
- VREvent_DualAnalog_Press = 250, // data is dualAnalog
- VREvent_DualAnalog_Unpress = 251, // data is dualAnalog
- VREvent_DualAnalog_Touch = 252, // data is dualAnalog
- VREvent_DualAnalog_Untouch = 253, // data is dualAnalog
- VREvent_DualAnalog_Move = 254, // data is dualAnalog
- VREvent_DualAnalog_ModeSwitch1 = 255, // data is dualAnalog
- VREvent_DualAnalog_ModeSwitch2 = 256, // data is dualAnalog
- VREvent_DualAnalog_Cancel = 257, // data is dualAnalog
+ // VREvent_DualAnalog_Press = 250, // No longer sent
+ // VREvent_DualAnalog_Unpress = 251, // No longer sent
+ // VREvent_DualAnalog_Touch = 252, // No longer sent
+ // VREvent_DualAnalog_Untouch = 253, // No longer sent
+ // 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_MouseMove = 300, // data is mouse
VREvent_MouseButtonDown = 301, // data is mouse
@@ -712,6 +717,8 @@ enum EVREventType
VREvent_OverlayFocusChanged = 307, // data is overlay, global event
VREvent_ReloadOverlays = 308,
VREvent_ScrollSmooth = 309, // data is scroll
+ VREvent_LockMousePosition = 310,
+ VREvent_UnlockMousePosition = 311,
VREvent_InputFocusCaptured = 400, // data is process DEPRECATED
VREvent_InputFocusReleased = 401, // data is process DEPRECATED
@@ -1092,19 +1099,6 @@ struct VREvent_Property_t
ETrackedDeviceProperty prop;
};
-enum EDualAnalogWhich
-{
- k_EDualAnalog_Left = 0,
- k_EDualAnalog_Right = 1,
-};
-
-struct VREvent_DualAnalog_t
-{
- float x, y; // coordinates are -1..1 analog values
- float transformedX, transformedY; // transformed by the center and radius numbers provided by the overlay
- EDualAnalogWhich which;
-};
-
struct VREvent_HapticVibration_t
{
uint64_t containerHandle; // property container handle of the device with the haptic component
@@ -1159,6 +1153,7 @@ enum EShowUIType
ShowUI_Settings = 4,
ShowUI_DebugCommands = 5,
ShowUI_FullControllerBinding = 6,
+ ShowUI_ManageDrivers = 7,
};
struct VREvent_ShowUI_t
@@ -1207,7 +1202,6 @@ typedef union
VREvent_EditingCameraSurface_t cameraSurface;
VREvent_MessageOverlay_t messageOverlay;
VREvent_Property_t property;
- VREvent_DualAnalog_t dualAnalog;
VREvent_HapticVibration_t hapticVibration;
VREvent_WebConsole_t webConsole;
VREvent_InputBindingLoad_t inputBinding;
@@ -1241,6 +1235,28 @@ struct VREvent_t
#pragma pack( pop )
#endif
+typedef uint32_t VRComponentProperties;
+
+enum EVRComponentProperty
+{
+ VRComponentProperty_IsStatic = (1 << 0),
+ VRComponentProperty_IsVisible = (1 << 1),
+ VRComponentProperty_IsTouched = (1 << 2),
+ VRComponentProperty_IsPressed = (1 << 3),
+ VRComponentProperty_IsScrolled = (1 << 4),
+ VRComponentProperty_IsHighlighted = (1 << 5),
+};
+
+
+/** Describes state information about a render-model component, including transforms and other dynamic properties */
+struct RenderModel_ComponentState_t
+{
+ HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model
+ HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface )
+ VRComponentProperties uProperties;
+};
+
+
enum EVRInputError
{
VRInputError_None = 0,
@@ -1261,6 +1277,9 @@ enum EVRInputError
VRInputError_MismatchedActionManifest = 15,
VRInputError_MissingSkeletonData = 16,
VRInputError_InvalidBoneIndex = 17,
+ VRInputError_InvalidPriority = 18,
+ VRInputError_PermissionDenied = 19,
+ VRInputError_InvalidRenderModel = 20,
};
enum EVRSpatialAnchorError
@@ -1377,17 +1396,6 @@ enum ECollisionBoundsStyle
COLLISION_BOUNDS_STYLE_COUNT
};
-/** Allows the application to customize how the overlay appears in the compositor */
-struct Compositor_OverlaySettings
-{
- uint32_t size; // sizeof(Compositor_OverlaySettings)
- bool curved, antialias;
- float scale, distance, alpha;
- float uOffset, vOffset, uScale, vScale;
- float gridDivs, gridWidth, gridScale;
- HmdMatrix44_t transform;
-};
-
/** used to refer to a single VR overlay */
typedef uint64_t VROverlayHandle_t;
@@ -1486,11 +1494,11 @@ enum EVRSkeletalTrackingLevel
// 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,
+ VRSkeletalTracking_Partial = 1,
// 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,
+ VRSkeletalTracking_Full = 2,
VRSkeletalTrackingLevel_Count,
VRSkeletalTrackingLevel_Max = VRSkeletalTrackingLevel_Count - 1
@@ -1674,7 +1682,7 @@ enum EVRInitError
VRInitError_Compositor_CreateFallbackSyncTexture = 477,
VRInitError_Compositor_ShareFallbackSyncTexture = 478,
VRInitError_Compositor_CreateOverlayIndexBuffer = 479,
- VRInitError_Compositor_CreateOverlayVertextBuffer = 480,
+ VRInitError_Compositor_CreateOverlayVertexBuffer = 480,
VRInitError_Compositor_CreateTextVertexBuffer = 481,
VRInitError_Compositor_CreateTextIndexBuffer = 482,
VRInitError_Compositor_CreateMirrorTextures = 483,
@@ -1682,7 +1690,10 @@ enum EVRInitError
VRInitError_Compositor_CreateMirrorOverlay = 485,
VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486,
VRInitError_Compositor_DisplayModeNotSupported = 487,
-
+ VRInitError_Compositor_CreateOverlayInvalidCall = 488,
+ VRInitError_Compositor_CreateOverlayAlreadyInitialized = 489,
+ VRInitError_Compositor_FailedToCreateMailbox = 490,
+
VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
VRInitError_VendorSpecific_WindowsNotInDevMode = 1001,
@@ -1862,6 +1873,13 @@ struct Compositor_FrameTiming
uint32_t m_nNumVSyncsToFirstView;
};
+/** Provides compositor benchmark results to the app */
+struct Compositor_BenchmarkResults
+{
+ float m_flMegaPixelsPerSecond; // Measurement of GPU MP/s performed by compositor benchmark
+ float m_flHmdRecommendedMegaPixelsPerSecond; // Recommended default MP/s given the HMD resolution, refresh, and panel mask.
+};
+
/** Frame timing data provided by direct mode drivers. */
struct DriverDirectMode_FrameTiming
{
@@ -1872,6 +1890,12 @@ struct DriverDirectMode_FrameTiming
uint32_t m_nReprojectionFlags;
};
+/** These flags will be set on DriverDirectMode_FrameTiming::m_nReprojectionFlags when IVRDriverDirectModeComponent::GetFrameTiming is called for drivers to optionally respond to. */
+const uint32_t VRCompositor_ReprojectionMotion_Enabled = 0x100; // Motion Smoothing is enabled in the UI for the currently running application
+const uint32_t VRCompositor_ReprojectionMotion_ForcedOn = 0x200; // Motion Smoothing is forced on in the UI for the currently running application
+const uint32_t VRCompositor_ReprojectionMotion_AppThrottled = 0x400; // Application is requesting throttling via ForceInterleavedReprojectionOn
+
+
enum EVSync
{
VSync_None,
@@ -2254,6 +2278,8 @@ namespace vr
static const char * const k_pch_SteamVR_CustomIconStyle_String = "customIconStyle";
static const char * const k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle";
static const char * const k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate";
+ static const char * const k_pch_SteamVR_AllowGlobalActionSetPriority = "globalActionSetPriority";
+ static const char * const k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2";
//-----------------------------------------------------------------------------
// direct mode keys
@@ -2387,7 +2413,6 @@ namespace vr
static const char * const k_pch_Dashboard_Section = "dashboard";
static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
- static const char * const k_pch_Dashboard_UseWebKeyboard = "useWebKeyboard";
static const char * const k_pch_Dashboard_UseWebSettings = "useWebSettings";
static const char * const k_pch_Dashboard_Position = "position";
static const char * const k_pch_Dashboard_DesktopScale = "desktopScale";
@@ -2400,6 +2425,7 @@ namespace vr
//-----------------------------------------------------------------------------
// driver keys - These could be checked in any driver_<name> section
static const char * const k_pch_Driver_Enable_Bool = "enable";
+ static const char * const k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode";
static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority";
//-----------------------------------------------------------------------------
@@ -2420,9 +2446,12 @@ namespace vr
//-----------------------------------------------------------------------------
// per-app keys - the section name for these is the app key itself. Some of these are prefixed by the controller type
static const char* const k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL";
+ static const char* const k_pch_App_BindingLegacyAPISuffix_String = "_legacy";
+ static const char* const k_pch_App_BindingSteamVRInputAPISuffix_String = "_steamvrinput";
static const char* const k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL";
static const char* const k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
static const char* const k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
+ static const char* const k_pch_App_DominantHand_Int32 = "DominantHand";
//-----------------------------------------------------------------------------
// configuration for trackers
@@ -2915,6 +2944,7 @@ public:
HmdVector2_t GetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
HmdVector3_t GetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
HmdVector4_t GetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
+ double GetDoubleProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
/** Returns a single typed 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
@@ -2943,6 +2973,7 @@ public:
ETrackedPropertyError SetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector2_t & vNewValue );
ETrackedPropertyError SetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector3_t & vNewValue );
ETrackedPropertyError SetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector4_t & vNewValue );
+ ETrackedPropertyError SetDoubleProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, double vNewValue );
/** Sets a string property. The new value will be returned on any subsequent call to get this property in any process. */
ETrackedPropertyError SetStringProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const char *pchNewValue );
@@ -3125,6 +3156,11 @@ inline float CVRPropertyHelpers::GetFloatProperty( PropertyContainerHandle_t ulC
return GetPropertyHelper<float>( ulContainerHandle, prop, pError, 0.f, k_unFloatPropertyTag );
}
+inline double CVRPropertyHelpers::GetDoubleProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError )
+{
+ return GetPropertyHelper<double>( ulContainerHandle, prop, pError, 0., k_unDoublePropertyTag );
+}
+
inline int32_t CVRPropertyHelpers::GetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError )
{
return GetPropertyHelper<int32_t>( ulContainerHandle, prop, pError, 0, k_unInt32PropertyTag );
@@ -3163,6 +3199,11 @@ inline ETrackedPropertyError CVRPropertyHelpers::SetFloatProperty( PropertyConta
return SetProperty( ulContainerHandle, prop, &fNewValue, sizeof( fNewValue ), k_unFloatPropertyTag );
}
+inline ETrackedPropertyError CVRPropertyHelpers::SetDoubleProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, double fNewValue )
+{
+ return SetProperty( ulContainerHandle, prop, &fNewValue, sizeof( fNewValue ), k_unDoublePropertyTag );
+}
+
inline ETrackedPropertyError CVRPropertyHelpers::SetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, int32_t nNewValue )
{
return SetProperty( ulContainerHandle, prop, &nNewValue, sizeof( nNewValue ), k_unInt32PropertyTag );
diff --git a/lib/linux32/libopenvr_api.so b/lib/linux32/libopenvr_api.so
index 2c4a313..33d0db3 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 378fff3..94fd0b9 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 7463e0f..ae1721f 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 ff58a77..60c1c01 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 fb7284c..6d7c2d3 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 1e035ae..32cc89c 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 f5c6e9b..b89d07b 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 bd76c2a..902b6c7 100644
--- a/samples/bin/win64/openvr_api.dll
+++ b/samples/bin/win64/openvr_api.dll
Binary files differ
diff --git a/src/vrcommon/hmderrors_public.cpp b/src/vrcommon/hmderrors_public.cpp
index 7374759..e02c370 100644
--- a/src/vrcommon/hmderrors_public.cpp
+++ b/src/vrcommon/hmderrors_public.cpp
@@ -281,7 +281,7 @@ const char *GetIDForVRInitError( vr::EVRInitError eError )
RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateFallbackSyncTexture );
RETURN_ENUM_AS_STRING( VRInitError_Compositor_ShareFallbackSyncTexture );
RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayIndexBuffer );
- RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayVertextBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayVertexBuffer );
RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateTextVertexBuffer );
RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateTextIndexBuffer );
RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateMirrorTextures );
@@ -289,6 +289,9 @@ const char *GetIDForVRInitError( vr::EVRInitError eError )
RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateMirrorOverlay );
RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer );
RETURN_ENUM_AS_STRING( VRInitError_Compositor_DisplayModeNotSupported );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayInvalidCall );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayAlreadyInitialized );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateMailbox );
// 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 80eadb8..eb1373a 100644
--- a/src/vrcommon/pathtools_public.cpp
+++ b/src/vrcommon/pathtools_public.cpp
@@ -361,8 +361,9 @@ std::string Path_Compact( const std::string & sRawPath, char slash )
std::string::size_type len = sPath.length();
if( sPath[ len-1 ] == '.' && sPath[ len-2 ] == slash )
{
- // sPath.pop_back();
- sPath[len-1] = 0; // for now, at least
+ sPath.pop_back();
+ //Not sure why the following line of code was used for a while. It causes problems with strlen.
+ //sPath[len-1] = 0; // for now, at least
}
}
diff --git a/src/vrcommon/strtools_public.cpp b/src/vrcommon/strtools_public.cpp
index 661325a..f9ce0fd 100644
--- a/src/vrcommon/strtools_public.cpp
+++ b/src/vrcommon/strtools_public.cpp
@@ -10,6 +10,10 @@
#include <locale>
#include <codecvt>
+#if defined( _WIN32 )
+#include <windows.h>
+#endif
+
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
@@ -53,15 +57,15 @@ bool StringHasSuffixCaseSensitive( const std::string &sString, const std::string
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
+typedef std::codecvt_utf8< wchar_t > convert_type;
std::string UTF16to8(const wchar_t * in)
{
+ static std::wstring_convert< convert_type, wchar_t > s_converter; // construction of this can be expensive (or even serialized) depending on locale
+
try
{
- typedef std::codecvt_utf8< wchar_t > convert_type;
- std::wstring_convert< convert_type, wchar_t > converter;
-
- return converter.to_bytes( in );
+ return s_converter.to_bytes( in );
}
catch ( ... )
{
@@ -69,15 +73,16 @@ std::string UTF16to8(const wchar_t * in)
}
}
+std::string UTF16to8( const std::wstring & in ) { return UTF16to8( in.c_str() ); }
+
std::wstring UTF8to16(const char * in)
{
+ static std::wstring_convert< convert_type, wchar_t > s_converter; // construction of this can be expensive (or even serialized) depending on locale
+
try
{
- typedef std::codecvt_utf8< wchar_t > convert_type;
- std::wstring_convert< convert_type, wchar_t > converter;
-
- return converter.from_bytes( in );
+ return s_converter.from_bytes( in );
}
catch ( ... )
{
@@ -85,14 +90,37 @@ std::wstring UTF8to16(const char * in)
}
}
+std::wstring UTF8to16( const std::string & in ) { return UTF8to16( in.c_str() ); }
+
+
+#if defined( _WIN32 )
+//-----------------------------------------------------------------------------
+// Purpose: Convert LPSTR in the default CodePage to UTF8
+//-----------------------------------------------------------------------------
+std::string DefaultACPtoUTF8( const char *pszStr )
+{
+ if ( GetACP() == CP_UTF8 )
+ {
+ return pszStr;
+ }
+ else
+ {
+ std::vector<wchar_t> vecBuf( strlen( pszStr ) + 1 ); // should be guaranteed to be enough
+ MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, pszStr, -1, vecBuf.data(), (int) vecBuf.size() );
+ return UTF16to8( vecBuf.data() );
+ }
+}
+#endif
+// --------------------------------------------------------------------
+// Purpose:
+// --------------------------------------------------------------------
void strcpy_safe( char *pchBuffer, size_t unBufferSizeBytes, const char *pchSource )
{
strncpy( pchBuffer, pchSource, unBufferSizeBytes - 1 );
pchBuffer[unBufferSizeBytes - 1] = '\0';
}
-
// --------------------------------------------------------------------
// Purpose: converts a string to upper case
// --------------------------------------------------------------------
@@ -438,19 +466,17 @@ bool RepairUTF8( const char *pbegin, const char *pend, std::string & sOutputUtf8
bool bSqueakyClean = true;
const char *pmid = pbegin;
-
while ( pmid != pend )
{
+ bool bHasError = false;
+ bool bHasValidData = false;
+
char32_t out = 0xdeadbeef, *pout;
pbegin = pmid;
switch ( myfacet.in( mystate, pbegin, pend, pmid, &out, &out + 1, pout ) )
{
case facet_type::ok:
- // could convert back, but no need
- for ( const char *p = pbegin; p != pmid; ++p )
- {
- sOutputUtf8 += *p;
- }
+ bHasValidData = true;
break;
case facet_type::noconv:
@@ -459,17 +485,41 @@ bool RepairUTF8( const char *pbegin, const char *pend, std::string & sOutputUtf8
break;
case facet_type::partial:
- sOutputUtf8 += '?';
- pmid++; // partial consumes 0, so make progress
- bSqueakyClean = false;
+ bHasError = pbegin == pmid;
+ if ( bHasError )
+ {
+ bSqueakyClean = false;
+ }
+ else
+ {
+ bHasValidData = true;
+ }
break;
case facet_type::error:
- sOutputUtf8 += '?';
- // error consumes some bytes
+ bHasError = true;
bSqueakyClean = false;
break;
}
+
+ if ( bHasValidData )
+ {
+ // could convert back, but no need
+ for ( const char *p = pbegin; p != pmid; ++p )
+ {
+ sOutputUtf8 += *p;
+ }
+ }
+
+ if ( bHasError )
+ {
+ sOutputUtf8 += '?';
+ }
+
+ if ( pmid == pbegin )
+ {
+ pmid++;
+ }
}
return bSqueakyClean;
diff --git a/src/vrcommon/strtools_public.h b/src/vrcommon/strtools_public.h
index 9a53907..349b5b3 100644
--- a/src/vrcommon/strtools_public.h
+++ b/src/vrcommon/strtools_public.h
@@ -15,12 +15,18 @@ bool StringHasSuffix( const std::string &sString, const std::string &sSuffix );
bool StringHasSuffixCaseSensitive( const std::string &sString, const std::string &sSuffix );
/** converts a UTF-16 string to a UTF-8 string */
-std::string UTF16to8(const wchar_t * in);
+std::string UTF16to8( const wchar_t * in );
+std::string UTF16to8( const std::wstring & in );
/** converts a UTF-8 string to a UTF-16 string */
std::wstring UTF8to16(const char * in);
+std::wstring UTF8to16( const std::string & in );
#define Utf16FromUtf8 UTF8to16
+#if defined( _WIN32 )
+std::string DefaultACPtoUTF8( const char *pszStr );
+#endif
+
/** Repairs a should-be-UTF-8 string to a for-sure-is-UTF-8 string, plus return boolean if we subbed in '?' somewhere */
bool RepairUTF8( const char *begin, const char *end, std::string & sOutputUtf8 );
bool RepairUTF8( const std::string & sInputUtf8, std::string & sOutputUtf8 );
diff --git a/src/vrcommon/vrpathregistry_public.cpp b/src/vrcommon/vrpathregistry_public.cpp
index e4be52f..6a7f457 100644
--- a/src/vrcommon/vrpathregistry_public.cpp
+++ b/src/vrcommon/vrpathregistry_public.cpp
@@ -212,19 +212,25 @@ bool CVRPathRegistry_Public::ToJsonString( std::string &sJsonString )
// ---------------------------------------------------------------------------
// Purpose: Loads the config file from its well known location
// ---------------------------------------------------------------------------
-bool CVRPathRegistry_Public::BLoadFromFile()
+bool CVRPathRegistry_Public::BLoadFromFile( std::string *psLoadError )
{
std::string sRegPath = GetVRPathRegistryFilename();
if( sRegPath.empty() )
{
- VRLog( "Unable to determine VR Path Registry filename\n" );
+ if ( psLoadError )
+ {
+ *psLoadError = "Unable to determine VR Path Registry filename";
+ }
return false;
}
std::string sRegistryContents = Path_ReadTextFile( sRegPath );
if( sRegistryContents.empty() )
{
- VRLog( "Unable to read VR Path Registry from %s\n", sRegPath.c_str() );
+ if ( psLoadError )
+ {
+ *psLoadError = "Unable to read VR Path Registry from " + sRegPath;
+ }
return false;
}
@@ -236,7 +242,10 @@ bool CVRPathRegistry_Public::BLoadFromFile()
try {
if ( !parseFromStream( builder, istream, &root, &sErrors ) )
{
- VRLog( "Unable to parse %s: %s\n", sRegPath.c_str(), sErrors.c_str() );
+ if ( psLoadError )
+ {
+ *psLoadError = "Unable to parse " + sRegPath + ": " + sErrors;
+ }
return false;
}
@@ -250,7 +259,10 @@ bool CVRPathRegistry_Public::BLoadFromFile()
}
catch ( ... )
{
- VRLog( "Unable to parse %s: %s\n", sRegPath.c_str(), "exception thrown in JSON library" );
+ if ( psLoadError )
+ {
+ *psLoadError = "Unable to parse " + sRegPath + ": exception thrown in JSON library";
+ }
return false;
}
@@ -263,9 +275,6 @@ bool CVRPathRegistry_Public::BLoadFromFile()
// ---------------------------------------------------------------------------
bool CVRPathRegistry_Public::BSaveToFile() const
{
-#if defined( DASHBOARD_BUILD_MODE )
- return false;
-#else
std::string sRegPath = GetVRPathRegistryFilename();
if( sRegPath.empty() )
return false;
@@ -298,7 +307,6 @@ bool CVRPathRegistry_Public::BSaveToFile() const
}
return true;
-#endif
}
@@ -345,12 +353,15 @@ std::string CVRPathRegistry_Public::GetLogPath() const
// ---------------------------------------------------------------------------
bool CVRPathRegistry_Public::GetPaths( std::string *psRuntimePath, std::string *psConfigPath, std::string *psLogPath, const char *pchConfigPathOverride, const char *pchLogPathOverride, std::vector<std::string> *pvecExternalDrivers )
{
+ std::string sLoadError;
CVRPathRegistry_Public pathReg;
- bool bLoadedRegistry = pathReg.BLoadFromFile();
+ bool bLoadedRegistry = pathReg.BLoadFromFile( &sLoadError );
int nCountEnvironmentVariables = 0;
+ int nRequestedPaths = 0;
if( psRuntimePath )
{
+ nRequestedPaths++;
if ( GetEnvironmentVariable( k_pchRuntimeOverrideVar ).length() != 0 )
{
*psRuntimePath = GetEnvironmentVariable( k_pchRuntimeOverrideVar );
@@ -368,6 +379,7 @@ bool CVRPathRegistry_Public::GetPaths( std::string *psRuntimePath, std::string *
if( psConfigPath )
{
+ nRequestedPaths++;
if ( GetEnvironmentVariable( k_pchConfigOverrideVar ).length() != 0 )
{
*psConfigPath = GetEnvironmentVariable( k_pchConfigOverrideVar );
@@ -389,6 +401,7 @@ bool CVRPathRegistry_Public::GetPaths( std::string *psRuntimePath, std::string *
if( psLogPath )
{
+ nRequestedPaths++;
if ( GetEnvironmentVariable( k_pchLogOverrideVar ).length() != 0 )
{
*psLogPath = GetEnvironmentVariable( k_pchLogOverrideVar );
@@ -413,11 +426,15 @@ bool CVRPathRegistry_Public::GetPaths( std::string *psRuntimePath, std::string *
*pvecExternalDrivers = pathReg.m_vecExternalDrivers;
}
- if ( nCountEnvironmentVariables == 3 )
+ if ( nCountEnvironmentVariables == nRequestedPaths )
{
// all three environment variables were set, so we don't need the physical file
return true;
}
+ else if( !bLoadedRegistry )
+ {
+ VRLog( "%s\n", sLoadError.c_str() );
+ }
return bLoadedRegistry;
}
diff --git a/src/vrcommon/vrpathregistry_public.h b/src/vrcommon/vrpathregistry_public.h
index 4838a10..776935a 100644
--- a/src/vrcommon/vrpathregistry_public.h
+++ b/src/vrcommon/vrpathregistry_public.h
@@ -22,7 +22,7 @@ public:
* Returns false if the path registry could not be read. Valid paths might still be returned based on environment variables. */
static bool GetPaths( std::string *psRuntimePath, std::string *psConfigPath, std::string *psLogPath, const char *pchConfigPathOverride, const char *pchLogPathOverride, std::vector<std::string> *pvecExternalDrivers = NULL );
- bool BLoadFromFile();
+ bool BLoadFromFile( std::string *psError = nullptr );
bool BSaveToFile() const;
bool ToJsonString( std::string &sJsonString );