Update OpenVR from 1.8.19 -> 1.9.16 and remove Sync() calls
Release log: https://github.com/ValveSoftware/openvr/releases/tag/v1.9.16 ``` Removed sync function. Saving of settings is controlled automatically by the system now. All existing calls to Sync can be deleted. Calls to sync using old APIs do nothing. ```
This commit is contained in:
Vendored
+101
-29
@@ -15,8 +15,8 @@
|
||||
namespace vr
|
||||
{
|
||||
static const uint32_t k_nSteamVRVersionMajor = 1;
|
||||
static const uint32_t k_nSteamVRVersionMinor = 8;
|
||||
static const uint32_t k_nSteamVRVersionBuild = 19;
|
||||
static const uint32_t k_nSteamVRVersionMinor = 9;
|
||||
static const uint32_t k_nSteamVRVersionBuild = 16;
|
||||
} // namespace vr
|
||||
|
||||
// vrtypes.h
|
||||
@@ -207,6 +207,7 @@ enum ETrackedControllerRole
|
||||
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_Stylus = 5, // Tracked device is a stylus
|
||||
TrackedControllerRole_Max = 5
|
||||
};
|
||||
|
||||
@@ -276,6 +277,7 @@ static const PropertyTypeTag_t k_unInt32PropertyTag = 2;
|
||||
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_unHmdMatrix34PropertyTag = 20;
|
||||
static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21;
|
||||
@@ -355,6 +357,10 @@ enum ETrackedDeviceProperty
|
||||
Prop_AdditionalSystemReportData_String = 1045, // additional string to include in system reports about a tracked device
|
||||
Prop_CompositeFirmwareVersion_String = 1046, // additional FW components from a device that gets propagated into reports
|
||||
Prop_Firmware_RemindUpdate_Bool = 1047,
|
||||
Prop_PeripheralApplicationVersion_Uint64 = 1048,
|
||||
Prop_ManufacturerSerialNumber_String = 1049,
|
||||
Prop_ComputedSerialNumber_String = 1050,
|
||||
Prop_EstimatedDeviceFirstUseTime_Int32 = 1051,
|
||||
|
||||
// Properties that are unique to TrackedDeviceClass_HMD
|
||||
Prop_ReportsTimeSinceVSync_Bool = 2000,
|
||||
@@ -432,13 +438,17 @@ enum ETrackedDeviceProperty
|
||||
Prop_ExpectedControllerType_String = 2074,
|
||||
Prop_HmdTrackingStyle_Int32 = 2075, // one of EHmdTrackingStyle
|
||||
Prop_DriverProvidedChaperoneVisibility_Bool = 2076,
|
||||
Prop_HmdProvidesDisplaySettings_Bool = 2077,
|
||||
|
||||
Prop_HmdColumnCorrectionSettingPrefix_String = 2077,
|
||||
Prop_CameraSupportsCompatibilityModes_Bool = 2078,
|
||||
|
||||
Prop_DisplayAvailableFrameRates_Float_Array = 2080, // populated by compositor from actual EDID list when available from GPU driver
|
||||
Prop_DisplaySupportsMultipleFramerates_Bool = 2081, // if this is true but Prop_DisplayAvailableFrameRates_Float_Array is empty, explain to user
|
||||
Prop_DisplayColorMultLeft_Vector3 = 2082,
|
||||
Prop_DisplayColorMultRight_Vector3 = 2083,
|
||||
Prop_DisplaySupportsRuntimeFramerateChange_Bool = 2084,
|
||||
Prop_DisplaySupportsAnalogGain_Bool = 2085,
|
||||
Prop_DisplayMinAnalogGain_Float = 2086,
|
||||
Prop_DisplayMaxAnalogGain_Float = 2087,
|
||||
|
||||
Prop_DashboardLayoutPathName_String = 2090,
|
||||
Prop_DashboardScale_Float = 2091,
|
||||
@@ -541,6 +551,8 @@ enum ETrackedPropertyError
|
||||
TrackedProp_InvalidOperation = 11,
|
||||
TrackedProp_CannotWriteToWildcards = 12,
|
||||
TrackedProp_IPCReadFailure = 13,
|
||||
TrackedProp_OutOfMemory = 14,
|
||||
TrackedProp_InvalidContainer = 15,
|
||||
};
|
||||
|
||||
/** Used to drive certain text in the UI when talking about the tracking system for the HMD */
|
||||
@@ -796,6 +808,7 @@ enum EVREventType
|
||||
VREvent_TrackersSectionSettingChanged = 866,
|
||||
VREvent_LastKnownSectionSettingChanged = 867,
|
||||
VREvent_DismissedWarningsSectionSettingChanged = 868,
|
||||
VREvent_GpuSpeedSectionSettingChanged = 869,
|
||||
|
||||
VREvent_StatusUpdate = 900,
|
||||
|
||||
@@ -830,6 +843,7 @@ enum EVREventType
|
||||
VREvent_Compositor_ApplicationResumed = 1416,
|
||||
VREvent_Compositor_OutOfVideoMemory = 1417,
|
||||
VREvent_Compositor_DisplayModeNotSupported = 1418, // k_pch_SteamVR_PreferredRefreshRate
|
||||
VREvent_Compositor_StageOverrideReady = 1419,
|
||||
|
||||
VREvent_TrackedCamera_StartVideoStream = 1500,
|
||||
VREvent_TrackedCamera_StopVideoStream = 1501,
|
||||
@@ -852,6 +866,7 @@ enum EVREventType
|
||||
VREvent_Input_ProgressUpdate = 1705, // data is progressUpdate
|
||||
VREvent_Input_TrackerActivated = 1706,
|
||||
VREvent_Input_BindingsUpdated = 1707,
|
||||
VREvent_Input_BindingSubscriptionChanged = 1708,
|
||||
|
||||
VREvent_SpatialAnchors_PoseUpdated = 1800, // data is spatialAnchor. broadcast
|
||||
VREvent_SpatialAnchors_DescriptorUpdated = 1801, // data is spatialAnchor. broadcast
|
||||
@@ -1143,6 +1158,7 @@ enum EShowUIType
|
||||
ShowUI_Pairing = 3,
|
||||
ShowUI_Settings = 4,
|
||||
ShowUI_DebugCommands = 5,
|
||||
ShowUI_FullControllerBinding = 6,
|
||||
};
|
||||
|
||||
struct VREvent_ShowUI_t
|
||||
@@ -2492,9 +2508,6 @@ namespace vr
|
||||
public:
|
||||
virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0;
|
||||
|
||||
// Returns true if file sync occurred (force or settings dirty)
|
||||
virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0;
|
||||
|
||||
virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0;
|
||||
virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
|
||||
virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0;
|
||||
@@ -2512,7 +2525,7 @@ namespace vr
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static const char * const IVRSettings_Version = "IVRSettings_002";
|
||||
static const char * const IVRSettings_Version = "IVRSettings_003";
|
||||
|
||||
class CVRSettingHelper
|
||||
{
|
||||
@@ -2528,12 +2541,6 @@ namespace vr
|
||||
return m_pSettings->GetSettingsErrorNameFromEnum( eError );
|
||||
}
|
||||
|
||||
// Returns true if file sync occurred (force or settings dirty)
|
||||
bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr )
|
||||
{
|
||||
return m_pSettings->Sync( bForce, peError );
|
||||
}
|
||||
|
||||
void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr )
|
||||
{
|
||||
m_pSettings->SetBool( pchSection, pchSettingsKey, bValue, peError );
|
||||
@@ -2636,6 +2643,7 @@ namespace vr
|
||||
static const char * const k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye";
|
||||
static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
|
||||
static const char * const k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized";
|
||||
static const char * const k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph";
|
||||
static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
|
||||
static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
|
||||
static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
|
||||
@@ -2650,7 +2658,6 @@ namespace vr
|
||||
static const char * const k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode";
|
||||
static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver";
|
||||
static const char * const k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor";
|
||||
static const char * const k_pch_SteamVR_DebugInput = "debugInput";
|
||||
static const char * const k_pch_SteamVR_DebugInputBinding = "debugInputBinding";
|
||||
static const char * const k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid";
|
||||
static const char * const k_pch_SteamVR_RenderCameraMode = "renderCameraMode";
|
||||
@@ -2800,6 +2807,9 @@ namespace vr
|
||||
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";
|
||||
static const char * const k_pch_Dashboard_DashboardScale = "dashboardScale";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// model skin keys
|
||||
@@ -2829,6 +2839,7 @@ 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_BindingCurrentURLSuffix_String = "CurrentURL";
|
||||
static const char* const k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
|
||||
static const char* const k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -2856,6 +2867,9 @@ namespace vr
|
||||
static const char* const k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation";
|
||||
static const char* const k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Log of GPU performance
|
||||
static const char * const k_pch_GpuSpeed_Section = "GpuSpeed";
|
||||
|
||||
} // namespace vr
|
||||
|
||||
@@ -3049,6 +3063,7 @@ enum EVRCompositorError
|
||||
VRCompositorError_IndexOutOfRange = 107,
|
||||
VRCompositorError_AlreadySubmitted = 108,
|
||||
VRCompositorError_InvalidBounds = 109,
|
||||
VRCompositorError_AlreadySet = 110,
|
||||
};
|
||||
|
||||
/** Timing mode passed to SetExplicitTimingMode(); see that function for documentation */
|
||||
@@ -3089,6 +3104,32 @@ struct Compositor_CumulativeStats
|
||||
uint32_t m_nNumReprojectedFramesTimedOut;
|
||||
};
|
||||
|
||||
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 };
|
||||
|
||||
/** 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;
|
||||
|
||||
/** 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;
|
||||
|
||||
/** Controls backface culling. */
|
||||
bool m_bBackfaceCulling = false;
|
||||
|
||||
/** 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;
|
||||
|
||||
/** Renders mesh as a wireframe. */
|
||||
bool m_bWireframe = false;
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
/** Allows the application to interact with the compositor */
|
||||
@@ -3295,9 +3336,18 @@ public:
|
||||
/** Indicates whether or not the current scene focus app is currently loading. This is inferred from its use of FadeGrid to
|
||||
* explicitly fade to the compositor to cover up the fact that it cannot render at a sustained full framerate during this time. */
|
||||
virtual bool IsCurrentSceneFocusAppLoading() = 0;
|
||||
|
||||
/** Override the stage model used in the compositor to replace the grid. RenderModelPath is a full path the an OBJ file to load.
|
||||
* This file will be loaded asynchronously from disk and uploaded to the gpu by the runtime. Once ready for rendering, the
|
||||
* VREvent StageOverrideReady will be sent. Use FadeToGrid to reveal. Call ClearStageOverride to free the associated resources when finished. */
|
||||
virtual EVRCompositorError SetStageOverride_Async( const char *pchRenderModelPath, const HmdMatrix34_t *pTransform = 0,
|
||||
const Compositor_StageRenderSettings *pRenderSettings = 0, uint32_t nSizeOfRenderSettings = 0 ) = 0;
|
||||
|
||||
/** Resets the stage to its default user specified setting. */
|
||||
virtual void ClearStageOverride() = 0;
|
||||
};
|
||||
|
||||
static const char * const IVRCompositor_Version = "IVRCompositor_022";
|
||||
static const char * const IVRCompositor_Version = "IVRCompositor_024";
|
||||
|
||||
} // namespace vr
|
||||
|
||||
@@ -3403,7 +3453,7 @@ namespace vr
|
||||
static const uint32_t k_unVROverlayMaxNameLength = 128;
|
||||
|
||||
/** The maximum number of overlays that can exist in the system at one time. */
|
||||
static const uint32_t k_unMaxOverlayCount = 64;
|
||||
static const uint32_t k_unMaxOverlayCount = 128;
|
||||
|
||||
/** The maximum number of overlay intersection mask primitives per overlay */
|
||||
static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
|
||||
@@ -3419,10 +3469,14 @@ namespace vr
|
||||
/** Allows the caller to figure out which overlay transform getter to call. */
|
||||
enum VROverlayTransformType
|
||||
{
|
||||
VROverlayTransform_Invalid = -1,
|
||||
VROverlayTransform_Absolute = 0,
|
||||
VROverlayTransform_TrackedDeviceRelative = 1,
|
||||
VROverlayTransform_SystemOverlay = 2,
|
||||
VROverlayTransform_TrackedComponent = 3,
|
||||
VROverlayTransform_Cursor = 4,
|
||||
VROverlayTransform_DashboardTab = 5,
|
||||
VROverlayTransform_DashboardThumb = 6,
|
||||
};
|
||||
|
||||
/** Overlay control settings */
|
||||
@@ -3605,6 +3659,9 @@ namespace vr
|
||||
/** Sets flag setting for a given overlay */
|
||||
virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0;
|
||||
|
||||
/** Gets all the flags for a given overlay */
|
||||
virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0;
|
||||
|
||||
/** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */
|
||||
virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0;
|
||||
|
||||
@@ -3698,6 +3755,13 @@ namespace vr
|
||||
/** Sets the transform to relative to the transform of the specified overlay. This overlays visibility will also track the parents visibility */
|
||||
virtual vr::EVROverlayError SetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, const HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0;
|
||||
|
||||
/** Sets the hotspot for the specified overlay when that overlay is used as a cursor. These are in texture space with 0,0 in the upper left corner of
|
||||
* the texture and 1,1 in the lower right corner of the texture. */
|
||||
virtual EVROverlayError SetOverlayTransformCursor( VROverlayHandle_t ulCursorOverlayHandle, const HmdVector2_t *pvHotspot ) = 0;
|
||||
|
||||
/** Gets cursor hotspot/transform for the specified overlay */
|
||||
virtual vr::EVROverlayError GetOverlayTransformCursor( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvHotspot ) = 0;
|
||||
|
||||
/** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */
|
||||
virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0;
|
||||
|
||||
@@ -3746,6 +3810,23 @@ namespace vr
|
||||
/** 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;
|
||||
|
||||
/** Triggers a haptic event on the laser mouse controller for the specified overlay */
|
||||
virtual EVROverlayError TriggerLaserMouseHapticVibration( VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude ) = 0;
|
||||
|
||||
/** Sets the cursor to use for the specified overlay. This will be drawn instead of the generic blob when the laser mouse is pointed at the specified overlay */
|
||||
virtual EVROverlayError SetOverlayCursor( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle ) = 0;
|
||||
|
||||
/** Sets the override cursor position to use for this overlay in overlay mouse coordinates. This position will be used to draw the cursor
|
||||
* instead of whatever the laser mouse cursor position is. */
|
||||
virtual EVROverlayError SetOverlayCursorPositionOverride( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvCursor ) = 0;
|
||||
|
||||
/** Clears the override cursor position for this overlay */
|
||||
virtual EVROverlayError ClearOverlayCursorPositionOverride( VROverlayHandle_t ulOverlayHandle ) = 0;
|
||||
|
||||
// ---------------------------------------------
|
||||
// Overlay texture methods
|
||||
// ---------------------------------------------
|
||||
@@ -3762,7 +3843,7 @@ namespace vr
|
||||
|
||||
/** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data
|
||||
* that can be sent. This function can only be called by the overlay's renderer process. */
|
||||
virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0;
|
||||
virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel ) = 0;
|
||||
|
||||
/** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080.
|
||||
* This function can only be called by the overlay's renderer process */
|
||||
@@ -3834,16 +3915,6 @@ namespace vr
|
||||
/** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/
|
||||
virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0;
|
||||
|
||||
// ---------------------------------------------
|
||||
// Overlay input methods
|
||||
// ---------------------------------------------
|
||||
|
||||
/** Sets a list of primitives to be used for controller ray intersection
|
||||
* typically the size of the underlying UI in pixels (not in world space). */
|
||||
virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0;
|
||||
|
||||
virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0;
|
||||
|
||||
// ---------------------------------------------
|
||||
// Message box methods
|
||||
// ---------------------------------------------
|
||||
@@ -3855,7 +3926,7 @@ namespace vr
|
||||
virtual void CloseMessageOverlay() = 0;
|
||||
};
|
||||
|
||||
static const char * const IVROverlay_Version = "IVROverlay_021";
|
||||
static const char * const IVROverlay_Version = "IVROverlay_022";
|
||||
|
||||
} // namespace vr
|
||||
|
||||
@@ -4760,6 +4831,7 @@ namespace vr
|
||||
#endif // _OPENVR_API
|
||||
|
||||
|
||||
|
||||
namespace vr
|
||||
{
|
||||
#if !defined( OPENVR_INTERFACE_INTERNAL )
|
||||
|
||||
Reference in New Issue
Block a user