diff --git a/src/tabcontrollers/AudioTabController.cpp b/src/tabcontrollers/AudioTabController.cpp index c6a92a6..5aae9ec 100644 --- a/src/tabcontrollers/AudioTabController.cpp +++ b/src/tabcontrollers/AudioTabController.cpp @@ -525,7 +525,6 @@ void AudioTabController::setMirrorDeviceIndex( int index, bool notify ) } else { - vr::VRSettings()->Sync(); audioManager->setMirrorDevice( "", notify ); } } @@ -551,7 +550,6 @@ void AudioTabController::setMirrorDeviceIndex( int index, bool notify ) } else { - vr::VRSettings()->Sync(); audioManager->setMirrorDevice( m_playbackDevices[static_cast( index )].id(), notify ); @@ -934,10 +932,6 @@ void AudioTabController::deleteAudioProfile( unsigned index ) << vr::VRSettings()->GetSettingsErrorNameFromEnum( vrSettingsError ); } - else - { - vr::VRSettings()->Sync(); - } vr::VRSettings()->RemoveKeyInSection( vr::k_pch_audio_Section, @@ -952,10 +946,6 @@ void AudioTabController::deleteAudioProfile( unsigned index ) << vr::VRSettings()->GetSettingsErrorNameFromEnum( vrSettingsError ); } - else - { - vr::VRSettings()->Sync(); - } } audioProfiles.erase( pos ); saveAudioProfiles(); @@ -1148,7 +1138,6 @@ void AudioTabController::setDefaultPlayback( int index, bool notify ) } else { - vr::VRSettings()->Sync(); audioManager->setPlaybackDevice( m_playbackDevices[static_cast( index )].id(), notify ); } @@ -1172,7 +1161,6 @@ void AudioTabController::setDefaultMic( int index, bool notify ) } else { - vr::VRSettings()->Sync(); audioManager->setMicDevice( m_recordingDevices[static_cast( index )].id(), notify ); } @@ -1197,7 +1185,6 @@ void AudioTabController::setDefaultMirror( int index, bool notify ) } else { - vr::VRSettings()->Sync(); audioManager->setMirrorDevice( "", notify ); } } @@ -1219,7 +1206,6 @@ void AudioTabController::setDefaultMirror( int index, bool notify ) } else { - vr::VRSettings()->Sync(); audioManager->setMirrorDevice( m_playbackDevices[static_cast( index )].id(), notify ); } diff --git a/src/tabcontrollers/ChaperoneTabController.cpp b/src/tabcontrollers/ChaperoneTabController.cpp index 03f98cf..f59023a 100644 --- a/src/tabcontrollers/ChaperoneTabController.cpp +++ b/src/tabcontrollers/ChaperoneTabController.cpp @@ -372,7 +372,6 @@ void ChaperoneTabController::handleChaperoneWarnings( float distance ) } else { - vr::VRSettings()->Sync( true ); m_chaperoneSwitchToBeginnerActive = true; } } @@ -395,7 +394,6 @@ void ChaperoneTabController::handleChaperoneWarnings( float distance ) } else { - vr::VRSettings()->Sync( true ); m_chaperoneSwitchToBeginnerActive = false; } } @@ -707,7 +705,6 @@ void ChaperoneTabController::setBoundsVisibility( float value, bool notify ) vr::k_pch_CollisionBounds_ColorGammaA_Int32, static_cast( 255 * m_visibility ) ); - vr::VRSettings()->Sync(); if ( notify ) { emit boundsVisibilityChanged( m_visibility ); @@ -729,7 +726,6 @@ void ChaperoneTabController::setFadeDistance( float value, bool notify ) vr::k_pch_CollisionBounds_Section, vr::k_pch_CollisionBounds_FadeDistance_Float, m_fadeDistance ); - vr::VRSettings()->Sync(); if ( notify ) { emit fadeDistanceChanged( m_fadeDistance ); @@ -781,7 +777,6 @@ void ChaperoneTabController::setCenterMarker( bool value, bool notify ) vr::k_pch_CollisionBounds_Section, vr::k_pch_CollisionBounds_CenterMarkerOn_Bool, m_centerMarker ); - vr::VRSettings()->Sync(); if ( notify ) { emit centerMarkerChanged( m_centerMarker ); @@ -802,7 +797,6 @@ void ChaperoneTabController::setPlaySpaceMarker( bool value, bool notify ) vr::VRSettings()->SetBool( vr::k_pch_CollisionBounds_Section, vr::k_pch_CollisionBounds_PlaySpaceOn_Bool, m_playSpaceMarker ); - vr::VRSettings()->Sync(); if ( notify ) { emit playSpaceMarkerChanged( m_playSpaceMarker ); @@ -932,10 +926,6 @@ void ChaperoneTabController::setChaperoneSwitchToBeginnerEnabled( bool value, << vr::VRSettings()->GetSettingsErrorNameFromEnum( vrSettingsError ); } - else - { - vr::VRSettings()->Sync( true ); - } } m_chaperoneSwitchToBeginnerActive = false; @@ -1436,7 +1426,6 @@ void ChaperoneTabController::applyChaperoneProfile( unsigned index ) setChaperoneShowDashboardEnabled( profile.enableChaperoneShowDashboard ); } - vr::VRSettings()->Sync( true ); } } @@ -1595,7 +1584,6 @@ void ChaperoneTabController::reset() setForceBounds( false ); - vr::VRSettings()->Sync(); settingsUpdateCounter = 999; // Easiest way to get default values } @@ -1704,10 +1692,6 @@ void ChaperoneTabController::shutdown() << vr::VRSettings()->GetSettingsErrorNameFromEnum( vrSettingsError ); } - else - { - vr::VRSettings()->Sync( true ); - } } } diff --git a/src/tabcontrollers/SteamVRTabController.cpp b/src/tabcontrollers/SteamVRTabController.cpp index 70b15e8..19395d1 100644 --- a/src/tabcontrollers/SteamVRTabController.cpp +++ b/src/tabcontrollers/SteamVRTabController.cpp @@ -178,7 +178,6 @@ void SteamVRTabController::setPerformanceGraph( const bool value, vr::VRSettings()->SetBool( vr::k_pch_Perf_Section, vr::k_pch_Perf_PerfGraphInHMD_Bool, m_performanceGraphToggle ); - vr::VRSettings()->Sync(); if ( notify ) { emit performanceGraphChanged( m_performanceGraphToggle ); @@ -201,7 +200,6 @@ void SteamVRTabController::setMultipleDriver( const bool value, vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_ActivateMultipleDrivers_Bool, m_multipleDriverToggle ); - vr::VRSettings()->Sync(); if ( notify ) { emit multipleDriverChanged( m_multipleDriverToggle ); @@ -223,7 +221,6 @@ void SteamVRTabController::setNoFadeToGrid( const bool value, vr::VRSettings()->SetBool( vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_DoNotFadeToGrid, m_noFadeToGridToggle ); - vr::VRSettings()->Sync(); if ( notify ) { emit noFadeToGridChanged( m_noFadeToGridToggle ); @@ -246,7 +243,6 @@ void SteamVRTabController::setSystemButton( const bool value, vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_SendSystemButtonToAllApps_Bool, m_systemButtonToggle ); - vr::VRSettings()->Sync(); if ( notify ) { emit systemButtonChanged( m_systemButtonToggle ); @@ -267,7 +263,6 @@ void SteamVRTabController::setDND( const bool value, const bool notify ) vr::VRSettings()->SetBool( vr::k_pch_Notifications_Section, vr::k_pch_Notifications_DoNotDisturb_Bool, m_dnd ); - vr::VRSettings()->Sync(); if ( notify ) { emit dNDChanged( m_dnd ); @@ -292,7 +287,6 @@ void SteamVRTabController::setCameraActive( const bool value, vr::VRSettings()->SetBool( vr::k_pch_Camera_Section, vr::k_pch_Camera_EnableCamera_Bool, m_cameraActive ); - vr::VRSettings()->Sync(); if ( notify ) { emit cameraActiveChanged( m_cameraActive ); @@ -315,7 +309,6 @@ void SteamVRTabController::setCameraBounds( const bool value, vr::k_pch_Camera_Section, vr::k_pch_Camera_EnableCameraForCollisionBounds_Bool, m_cameraBounds ); - vr::VRSettings()->Sync(); if ( notify ) { emit cameraBoundsChanged( m_cameraBounds ); @@ -337,7 +330,6 @@ void SteamVRTabController::setCameraRoom( const bool value, const bool notify ) vr::k_pch_Camera_Section, vr::k_pch_Camera_EnableCameraForRoomView_Bool, m_cameraRoom ); - vr::VRSettings()->Sync(); if ( notify ) { emit cameraRoomChanged( m_cameraRoom ); @@ -380,7 +372,6 @@ void SteamVRTabController::setCameraDashboard( const bool value, vr::k_pch_Camera_Section, vr::k_pch_Camera_EnableCameraInDashboard_Bool, m_cameraDashboard ); - vr::VRSettings()->Sync(); if ( notify ) { emit cameraDashboardChanged( m_cameraDashboard ); diff --git a/src/tabcontrollers/VideoTabController.cpp b/src/tabcontrollers/VideoTabController.cpp index aa4a501..2b1741a 100644 --- a/src/tabcontrollers/VideoTabController.cpp +++ b/src/tabcontrollers/VideoTabController.cpp @@ -519,7 +519,6 @@ void VideoTabController::setColorRed( float value, bool notify, bool keepValue ) LOG( DEBUG ) << "Changed Red Value to: " << colorRed(); - vr::VRSettings()->Sync(); if ( notify ) { emit colorRedChanged( colorRed() ); @@ -570,7 +569,6 @@ void VideoTabController::setColorGreen( float value, LOG( DEBUG ) << "Changed Green Value to: " << colorGreen(); - vr::VRSettings()->Sync(); if ( notify ) { emit colorGreenChanged( colorGreen() ); @@ -620,7 +618,6 @@ void VideoTabController::setColorBlue( float value, LOG( DEBUG ) << "Changed Blue Value to: " << colorBlue(); - vr::VRSettings()->Sync(); if ( notify ) { emit colorBlueChanged( colorBlue() ); @@ -712,7 +709,6 @@ void VideoTabController::initSupersampleOverride() << vr::VRSettings()->GetSettingsErrorNameFromEnum( vrSettingsError ); } - vr::VRSettings()->Sync(); setAllowSupersampleOverride( temporary, true ); } @@ -737,7 +733,6 @@ void VideoTabController::setSuperSampling( float value, const bool notify ) vr::VRSettings()->SetFloat( vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_SupersampleScale_Float, m_superSampling ); - vr::VRSettings()->Sync(); if ( notify ) { emit superSamplingChanged( m_superSampling ); @@ -755,7 +750,6 @@ void VideoTabController::setAllowSupersampleOverride( const bool value, vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_SupersampleManualOverride_Bool, m_allowSupersampleOverride ); - vr::VRSettings()->Sync(); if ( notify ) { emit allowSupersampleOverrideChanged( m_allowSupersampleOverride ); @@ -783,7 +777,6 @@ void VideoTabController::setMotionSmoothing( const bool value, vr::VRSettings()->SetBool( vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_MotionSmoothing_Bool, m_motionSmoothing ); - vr::VRSettings()->Sync(); if ( notify ) { emit motionSmoothingChanged( m_motionSmoothing ); @@ -807,7 +800,6 @@ void VideoTabController::initMotionSmoothing() << vr::VRSettings()->GetSettingsErrorNameFromEnum( vrSettingsError ); } - vr::VRSettings()->Sync(); setMotionSmoothing( temporary, true ); } @@ -826,7 +818,6 @@ void VideoTabController::setAllowSupersampleFiltering( const bool value, vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_AllowSupersampleFiltering_Bool, m_allowSupersampleFiltering ); - vr::VRSettings()->Sync(); if ( notify ) { emit allowSupersampleFilteringChanged( @@ -893,7 +884,6 @@ void VideoTabController::applyVideoProfile( const unsigned index ) setBrightnessEnabled( profile.brightnessToggle ); setBrightnessValue( profile.brightnessValue ); setColorOverlayOpacity( profile.opacity ); - vr::VRSettings()->Sync( true ); } } diff --git a/src/utils/setup.cpp b/src/utils/setup.cpp index ba5942b..04d9aaf 100644 --- a/src/utils/setup.cpp +++ b/src/utils/setup.cpp @@ -141,7 +141,6 @@ void installApplicationManifest( const std::string manifestPath ) vr::VRApplications()->GetApplicationsErrorNameFromEnum( app_error ) ) ); } - vr::VRSettings()->Sync( true ); } } @@ -153,7 +152,6 @@ void removeApplicationManifest( const std::string manifestPath ) { vr::VRApplications()->RemoveApplicationManifest( manifestPath.c_str() ); LOG( INFO ) << "Attempting to Remove Manifest At: " << manifestPath; - vr::VRSettings()->Sync( true ); } if ( vr::VRApplications()->IsApplicationInstalled( application_strings::applicationKey ) ) @@ -270,8 +268,6 @@ void forceRemoveApplicationManifest() { throw std::runtime_error( "Could not find application manifest." ); } - // Keep Settings Clean - vr::VRSettings()->Sync( true ); if ( installManifest ) { reinstallApplicationManifest( *manifestPath ); diff --git a/third-party/openvr/bin/linux32/libopenvr_api.so b/third-party/openvr/bin/linux32/libopenvr_api.so index 71ec8d3..fb7284c 100644 Binary files a/third-party/openvr/bin/linux32/libopenvr_api.so and b/third-party/openvr/bin/linux32/libopenvr_api.so differ diff --git a/third-party/openvr/bin/linux32/libopenvr_api.so.dbg b/third-party/openvr/bin/linux32/libopenvr_api.so.dbg index 4a3e76c..40eed0e 100644 Binary files a/third-party/openvr/bin/linux32/libopenvr_api.so.dbg and b/third-party/openvr/bin/linux32/libopenvr_api.so.dbg differ diff --git a/third-party/openvr/bin/linux64/libopenvr_api.so b/third-party/openvr/bin/linux64/libopenvr_api.so index 8644b3f..1e035ae 100644 Binary files a/third-party/openvr/bin/linux64/libopenvr_api.so and b/third-party/openvr/bin/linux64/libopenvr_api.so differ diff --git a/third-party/openvr/bin/linux64/libopenvr_api.so.dbg b/third-party/openvr/bin/linux64/libopenvr_api.so.dbg index 6e0568c..ca2eded 100644 Binary files a/third-party/openvr/bin/linux64/libopenvr_api.so.dbg and b/third-party/openvr/bin/linux64/libopenvr_api.so.dbg differ diff --git a/third-party/openvr/bin/win32/openvr_api.dll b/third-party/openvr/bin/win32/openvr_api.dll index 94e3bd9..f5c6e9b 100644 Binary files a/third-party/openvr/bin/win32/openvr_api.dll and b/third-party/openvr/bin/win32/openvr_api.dll differ diff --git a/third-party/openvr/bin/win32/openvr_api.pdb b/third-party/openvr/bin/win32/openvr_api.pdb index 8aa66a1..94cd443 100644 Binary files a/third-party/openvr/bin/win32/openvr_api.pdb and b/third-party/openvr/bin/win32/openvr_api.pdb differ diff --git a/third-party/openvr/bin/win64/openvr_api.dll b/third-party/openvr/bin/win64/openvr_api.dll index b70ee19..bd76c2a 100644 Binary files a/third-party/openvr/bin/win64/openvr_api.dll and b/third-party/openvr/bin/win64/openvr_api.dll differ diff --git a/third-party/openvr/bin/win64/openvr_api.pdb b/third-party/openvr/bin/win64/openvr_api.pdb index 0449eb4..9c39aea 100644 Binary files a/third-party/openvr/bin/win64/openvr_api.pdb and b/third-party/openvr/bin/win64/openvr_api.pdb differ diff --git a/third-party/openvr/headers/openvr.h b/third-party/openvr/headers/openvr.h index b538c47..0a2e008 100644 --- a/third-party/openvr/headers/openvr.h +++ b/third-party/openvr/headers/openvr.h @@ -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 ) diff --git a/third-party/openvr/headers/openvr_api.cs b/third-party/openvr/headers/openvr_api.cs index dedef36..2f30de3 100644 --- a/third-party/openvr/headers/openvr_api.cs +++ b/third-party/openvr/headers/openvr_api.cs @@ -889,6 +889,16 @@ public struct IVRCompositor [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsCurrentSceneFocusAppLoading IsCurrentSceneFocusAppLoading; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRCompositorError _SetStageOverride_Async(string pchRenderModelPath, ref HmdMatrix34_t pTransform, ref Compositor_StageRenderSettings pRenderSettings, uint nSizeOfRenderSettings); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SetStageOverride_Async SetStageOverride_Async; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate void _ClearStageOverride(); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _ClearStageOverride ClearStageOverride; + } [StructLayout(LayoutKind.Sequential)] @@ -954,6 +964,11 @@ public struct IVROverlay [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetOverlayFlag GetOverlayFlag; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _GetOverlayFlags(ulong ulOverlayHandle, ref uint pFlags); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetOverlayFlags GetOverlayFlags; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVROverlayError _SetOverlayColor(ulong ulOverlayHandle, float fRed, float fGreen, float fBlue); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -1089,6 +1104,16 @@ public struct IVROverlay [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetOverlayTransformOverlayRelative SetOverlayTransformOverlayRelative; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _SetOverlayTransformCursor(ulong ulCursorOverlayHandle, ref HmdVector2_t pvHotspot); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SetOverlayTransformCursor SetOverlayTransformCursor; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _GetOverlayTransformCursor(ulong ulOverlayHandle, ref HmdVector2_t pvHotspot); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetOverlayTransformCursor GetOverlayTransformCursor; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVROverlayError _ShowOverlay(ulong ulOverlayHandle); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -1154,6 +1179,31 @@ public struct IVROverlay [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; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _TriggerLaserMouseHapticVibration(ulong ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _TriggerLaserMouseHapticVibration TriggerLaserMouseHapticVibration; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _SetOverlayCursor(ulong ulOverlayHandle, ulong ulCursorHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SetOverlayCursor SetOverlayCursor; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _SetOverlayCursorPositionOverride(ulong ulOverlayHandle, ref HmdVector2_t pvCursor); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SetOverlayCursorPositionOverride SetOverlayCursorPositionOverride; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _ClearOverlayCursorPositionOverride(ulong ulOverlayHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _ClearOverlayCursorPositionOverride ClearOverlayCursorPositionOverride; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVROverlayError _SetOverlayTexture(ulong ulOverlayHandle, ref Texture_t pTexture); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -1165,7 +1215,7 @@ public struct IVROverlay internal _ClearOverlayTexture ClearOverlayTexture; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayRaw(ulong ulOverlayHandle, IntPtr pvBuffer, uint unWidth, uint unHeight, uint unDepth); + internal delegate EVROverlayError _SetOverlayRaw(ulong ulOverlayHandle, IntPtr pvBuffer, uint unWidth, uint unHeight, uint unBytesPerPixel); [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetOverlayRaw SetOverlayRaw; @@ -1254,16 +1304,6 @@ public struct IVROverlay [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetKeyboardPositionForOverlay SetKeyboardPositionForOverlay; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayIntersectionMask(ulong ulOverlayHandle, ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, uint unNumMaskPrimitives, uint unPrimitiveSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayIntersectionMask SetOverlayIntersectionMask; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayFlags(ulong ulOverlayHandle, ref uint pFlags); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayFlags GetOverlayFlags; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate VRMessageOverlayResponse _ShowMessageOverlay(string pchText, string pchCaption, string pchButton0Text, string pchButton1Text, string pchButton2Text, string pchButton3Text); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -1399,11 +1439,6 @@ public struct IVRSettings [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetSettingsErrorNameFromEnum GetSettingsErrorNameFromEnum; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _Sync(bool bForce, ref EVRSettingsError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _Sync Sync; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate void _SetBool(string pchSection, string pchSettingsKey, bool bValue, ref EVRSettingsError peError); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -2745,6 +2780,15 @@ public class CVRCompositor bool result = FnTable.IsCurrentSceneFocusAppLoading(); return result; } + public EVRCompositorError SetStageOverride_Async(string pchRenderModelPath,ref HmdMatrix34_t pTransform,ref Compositor_StageRenderSettings pRenderSettings,uint nSizeOfRenderSettings) + { + EVRCompositorError result = FnTable.SetStageOverride_Async(pchRenderModelPath,ref pTransform,ref pRenderSettings,nSizeOfRenderSettings); + return result; + } + public void ClearStageOverride() + { + FnTable.ClearStageOverride(); + } } @@ -2820,6 +2864,12 @@ public class CVROverlay EVROverlayError result = FnTable.GetOverlayFlag(ulOverlayHandle,eOverlayFlag,ref pbEnabled); return result; } + public EVROverlayError GetOverlayFlags(ulong ulOverlayHandle,ref uint pFlags) + { + pFlags = 0; + EVROverlayError result = FnTable.GetOverlayFlags(ulOverlayHandle,ref pFlags); + return result; + } public EVROverlayError SetOverlayColor(ulong ulOverlayHandle,float fRed,float fGreen,float fBlue) { EVROverlayError result = FnTable.SetOverlayColor(ulOverlayHandle,fRed,fGreen,fBlue); @@ -2966,6 +3016,16 @@ public class CVROverlay EVROverlayError result = FnTable.SetOverlayTransformOverlayRelative(ulOverlayHandle,ulOverlayHandleParent,ref pmatParentOverlayToOverlayTransform); return result; } + public EVROverlayError SetOverlayTransformCursor(ulong ulCursorOverlayHandle,ref HmdVector2_t pvHotspot) + { + EVROverlayError result = FnTable.SetOverlayTransformCursor(ulCursorOverlayHandle,ref pvHotspot); + return result; + } + public EVROverlayError GetOverlayTransformCursor(ulong ulOverlayHandle,ref HmdVector2_t pvHotspot) + { + EVROverlayError result = FnTable.GetOverlayTransformCursor(ulOverlayHandle,ref pvHotspot); + return result; + } public EVROverlayError ShowOverlay(ulong ulOverlayHandle) { EVROverlayError result = FnTable.ShowOverlay(ulOverlayHandle); @@ -3058,6 +3118,31 @@ public class CVROverlay 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); + return result; + } + public EVROverlayError TriggerLaserMouseHapticVibration(ulong ulOverlayHandle,float fDurationSeconds,float fFrequency,float fAmplitude) + { + EVROverlayError result = FnTable.TriggerLaserMouseHapticVibration(ulOverlayHandle,fDurationSeconds,fFrequency,fAmplitude); + return result; + } + public EVROverlayError SetOverlayCursor(ulong ulOverlayHandle,ulong ulCursorHandle) + { + EVROverlayError result = FnTable.SetOverlayCursor(ulOverlayHandle,ulCursorHandle); + return result; + } + public EVROverlayError SetOverlayCursorPositionOverride(ulong ulOverlayHandle,ref HmdVector2_t pvCursor) + { + EVROverlayError result = FnTable.SetOverlayCursorPositionOverride(ulOverlayHandle,ref pvCursor); + return result; + } + public EVROverlayError ClearOverlayCursorPositionOverride(ulong ulOverlayHandle) + { + EVROverlayError result = FnTable.ClearOverlayCursorPositionOverride(ulOverlayHandle); + return result; + } public EVROverlayError SetOverlayTexture(ulong ulOverlayHandle,ref Texture_t pTexture) { EVROverlayError result = FnTable.SetOverlayTexture(ulOverlayHandle,ref pTexture); @@ -3068,9 +3153,9 @@ public class CVROverlay EVROverlayError result = FnTable.ClearOverlayTexture(ulOverlayHandle); return result; } - public EVROverlayError SetOverlayRaw(ulong ulOverlayHandle,IntPtr pvBuffer,uint unWidth,uint unHeight,uint unDepth) + public EVROverlayError SetOverlayRaw(ulong ulOverlayHandle,IntPtr pvBuffer,uint unWidth,uint unHeight,uint unBytesPerPixel) { - EVROverlayError result = FnTable.SetOverlayRaw(ulOverlayHandle,pvBuffer,unWidth,unHeight,unDepth); + EVROverlayError result = FnTable.SetOverlayRaw(ulOverlayHandle,pvBuffer,unWidth,unHeight,unBytesPerPixel); return result; } public EVROverlayError SetOverlayFromFile(ulong ulOverlayHandle,string pchFilePath) @@ -3162,17 +3247,6 @@ public class CVROverlay { FnTable.SetKeyboardPositionForOverlay(ulOverlayHandle,avoidRect); } - public EVROverlayError SetOverlayIntersectionMask(ulong ulOverlayHandle,ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives,uint unNumMaskPrimitives,uint unPrimitiveSize) - { - EVROverlayError result = FnTable.SetOverlayIntersectionMask(ulOverlayHandle,ref pMaskPrimitives,unNumMaskPrimitives,unPrimitiveSize); - return result; - } - public EVROverlayError GetOverlayFlags(ulong ulOverlayHandle,ref uint pFlags) - { - pFlags = 0; - EVROverlayError result = FnTable.GetOverlayFlags(ulOverlayHandle,ref pFlags); - return result; - } public VRMessageOverlayResponse ShowMessageOverlay(string pchText,string pchCaption,string pchButton0Text,string pchButton1Text,string pchButton2Text,string pchButton3Text) { VRMessageOverlayResponse result = FnTable.ShowMessageOverlay(pchText,pchCaption,pchButton0Text,pchButton1Text,pchButton2Text,pchButton3Text); @@ -3346,11 +3420,6 @@ public class CVRSettings IntPtr result = FnTable.GetSettingsErrorNameFromEnum(eError); return Marshal.PtrToStringAnsi(result); } - public bool Sync(bool bForce,ref EVRSettingsError peError) - { - bool result = FnTable.Sync(bForce,ref peError); - return result; - } public void SetBool(string pchSection,string pchSettingsKey,bool bValue,ref EVRSettingsError peError) { FnTable.SetBool(pchSection,pchSettingsKey,bValue,ref peError); @@ -3831,6 +3900,7 @@ public enum ETrackedControllerRole RightHand = 2, OptOut = 3, Treadmill = 4, + Stylus = 5, Max = 5, } public enum ETrackingUniverseOrigin @@ -3897,6 +3967,10 @@ public enum ETrackedDeviceProperty Prop_AdditionalSystemReportData_String = 1045, Prop_CompositeFirmwareVersion_String = 1046, Prop_Firmware_RemindUpdate_Bool = 1047, + Prop_PeripheralApplicationVersion_Uint64 = 1048, + Prop_ManufacturerSerialNumber_String = 1049, + Prop_ComputedSerialNumber_String = 1050, + Prop_EstimatedDeviceFirstUseTime_Int32 = 1051, Prop_ReportsTimeSinceVSync_Bool = 2000, Prop_SecondsFromVsyncToPhotons_Float = 2001, Prop_DisplayFrequency_Float = 2002, @@ -3971,11 +4045,16 @@ public enum ETrackedDeviceProperty Prop_ExpectedControllerType_String = 2074, Prop_HmdTrackingStyle_Int32 = 2075, Prop_DriverProvidedChaperoneVisibility_Bool = 2076, - Prop_HmdProvidesDisplaySettings_Bool = 2077, + Prop_HmdColumnCorrectionSettingPrefix_String = 2077, + Prop_CameraSupportsCompatibilityModes_Bool = 2078, Prop_DisplayAvailableFrameRates_Float_Array = 2080, Prop_DisplaySupportsMultipleFramerates_Bool = 2081, 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, Prop_IpdUIRangeMinMeters_Float = 2100, @@ -4053,6 +4132,8 @@ public enum ETrackedPropertyError TrackedProp_InvalidOperation = 11, TrackedProp_CannotWriteToWildcards = 12, TrackedProp_IPCReadFailure = 13, + TrackedProp_OutOfMemory = 14, + TrackedProp_InvalidContainer = 15, } public enum EHmdTrackingStyle { @@ -4197,6 +4278,7 @@ public enum EVREventType VREvent_TrackersSectionSettingChanged = 866, VREvent_LastKnownSectionSettingChanged = 867, VREvent_DismissedWarningsSectionSettingChanged = 868, + VREvent_GpuSpeedSectionSettingChanged = 869, VREvent_StatusUpdate = 900, VREvent_WebInterface_InstallDriverCompleted = 950, VREvent_MCImageUpdated = 1000, @@ -4218,6 +4300,7 @@ public enum EVREventType VREvent_Compositor_ApplicationResumed = 1416, VREvent_Compositor_OutOfVideoMemory = 1417, VREvent_Compositor_DisplayModeNotSupported = 1418, + VREvent_Compositor_StageOverrideReady = 1419, VREvent_TrackedCamera_StartVideoStream = 1500, VREvent_TrackedCamera_StopVideoStream = 1501, VREvent_TrackedCamera_PauseVideoStream = 1502, @@ -4236,6 +4319,7 @@ public enum EVREventType VREvent_Input_ProgressUpdate = 1705, VREvent_Input_TrackerActivated = 1706, VREvent_Input_BindingsUpdated = 1707, + VREvent_Input_BindingSubscriptionChanged = 1708, VREvent_SpatialAnchors_PoseUpdated = 1800, VREvent_SpatialAnchors_DescriptorUpdated = 1801, VREvent_SpatialAnchors_RequestPoseUpdate = 1802, @@ -4297,6 +4381,7 @@ public enum EShowUIType ShowUI_Pairing = 3, ShowUI_Settings = 4, ShowUI_DebugCommands = 5, + ShowUI_FullControllerBinding = 6, } public enum EHDCPError { @@ -4785,6 +4870,7 @@ public enum EVRCompositorError IndexOutOfRange = 107, AlreadySubmitted = 108, InvalidBounds = 109, + AlreadySet = 110, } public enum EVRCompositorTimingMode { @@ -4800,10 +4886,14 @@ public enum VROverlayInputMethod } public 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, } public enum VROverlayFlags { @@ -5593,6 +5683,20 @@ public enum EVRDebugError public uint m_nNumDroppedFramesTimedOut; public uint m_nNumReprojectedFramesTimedOut; } +[StructLayout(LayoutKind.Sequential)] public struct Compositor_StageRenderSettings +{ + public HmdColor_t m_PrimaryColor; + public HmdColor_t m_SecondaryColor; + public float m_flVignetteInnerRadius; + public float m_flVignetteOuterRadius; + public float m_flFresnelStrength; + [MarshalAs(UnmanagedType.I1)] + public bool m_bBackfaceCulling; + [MarshalAs(UnmanagedType.I1)] + public bool m_bGreyscale; + [MarshalAs(UnmanagedType.I1)] + public bool m_bWireframe; +} [StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionParams_t { public HmdVector3_t vSource; @@ -6569,6 +6673,7 @@ public class OpenVR public const uint k_unUint64PropertyTag = 3; public const uint k_unBoolPropertyTag = 4; public const uint k_unStringPropertyTag = 5; + public const uint k_unErrorPropertyTag = 6; public const uint k_unHmdMatrix34PropertyTag = 20; public const uint k_unHmdMatrix44PropertyTag = 21; public const uint k_unHmdVector3PropertyTag = 22; @@ -6604,12 +6709,12 @@ 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_022"; + public const string IVRCompositor_Version = "IVRCompositor_024"; public const uint k_unVROverlayMaxKeyLength = 128; public const uint k_unVROverlayMaxNameLength = 128; - public const uint k_unMaxOverlayCount = 64; + public const uint k_unMaxOverlayCount = 128; public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; - public const string IVROverlay_Version = "IVROverlay_021"; + public const string IVROverlay_Version = "IVROverlay_022"; 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"; @@ -6619,7 +6724,7 @@ public class OpenVR public const uint k_unNotificationTextMaxSize = 256; public const string IVRNotifications_Version = "IVRNotifications_002"; public const uint k_unMaxSettingsKeyLength = 128; - public const string IVRSettings_Version = "IVRSettings_002"; + public const string IVRSettings_Version = "IVRSettings_003"; public const string k_pch_SteamVR_Section = "steamvr"; public const string k_pch_SteamVR_RequireHmd_String = "requireHmd"; public const string k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; @@ -6658,6 +6763,7 @@ public class OpenVR public const string k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye"; public const string k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; public const string k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized"; + public const string k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph"; public const string k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; public const string k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; public const string k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; @@ -6672,7 +6778,6 @@ public class OpenVR public const string k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; public const string k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; public const string k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; - public const string k_pch_SteamVR_DebugInput = "debugInput"; public const string k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; public const string k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; public const string k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; @@ -6786,6 +6891,9 @@ public class OpenVR 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_LoadPriority_Int32 = "loadPriority"; @@ -6796,6 +6904,7 @@ public class OpenVR public const string k_pch_TrackingOverride_Section = "TrackingOverrides"; public const string k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; 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_Trackers_Section = "trackers"; public const string k_pch_DesktopUI_Section = "DesktopUI"; @@ -6807,6 +6916,7 @@ public class OpenVR public const string k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation"; public const string k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation"; public const string k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone"; + public const string k_pch_GpuSpeed_Section = "GpuSpeed"; public const string IVRScreenshots_Version = "IVRScreenshots_001"; public const string IVRResources_Version = "IVRResources_001"; public const string IVRDriverManager_Version = "IVRDriverManager_001"; diff --git a/third-party/openvr/headers/openvr_api.json b/third-party/openvr/headers/openvr_api.json index 7e414e0..b481362 100644 --- a/third-party/openvr/headers/openvr_api.json +++ b/third-party/openvr/headers/openvr_api.json @@ -83,6 +83,7 @@ ,{"name": "TrackedControllerRole_RightHand","value": "2"} ,{"name": "TrackedControllerRole_OptOut","value": "3"} ,{"name": "TrackedControllerRole_Treadmill","value": "4"} + ,{"name": "TrackedControllerRole_Stylus","value": "5"} ,{"name": "TrackedControllerRole_Max","value": "5"} ]} , {"enumname": "vr::ETrackingUniverseOrigin","values": [ @@ -146,6 +147,10 @@ ,{"name": "Prop_AdditionalSystemReportData_String","value": "1045"} ,{"name": "Prop_CompositeFirmwareVersion_String","value": "1046"} ,{"name": "Prop_Firmware_RemindUpdate_Bool","value": "1047"} + ,{"name": "Prop_PeripheralApplicationVersion_Uint64","value": "1048"} + ,{"name": "Prop_ManufacturerSerialNumber_String","value": "1049"} + ,{"name": "Prop_ComputedSerialNumber_String","value": "1050"} + ,{"name": "Prop_EstimatedDeviceFirstUseTime_Int32","value": "1051"} ,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"} ,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"} ,{"name": "Prop_DisplayFrequency_Float","value": "2002"} @@ -220,11 +225,16 @@ ,{"name": "Prop_ExpectedControllerType_String","value": "2074"} ,{"name": "Prop_HmdTrackingStyle_Int32","value": "2075"} ,{"name": "Prop_DriverProvidedChaperoneVisibility_Bool","value": "2076"} - ,{"name": "Prop_HmdProvidesDisplaySettings_Bool","value": "2077"} + ,{"name": "Prop_HmdColumnCorrectionSettingPrefix_String","value": "2077"} + ,{"name": "Prop_CameraSupportsCompatibilityModes_Bool","value": "2078"} ,{"name": "Prop_DisplayAvailableFrameRates_Float_Array","value": "2080"} ,{"name": "Prop_DisplaySupportsMultipleFramerates_Bool","value": "2081"} ,{"name": "Prop_DisplayColorMultLeft_Vector3","value": "2082"} ,{"name": "Prop_DisplayColorMultRight_Vector3","value": "2083"} + ,{"name": "Prop_DisplaySupportsRuntimeFramerateChange_Bool","value": "2084"} + ,{"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"} @@ -301,6 +311,8 @@ ,{"name": "TrackedProp_InvalidOperation","value": "11"} ,{"name": "TrackedProp_CannotWriteToWildcards","value": "12"} ,{"name": "TrackedProp_IPCReadFailure","value": "13"} + ,{"name": "TrackedProp_OutOfMemory","value": "14"} + ,{"name": "TrackedProp_InvalidContainer","value": "15"} ]} , {"enumname": "vr::EHmdTrackingStyle","values": [ {"name": "HmdTrackingStyle_Unknown","value": "0"} @@ -441,6 +453,7 @@ ,{"name": "VREvent_TrackersSectionSettingChanged","value": "866"} ,{"name": "VREvent_LastKnownSectionSettingChanged","value": "867"} ,{"name": "VREvent_DismissedWarningsSectionSettingChanged","value": "868"} + ,{"name": "VREvent_GpuSpeedSectionSettingChanged","value": "869"} ,{"name": "VREvent_StatusUpdate","value": "900"} ,{"name": "VREvent_WebInterface_InstallDriverCompleted","value": "950"} ,{"name": "VREvent_MCImageUpdated","value": "1000"} @@ -462,6 +475,7 @@ ,{"name": "VREvent_Compositor_ApplicationResumed","value": "1416"} ,{"name": "VREvent_Compositor_OutOfVideoMemory","value": "1417"} ,{"name": "VREvent_Compositor_DisplayModeNotSupported","value": "1418"} + ,{"name": "VREvent_Compositor_StageOverrideReady","value": "1419"} ,{"name": "VREvent_TrackedCamera_StartVideoStream","value": "1500"} ,{"name": "VREvent_TrackedCamera_StopVideoStream","value": "1501"} ,{"name": "VREvent_TrackedCamera_PauseVideoStream","value": "1502"} @@ -480,6 +494,7 @@ ,{"name": "VREvent_Input_ProgressUpdate","value": "1705"} ,{"name": "VREvent_Input_TrackerActivated","value": "1706"} ,{"name": "VREvent_Input_BindingsUpdated","value": "1707"} + ,{"name": "VREvent_Input_BindingSubscriptionChanged","value": "1708"} ,{"name": "VREvent_SpatialAnchors_PoseUpdated","value": "1800"} ,{"name": "VREvent_SpatialAnchors_DescriptorUpdated","value": "1801"} ,{"name": "VREvent_SpatialAnchors_RequestPoseUpdate","value": "1802"} @@ -536,6 +551,7 @@ ,{"name": "ShowUI_Pairing","value": "3"} ,{"name": "ShowUI_Settings","value": "4"} ,{"name": "ShowUI_DebugCommands","value": "5"} + ,{"name": "ShowUI_FullControllerBinding","value": "6"} ]} , {"enumname": "vr::EHDCPError","values": [ {"name": "HDCPError_None","value": "0"} @@ -994,6 +1010,7 @@ ,{"name": "VRCompositorError_IndexOutOfRange","value": "107"} ,{"name": "VRCompositorError_AlreadySubmitted","value": "108"} ,{"name": "VRCompositorError_InvalidBounds","value": "109"} + ,{"name": "VRCompositorError_AlreadySet","value": "110"} ]} , {"enumname": "vr::EVRCompositorTimingMode","values": [ {"name": "VRCompositorTimingMode_Implicit","value": "0"} @@ -1006,10 +1023,14 @@ ,{"name": "VROverlayInputMethod_DualAnalog","value": "2"} ]} , {"enumname": "vr::VROverlayTransformType","values": [ - {"name": "VROverlayTransform_Absolute","value": "0"} + {"name": "VROverlayTransform_Invalid","value": "-1"} + ,{"name": "VROverlayTransform_Absolute","value": "0"} ,{"name": "VROverlayTransform_TrackedDeviceRelative","value": "1"} ,{"name": "VROverlayTransform_SystemOverlay","value": "2"} ,{"name": "VROverlayTransform_TrackedComponent","value": "3"} + ,{"name": "VROverlayTransform_Cursor","value": "4"} + ,{"name": "VROverlayTransform_DashboardTab","value": "5"} + ,{"name": "VROverlayTransform_DashboardThumb","value": "6"} ]} , {"enumname": "vr::VROverlayFlags","values": [ {"name": "VROverlayFlags_NoDashboardTab","value": "8"} @@ -1186,6 +1207,8 @@ "constname": "k_unBoolPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "4"} ,{ "constname": "k_unStringPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "5"} +,{ + "constname": "k_unErrorPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "6"} ,{ "constname": "k_unHmdMatrix34PropertyTag","consttype": "const PropertyTypeTag_t", "constval": "20"} ,{ @@ -1257,17 +1280,17 @@ ,{ "constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_006"} ,{ - "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_022"} + "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_024"} ,{ "constname": "k_unVROverlayMaxKeyLength","consttype": "const uint32_t", "constval": "128"} ,{ "constname": "k_unVROverlayMaxNameLength","consttype": "const uint32_t", "constval": "128"} ,{ - "constname": "k_unMaxOverlayCount","consttype": "const uint32_t", "constval": "64"} + "constname": "k_unMaxOverlayCount","consttype": "const uint32_t", "constval": "128"} ,{ "constname": "k_unMaxOverlayIntersectionMaskPrimitivesCount","consttype": "const uint32_t", "constval": "32"} ,{ - "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_021"} + "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_022"} ,{ "constname": "k_pch_Controller_Component_GDC2015","consttype": "const char *const", "constval": "gdc2015"} ,{ @@ -1287,7 +1310,7 @@ ,{ "constname": "k_unMaxSettingsKeyLength","consttype": "const uint32_t", "constval": "128"} ,{ - "constname": "IVRSettings_Version","consttype": "const char *const", "constval": "IVRSettings_002"} + "constname": "IVRSettings_Version","consttype": "const char *const", "constval": "IVRSettings_003"} ,{ "constname": "k_pch_SteamVR_Section","consttype": "const char *const", "constval": "steamvr"} ,{ @@ -1364,6 +1387,8 @@ "constname": "k_pch_SteamVR_MirrorViewGeometry_String","consttype": "const char *const", "constval": "mirrorViewGeometry"} ,{ "constname": "k_pch_SteamVR_MirrorViewGeometryMaximized_String","consttype": "const char *const", "constval": "mirrorViewGeometryMaximized"} +,{ + "constname": "k_pch_SteamVR_PerfGraphVisibility_Bool","consttype": "const char *const", "constval": "showPerfGraph"} ,{ "constname": "k_pch_SteamVR_StartMonitorFromAppLaunch","consttype": "const char *const", "constval": "startMonitorFromAppLaunch"} ,{ @@ -1392,8 +1417,6 @@ "constname": "k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool","consttype": "const char *const", "constval": "haveStartedTutorialForNativeChaperoneDriver"} ,{ "constname": "k_pch_SteamVR_ForceWindows32bitVRMonitor","consttype": "const char *const", "constval": "forceWindows32BitVRMonitor"} -,{ - "constname": "k_pch_SteamVR_DebugInput","consttype": "const char *const", "constval": "debugInput"} ,{ "constname": "k_pch_SteamVR_DebugInputBinding","consttype": "const char *const", "constval": "debugInputBinding"} ,{ @@ -1620,6 +1643,12 @@ "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"} +,{ + "constname": "k_pch_Dashboard_DesktopScale","consttype": "const char *const", "constval": "desktopScale"} +,{ + "constname": "k_pch_Dashboard_DashboardScale","consttype": "const char *const", "constval": "dashboardScale"} ,{ "constname": "k_pch_modelskin_Section","consttype": "const char *const", "constval": "modelskins"} ,{ @@ -1640,6 +1669,8 @@ "constname": "k_pch_App_BindingAutosaveURLSuffix_String","consttype": "const char *const", "constval": "AutosaveURL"} ,{ "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"} ,{ @@ -1662,6 +1693,8 @@ "constname": "k_pch_Input_RightThumbstickRotation_Float","consttype": "const char *const", "constval": "rightThumbstickRotation"} ,{ "constname": "k_pch_Input_ThumbstickDeadzone_Float","consttype": "const char *const", "constval": "thumbstickDeadzone"} +,{ + "constname": "k_pch_GpuSpeed_Section","consttype": "const char *const", "constval": "GpuSpeed"} ,{ "constname": "IVRScreenshots_Version","consttype": "const char *const", "constval": "IVRScreenshots_001"} ,{ @@ -2003,6 +2036,15 @@ { "fieldname": "m_nNumFramePresentsTimedOut", "fieldtype": "uint32_t"}, { "fieldname": "m_nNumDroppedFramesTimedOut", "fieldtype": "uint32_t"}, { "fieldname": "m_nNumReprojectedFramesTimedOut", "fieldtype": "uint32_t"}]} +,{"struct": "vr::Compositor_StageRenderSettings","fields": [ +{ "fieldname": "m_PrimaryColor", "fieldtype": "struct vr::HmdColor_t"}, +{ "fieldname": "m_SecondaryColor", "fieldtype": "struct vr::HmdColor_t"}, +{ "fieldname": "m_flVignetteInnerRadius", "fieldtype": "float"}, +{ "fieldname": "m_flVignetteOuterRadius", "fieldtype": "float"}, +{ "fieldname": "m_flFresnelStrength", "fieldtype": "float"}, +{ "fieldname": "m_bBackfaceCulling", "fieldtype": "_Bool"}, +{ "fieldname": "m_bGreyscale", "fieldtype": "_Bool"}, +{ "fieldname": "m_bWireframe", "fieldtype": "_Bool"}]} ,{"struct": "vr::VROverlayIntersectionParams_t","fields": [ { "fieldname": "vSource", "fieldtype": "struct vr::HmdVector3_t"}, { "fieldname": "vDirection", "fieldtype": "struct vr::HmdVector3_t"}, @@ -3494,6 +3536,22 @@ "methodname": "IsCurrentSceneFocusAppLoading", "returntype": "bool" } +,{ + "classname": "vr::IVRCompositor", + "methodname": "SetStageOverride_Async", + "returntype": "vr::EVRCompositorError", + "params": [ +{ "paramname": "pchRenderModelPath" ,"paramtype": "const char *"}, +{ "paramname": "pTransform" ,"paramtype": "const struct vr::HmdMatrix34_t *"}, +{ "paramname": "pRenderSettings" ,"paramtype": "const struct vr::Compositor_StageRenderSettings *"}, +{ "paramname": "nSizeOfRenderSettings" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRCompositor", + "methodname": "ClearStageOverride", + "returntype": "void" +} ,{ "classname": "vr::IVROverlay", "methodname": "FindOverlay", @@ -3609,6 +3667,15 @@ { "paramname": "pbEnabled" ,"paramtype": "bool *"} ] } +,{ + "classname": "vr::IVROverlay", + "methodname": "GetOverlayFlags", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "pFlags" ,"paramtype": "uint32_t *"} + ] +} ,{ "classname": "vr::IVROverlay", "methodname": "SetOverlayColor", @@ -3869,6 +3936,24 @@ { "paramname": "pmatParentOverlayToOverlayTransform" ,"paramtype": "const struct vr::HmdMatrix34_t *"} ] } +,{ + "classname": "vr::IVROverlay", + "methodname": "SetOverlayTransformCursor", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulCursorOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "pvHotspot" ,"paramtype": "const struct vr::HmdVector2_t *"} + ] +} +,{ + "classname": "vr::IVROverlay", + "methodname": "GetOverlayTransformCursor", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "pvHotspot" ,"paramtype": "struct vr::HmdVector2_t *"} + ] +} ,{ "classname": "vr::IVROverlay", "methodname": "ShowOverlay", @@ -3990,6 +4075,54 @@ { "paramname": "pfRadius" ,"paramtype": "float *"} ] } +,{ + "classname": "vr::IVROverlay", + "methodname": "SetOverlayIntersectionMask", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "pMaskPrimitives" ,"paramtype": "struct vr::VROverlayIntersectionMaskPrimitive_t *"}, +{ "paramname": "unNumMaskPrimitives" ,"paramtype": "uint32_t"}, +{ "paramname": "unPrimitiveSize" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVROverlay", + "methodname": "TriggerLaserMouseHapticVibration", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "fDurationSeconds" ,"paramtype": "float"}, +{ "paramname": "fFrequency" ,"paramtype": "float"}, +{ "paramname": "fAmplitude" ,"paramtype": "float"} + ] +} +,{ + "classname": "vr::IVROverlay", + "methodname": "SetOverlayCursor", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "ulCursorHandle" ,"paramtype": "vr::VROverlayHandle_t"} + ] +} +,{ + "classname": "vr::IVROverlay", + "methodname": "SetOverlayCursorPositionOverride", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "pvCursor" ,"paramtype": "const struct vr::HmdVector2_t *"} + ] +} +,{ + "classname": "vr::IVROverlay", + "methodname": "ClearOverlayCursorPositionOverride", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"} + ] +} ,{ "classname": "vr::IVROverlay", "methodname": "SetOverlayTexture", @@ -4016,7 +4149,7 @@ { "paramname": "pvBuffer" ,"paramtype": "void *"}, { "paramname": "unWidth" ,"paramtype": "uint32_t"}, { "paramname": "unHeight" ,"paramtype": "uint32_t"}, -{ "paramname": "unDepth" ,"paramtype": "uint32_t"} +{ "paramname": "unBytesPerPixel" ,"paramtype": "uint32_t"} ] } ,{ @@ -4179,26 +4312,6 @@ { "paramname": "avoidRect" ,"paramtype": "struct vr::HmdRect2_t"} ] } -,{ - "classname": "vr::IVROverlay", - "methodname": "SetOverlayIntersectionMask", - "returntype": "vr::EVROverlayError", - "params": [ -{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, -{ "paramname": "pMaskPrimitives" ,"paramtype": "struct vr::VROverlayIntersectionMaskPrimitive_t *"}, -{ "paramname": "unNumMaskPrimitives" ,"paramtype": "uint32_t"}, -{ "paramname": "unPrimitiveSize" ,"paramtype": "uint32_t"} - ] -} -,{ - "classname": "vr::IVROverlay", - "methodname": "GetOverlayFlags", - "returntype": "vr::EVROverlayError", - "params": [ -{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, -{ "paramname": "pFlags" ,"paramtype": "uint32_t *"} - ] -} ,{ "classname": "vr::IVROverlay", "methodname": "ShowMessageOverlay", @@ -4425,15 +4538,6 @@ { "paramname": "eError" ,"paramtype": "vr::EVRSettingsError"} ] } -,{ - "classname": "vr::IVRSettings", - "methodname": "Sync", - "returntype": "bool", - "params": [ -{ "paramname": "bForce" ,"paramtype": "bool"}, -{ "paramname": "peError" ,"paramtype": "vr::EVRSettingsError *"} - ] -} ,{ "classname": "vr::IVRSettings", "methodname": "SetBool", diff --git a/third-party/openvr/headers/openvr_capi.h b/third-party/openvr/headers/openvr_capi.h index f018493..c636d53 100644 --- a/third-party/openvr/headers/openvr_capi.h +++ b/third-party/openvr/headers/openvr_capi.h @@ -77,6 +77,7 @@ static const unsigned int k_unInt32PropertyTag = 2; 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_unHmdMatrix34PropertyTag = 20; static const unsigned int k_unHmdMatrix44PropertyTag = 21; static const unsigned int k_unHmdVector3PropertyTag = 22; @@ -112,12 +113,12 @@ 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_022"; +static const char * IVRCompositor_Version = "IVRCompositor_024"; static const unsigned int k_unVROverlayMaxKeyLength = 128; static const unsigned int k_unVROverlayMaxNameLength = 128; -static const unsigned int k_unMaxOverlayCount = 64; +static const unsigned int k_unMaxOverlayCount = 128; static const unsigned int k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; -static const char * IVROverlay_Version = "IVROverlay_021"; +static const char * IVROverlay_Version = "IVROverlay_022"; 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"; @@ -127,7 +128,7 @@ static const char * IVRRenderModels_Version = "IVRRenderModels_006"; static const unsigned int k_unNotificationTextMaxSize = 256; static const char * IVRNotifications_Version = "IVRNotifications_002"; static const unsigned int k_unMaxSettingsKeyLength = 128; -static const char * IVRSettings_Version = "IVRSettings_002"; +static const char * IVRSettings_Version = "IVRSettings_003"; static const char * k_pch_SteamVR_Section = "steamvr"; static const char * k_pch_SteamVR_RequireHmd_String = "requireHmd"; static const char * k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; @@ -166,6 +167,7 @@ static const char * k_pch_SteamVR_MirrorViewDisplayMode_Int32 = "mirrorViewDispl static const char * k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye"; static const char * k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; static const char * k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized"; +static const char * k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph"; static const char * k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; static const char * k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; static const char * k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; @@ -180,7 +182,6 @@ static const char * k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulk static const char * k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; static const char * k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; static const char * k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; -static const char * k_pch_SteamVR_DebugInput = "debugInput"; static const char * k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; static const char * k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; static const char * k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; @@ -294,6 +295,9 @@ 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_LoadPriority_Int32 = "loadPriority"; @@ -304,6 +308,7 @@ 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_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_Trackers_Section = "trackers"; static const char * k_pch_DesktopUI_Section = "DesktopUI"; @@ -315,6 +320,7 @@ static const char * k_pch_Input_Section = "input"; static const char * k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation"; static const char * k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation"; static const char * k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone"; +static const char * k_pch_GpuSpeed_Section = "GpuSpeed"; static const char * IVRScreenshots_Version = "IVRScreenshots_001"; static const char * IVRResources_Version = "IVRResources_001"; static const char * IVRDriverManager_Version = "IVRDriverManager_001"; @@ -384,6 +390,7 @@ typedef enum ETrackedControllerRole ETrackedControllerRole_TrackedControllerRole_RightHand = 2, ETrackedControllerRole_TrackedControllerRole_OptOut = 3, ETrackedControllerRole_TrackedControllerRole_Treadmill = 4, + ETrackedControllerRole_TrackedControllerRole_Stylus = 5, ETrackedControllerRole_TrackedControllerRole_Max = 5, } ETrackedControllerRole; @@ -453,6 +460,10 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_AdditionalSystemReportData_String = 1045, ETrackedDeviceProperty_Prop_CompositeFirmwareVersion_String = 1046, ETrackedDeviceProperty_Prop_Firmware_RemindUpdate_Bool = 1047, + ETrackedDeviceProperty_Prop_PeripheralApplicationVersion_Uint64 = 1048, + ETrackedDeviceProperty_Prop_ManufacturerSerialNumber_String = 1049, + ETrackedDeviceProperty_Prop_ComputedSerialNumber_String = 1050, + ETrackedDeviceProperty_Prop_EstimatedDeviceFirstUseTime_Int32 = 1051, ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000, ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001, ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002, @@ -527,11 +538,16 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_ExpectedControllerType_String = 2074, ETrackedDeviceProperty_Prop_HmdTrackingStyle_Int32 = 2075, ETrackedDeviceProperty_Prop_DriverProvidedChaperoneVisibility_Bool = 2076, - ETrackedDeviceProperty_Prop_HmdProvidesDisplaySettings_Bool = 2077, + ETrackedDeviceProperty_Prop_HmdColumnCorrectionSettingPrefix_String = 2077, + ETrackedDeviceProperty_Prop_CameraSupportsCompatibilityModes_Bool = 2078, ETrackedDeviceProperty_Prop_DisplayAvailableFrameRates_Float_Array = 2080, ETrackedDeviceProperty_Prop_DisplaySupportsMultipleFramerates_Bool = 2081, ETrackedDeviceProperty_Prop_DisplayColorMultLeft_Vector3 = 2082, ETrackedDeviceProperty_Prop_DisplayColorMultRight_Vector3 = 2083, + ETrackedDeviceProperty_Prop_DisplaySupportsRuntimeFramerateChange_Bool = 2084, + 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, @@ -610,6 +626,8 @@ typedef enum ETrackedPropertyError ETrackedPropertyError_TrackedProp_InvalidOperation = 11, ETrackedPropertyError_TrackedProp_CannotWriteToWildcards = 12, ETrackedPropertyError_TrackedProp_IPCReadFailure = 13, + ETrackedPropertyError_TrackedProp_OutOfMemory = 14, + ETrackedPropertyError_TrackedProp_InvalidContainer = 15, } ETrackedPropertyError; typedef enum EHmdTrackingStyle @@ -758,6 +776,7 @@ typedef enum EVREventType EVREventType_VREvent_TrackersSectionSettingChanged = 866, EVREventType_VREvent_LastKnownSectionSettingChanged = 867, EVREventType_VREvent_DismissedWarningsSectionSettingChanged = 868, + EVREventType_VREvent_GpuSpeedSectionSettingChanged = 869, EVREventType_VREvent_StatusUpdate = 900, EVREventType_VREvent_WebInterface_InstallDriverCompleted = 950, EVREventType_VREvent_MCImageUpdated = 1000, @@ -779,6 +798,7 @@ typedef enum EVREventType EVREventType_VREvent_Compositor_ApplicationResumed = 1416, EVREventType_VREvent_Compositor_OutOfVideoMemory = 1417, EVREventType_VREvent_Compositor_DisplayModeNotSupported = 1418, + EVREventType_VREvent_Compositor_StageOverrideReady = 1419, EVREventType_VREvent_TrackedCamera_StartVideoStream = 1500, EVREventType_VREvent_TrackedCamera_StopVideoStream = 1501, EVREventType_VREvent_TrackedCamera_PauseVideoStream = 1502, @@ -797,6 +817,7 @@ typedef enum EVREventType EVREventType_VREvent_Input_ProgressUpdate = 1705, EVREventType_VREvent_Input_TrackerActivated = 1706, EVREventType_VREvent_Input_BindingsUpdated = 1707, + EVREventType_VREvent_Input_BindingSubscriptionChanged = 1708, EVREventType_VREvent_SpatialAnchors_PoseUpdated = 1800, EVREventType_VREvent_SpatialAnchors_DescriptorUpdated = 1801, EVREventType_VREvent_SpatialAnchors_RequestPoseUpdate = 1802, @@ -863,6 +884,7 @@ typedef enum EShowUIType EShowUIType_ShowUI_Pairing = 3, EShowUIType_ShowUI_Settings = 4, EShowUIType_ShowUI_DebugCommands = 5, + EShowUIType_ShowUI_FullControllerBinding = 6, } EShowUIType; typedef enum EHDCPError @@ -1381,6 +1403,7 @@ typedef enum EVRCompositorError EVRCompositorError_VRCompositorError_IndexOutOfRange = 107, EVRCompositorError_VRCompositorError_AlreadySubmitted = 108, EVRCompositorError_VRCompositorError_InvalidBounds = 109, + EVRCompositorError_VRCompositorError_AlreadySet = 110, } EVRCompositorError; typedef enum EVRCompositorTimingMode @@ -1399,10 +1422,14 @@ typedef enum VROverlayInputMethod typedef enum VROverlayTransformType { + VROverlayTransformType_VROverlayTransform_Invalid = -1, VROverlayTransformType_VROverlayTransform_Absolute = 0, VROverlayTransformType_VROverlayTransform_TrackedDeviceRelative = 1, VROverlayTransformType_VROverlayTransform_SystemOverlay = 2, VROverlayTransformType_VROverlayTransform_TrackedComponent = 3, + VROverlayTransformType_VROverlayTransform_Cursor = 4, + VROverlayTransformType_VROverlayTransform_DashboardTab = 5, + VROverlayTransformType_VROverlayTransform_DashboardThumb = 6, } VROverlayTransformType; typedef enum VROverlayFlags @@ -2108,6 +2135,18 @@ typedef struct Compositor_CumulativeStats uint32_t m_nNumReprojectedFramesTimedOut; } Compositor_CumulativeStats; +typedef struct Compositor_StageRenderSettings +{ + struct HmdColor_t m_PrimaryColor; + struct HmdColor_t m_SecondaryColor; + float m_flVignetteInnerRadius; + float m_flVignetteOuterRadius; + float m_flFresnelStrength; + bool m_bBackfaceCulling; + bool m_bGreyscale; + bool m_bWireframe; +} Compositor_StageRenderSettings; + typedef struct VROverlayIntersectionParams_t { struct HmdVector3_t vSource; @@ -2551,6 +2590,8 @@ struct VR_IVRCompositor_FnTable bool (OPENVR_FNTABLE_CALLTYPE *IsMotionSmoothingEnabled)(); bool (OPENVR_FNTABLE_CALLTYPE *IsMotionSmoothingSupported)(); 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)(); }; struct VR_IVROverlay_FnTable @@ -2567,6 +2608,7 @@ struct VR_IVROverlay_FnTable uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlags)(VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float fAlpha); @@ -2594,6 +2636,8 @@ struct VR_IVROverlay_FnTable EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, struct HmdMatrix34_t * pmatParentOverlayToOverlayTransform); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, struct HmdMatrix34_t * pmatParentOverlayToOverlayTransform); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformCursor)(VROverlayHandle_t ulCursorOverlayHandle, struct HmdVector2_t * pvHotspot); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformCursor)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvHotspot); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowOverlay)(VROverlayHandle_t ulOverlayHandle); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *HideOverlay)(VROverlayHandle_t ulOverlayHandle); bool (OPENVR_FNTABLE_CALLTYPE *IsOverlayVisible)(VROverlayHandle_t ulOverlayHandle); @@ -2607,9 +2651,14 @@ struct VR_IVROverlay_FnTable 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); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayCursorPositionOverride)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvCursor); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ClearOverlayCursorPositionOverride)(VROverlayHandle_t ulOverlayHandle); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, struct Texture_t * pTexture); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ClearOverlayTexture)(VROverlayHandle_t ulOverlayHandle); - EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFromFile)(VROverlayHandle_t ulOverlayHandle, char * pchFilePath); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, struct VRTextureBounds_t * pTextureBounds); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ReleaseNativeOverlayHandle)(VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle); @@ -2627,8 +2676,6 @@ struct VR_IVROverlay_FnTable void (OPENVR_FNTABLE_CALLTYPE *HideKeyboard)(); void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform); void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardPositionForOverlay)(VROverlayHandle_t ulOverlayHandle, struct HmdRect2_t avoidRect); - EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayIntersectionMask)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize); - EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlags)(VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags); VRMessageOverlayResponse (OPENVR_FNTABLE_CALLTYPE *ShowMessageOverlay)(char * pchText, char * pchCaption, char * pchButton0Text, char * pchButton1Text, char * pchButton2Text, char * pchButton3Text); void (OPENVR_FNTABLE_CALLTYPE *CloseMessageOverlay)(); }; @@ -2665,7 +2712,6 @@ struct VR_IVRNotifications_FnTable struct VR_IVRSettings_FnTable { char * (OPENVR_FNTABLE_CALLTYPE *GetSettingsErrorNameFromEnum)(EVRSettingsError eError); - bool (OPENVR_FNTABLE_CALLTYPE *Sync)(bool bForce, EVRSettingsError * peError); void (OPENVR_FNTABLE_CALLTYPE *SetBool)(char * pchSection, char * pchSettingsKey, bool bValue, EVRSettingsError * peError); void (OPENVR_FNTABLE_CALLTYPE *SetInt32)(char * pchSection, char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError); void (OPENVR_FNTABLE_CALLTYPE *SetFloat)(char * pchSection, char * pchSettingsKey, float flValue, EVRSettingsError * peError); diff --git a/third-party/openvr/headers/openvr_driver.h b/third-party/openvr/headers/openvr_driver.h index f44e872..4d9fe6a 100644 --- a/third-party/openvr/headers/openvr_driver.h +++ b/third-party/openvr/headers/openvr_driver.h @@ -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 @@ -1971,30 +1987,30 @@ enum ECameraVideoStreamFormat enum ECameraCompatibilityMode { CAMERA_COMPAT_MODE_BULK_DEFAULT = 0, - CAMERA_COMPAT_MODE_BULK_64K_DMA, - CAMERA_COMPAT_MODE_BULK_16K_DMA, - CAMERA_COMPAT_MODE_BULK_8K_DMA, - CAMERA_COMPAT_MODE_ISO_52FPS, - CAMERA_COMPAT_MODE_ISO_50FPS, - CAMERA_COMPAT_MODE_ISO_48FPS, - CAMERA_COMPAT_MODE_ISO_46FPS, - CAMERA_COMPAT_MODE_ISO_44FPS, - CAMERA_COMPAT_MODE_ISO_42FPS, - CAMERA_COMPAT_MODE_ISO_40FPS, - CAMERA_COMPAT_MODE_ISO_35FPS, - CAMERA_COMPAT_MODE_ISO_30FPS, - CAMERA_COMPAT_MODE_ISO_15FPS, + CAMERA_COMPAT_MODE_BULK_64K_DMA = 1, + CAMERA_COMPAT_MODE_BULK_16K_DMA = 2, + CAMERA_COMPAT_MODE_BULK_8K_DMA = 3, + CAMERA_COMPAT_MODE_ISO_52FPS = 4, + CAMERA_COMPAT_MODE_ISO_50FPS = 5, + CAMERA_COMPAT_MODE_ISO_48FPS = 6, + CAMERA_COMPAT_MODE_ISO_46FPS = 7, + CAMERA_COMPAT_MODE_ISO_44FPS = 8, + CAMERA_COMPAT_MODE_ISO_42FPS = 9, + CAMERA_COMPAT_MODE_ISO_40FPS = 10, + CAMERA_COMPAT_MODE_ISO_35FPS = 11, + CAMERA_COMPAT_MODE_ISO_30FPS = 12, + CAMERA_COMPAT_MODE_ISO_15FPS = 13, MAX_CAMERA_COMPAT_MODES }; enum ETrackedCameraRoomViewMode { TRACKED_CAMERA_ROOMVIEW_MODE_DEFAULT = 0, - TRACKED_CAMERA_ROOMVIEW_MODE_EDGE_A, - TRACKED_CAMERA_ROOMVIEW_MODE_EDGE_B, - TRACKED_CAMERA_ROOMVIEW_MODE_VIDEO_TRANSLUSCENT, - TRACKED_CAMERA_ROOMVIEW_MODE_VIDEO_OPAQUE, - TRACKED_CAMERA_ROOMVIEW_MODE_COUNT, + TRACKED_CAMERA_ROOMVIEW_MODE_EDGE_A = 1, + TRACKED_CAMERA_ROOMVIEW_MODE_EDGE_B = 2, + TRACKED_CAMERA_ROOMVIEW_MODE_VIDEO_TRANSLUSCENT = 3, + TRACKED_CAMERA_ROOMVIEW_MODE_VIDEO_OPAQUE = 4, + TRACKED_CAMERA_ROOMVIEW_MODE_COUNT = 5, }; #ifdef _MSC_VER @@ -2074,9 +2090,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; @@ -2094,7 +2107,7 @@ namespace vr }; //----------------------------------------------------------------------------- - static const char * const IVRSettings_Version = "IVRSettings_002"; + static const char * const IVRSettings_Version = "IVRSettings_003"; class CVRSettingHelper { @@ -2110,12 +2123,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 ); @@ -2218,6 +2225,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"; @@ -2232,7 +2240,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"; @@ -2382,6 +2389,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 @@ -2411,6 +2421,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"; //----------------------------------------------------------------------------- @@ -2438,6 +2449,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 diff --git a/third-party/openvr/lib/linux32/libopenvr_api.so b/third-party/openvr/lib/linux32/libopenvr_api.so index 94c2e6b..2c4a313 100644 Binary files a/third-party/openvr/lib/linux32/libopenvr_api.so and b/third-party/openvr/lib/linux32/libopenvr_api.so differ