From 2e3bf4186604b53db624016155a9d27dade3d908 Mon Sep 17 00:00:00 2001 From: r57zone Date: Sat, 29 Feb 2020 23:06:36 +0400 Subject: [PATCH] Improvements and fixes --- OpenVR/headers/openvr.h | 695 ++++++--- OpenVR/headers/openvr_api.cs | 1308 ++++++++++++++--- OpenVR/headers/openvr_api.json | 607 +++++--- OpenVR/headers/openvr_capi.h | 355 +++-- OpenVR/headers/openvr_driver.h | 351 ++++- .../samples/driver_sample/driver_sample.cpp | 205 ++- TrueOpenVR SteamVR/OpenVR/default.vrsettings | 21 + TrueOpenVR SteamVR/OpenVR/steamvr.vrsettings | 19 - TrueOpenVR SteamVR/Unit1.pas | 36 +- 9 files changed, 2616 insertions(+), 981 deletions(-) create mode 100644 TrueOpenVR SteamVR/OpenVR/default.vrsettings diff --git a/OpenVR/headers/openvr.h b/OpenVR/headers/openvr.h index 59d97a1..0a2e008 100644 --- a/OpenVR/headers/openvr.h +++ b/OpenVR/headers/openvr.h @@ -15,8 +15,8 @@ namespace vr { static const uint32_t k_nSteamVRVersionMajor = 1; - static const uint32_t k_nSteamVRVersionMinor = 3; - static const uint32_t k_nSteamVRVersionBuild = 20; + static const uint32_t k_nSteamVRVersionMinor = 9; + static const uint32_t k_nSteamVRVersionBuild = 16; } // namespace vr // vrtypes.h @@ -207,7 +207,8 @@ 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_Max = 4 + 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; @@ -354,6 +356,11 @@ enum ETrackedDeviceProperty Prop_BootloaderVersion_Uint64 = 1044, 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, @@ -408,7 +415,7 @@ enum ETrackedDeviceProperty Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, // placeholder icon for "left" controller if not yet detected/loaded Prop_NamedIconPathControllerRightDeviceOff_String = 2052, // placeholder icon for "right" controller if not yet detected/loaded Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded - Prop_DoNotApplyPrediction_Bool = 2054, + Prop_DoNotApplyPrediction_Bool = 2054, // currently no effect. was used to disable HMD pose prediction on MR, which is now done by MR driver setting velocity=0 Prop_CameraToHeadTransforms_Matrix34_Array = 2055, Prop_DistortionMeshResolution_Int32 = 2056, // custom resolution of compositor calls to IVRSystem::ComputeDistortion Prop_DriverIsDrawingControllers_Bool = 2057, @@ -429,6 +436,24 @@ enum ETrackedDeviceProperty Prop_CameraDistortionFunction_Int32_Array = 2072, // Prop_NumCameras_Int32-sized array of vr::EVRDistortionFunctionType values (max size is vr::k_unMaxCameras) Prop_CameraDistortionCoefficients_Float_Array = 2073, // Prop_NumCameras_Int32-sized array of double[vr::k_unMaxDistortionFunctionParameters] (max size is vr::k_unMaxCameras) Prop_ExpectedControllerType_String = 2074, + Prop_HmdTrackingStyle_Int32 = 2075, // one of EHmdTrackingStyle + Prop_DriverProvidedChaperoneVisibility_Bool = 2076, + 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, + Prop_IpdUIRangeMinMeters_Float = 2100, + Prop_IpdUIRangeMaxMeters_Float = 2101, // Driver requested mura correction properties Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, @@ -441,6 +466,10 @@ enum ETrackedDeviceProperty Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, + Prop_Audio_DefaultPlaybackDeviceId_String = 2300, + Prop_Audio_DefaultRecordingDeviceId_String = 2301, + Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, + // Properties that are unique to TrackedDeviceClass_Controller Prop_AttachedDeviceId_String = 3000, Prop_SupportedButtons_Uint64 = 3001, @@ -472,11 +501,13 @@ enum ETrackedDeviceProperty Prop_NamedIconPathDeviceNotReady_String = 5006, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others Prop_NamedIconPathDeviceStandby_String = 5007, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others Prop_NamedIconPathDeviceAlertLow_String = 5008, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceStandbyAlert_String = 5009, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others // Properties that are used by helpers, but are opaque to applications Prop_DisplayHiddenArea_Binary_Start = 5100, Prop_DisplayHiddenArea_Binary_End = 5150, Prop_ParentContainer = 5151, + Prop_OverrideContainer_Uint64 = 5152, // Properties that are unique to drivers Prop_UserConfigPath_String = 6000, @@ -490,7 +521,7 @@ enum ETrackedDeviceProperty // Properties that are set internally based on other information provided by drivers Prop_ControllerType_String = 7000, - Prop_LegacyInputProfile_String = 7001, + //Prop_LegacyInputProfile_String = 7001, // This is no longer used. See "legacy_binding" in the input profile instead. Prop_ControllerHandSelectionPriority_Int32 = 7002, // Allows hand assignments to prefer some controllers over others. High numbers are selected over low numbers // Vendors are free to expose private debug data in this reserved region @@ -520,8 +551,19 @@ 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 */ +enum EHmdTrackingStyle +{ + HmdTrackingStyle_Unknown = 0, + + HmdTrackingStyle_Lighthouse = 1, // base stations and lasers + HmdTrackingStyle_OutsideInCameras = 2, // Cameras and LED, Rift 1 style + HmdTrackingStyle_InsideOutCameras = 3, // Cameras on HMD looking at the world +}; typedef uint64_t VRActionHandle_t; typedef uint64_t VRActionSetHandle_t; @@ -673,18 +715,20 @@ enum EVREventType VREvent_InputFocusCaptured = 400, // data is process DEPRECATED VREvent_InputFocusReleased = 401, // data is process DEPRECATED - VREvent_SceneFocusLost = 402, // data is process - VREvent_SceneFocusGained = 403, // data is process + // VREvent_SceneFocusLost = 402, // data is process + // VREvent_SceneFocusGained = 403, // data is process VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene VREvent_InputFocusChanged = 406, // data is process - VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + // VREvent_SceneApplicationSecondaryRenderingStarted = 407, VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, // data is process VREvent_ActionBindingReloaded = 409, // data is process - The App that action binds reloaded for VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + VREvent_SceneApplicationStateChanged = 412, // No data; but query VRApplications()->GetSceneApplicationState(); + VREvent_ConsoleOpened = 420, VREvent_ConsoleClosed = 421, @@ -729,17 +773,19 @@ enum EVREventType VREvent_Quit = 700, // data is process VREvent_ProcessQuit = 701, // data is process - VREvent_QuitAborted_UserPrompt = 702, // data is process + //VREvent_QuitAborted_UserPrompt = 702, // data is process VREvent_QuitAcknowledged = 703, // data is process VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down VREvent_RestartRequested = 705, // A driver or other component wants the user to restart SteamVR - VREvent_ChaperoneDataHasChanged = 800, // Sent when the process needs to call VRChaperone()->ReloadInfo() + VREvent_ChaperoneDataHasChanged = 800, // this will never happen with the new chaperone system VREvent_ChaperoneUniverseHasChanged = 801, - VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneTempDataHasChanged = 802, // this will never happen with the new chaperone system VREvent_ChaperoneSettingsHaveChanged = 803, VREvent_SeatedZeroPoseReset = 804, VREvent_ChaperoneFlushCache = 805, // Sent when the process needs to reload any cached data it retrieved from VRChaperone() + VREvent_ChaperoneRoomSetupStarting = 806, // Triggered by CVRChaperoneClient::RoomSetupStarting + VREvent_ChaperoneRoomSetupFinished = 807, // Triggered by CVRChaperoneClient::CommitWorkingCopy VREvent_AudioSettingsHaveChanged = 820, @@ -762,6 +808,7 @@ enum EVREventType VREvent_TrackersSectionSettingChanged = 866, VREvent_LastKnownSectionSettingChanged = 867, VREvent_DismissedWarningsSectionSettingChanged = 868, + VREvent_GpuSpeedSectionSettingChanged = 869, VREvent_StatusUpdate = 900, @@ -776,17 +823,17 @@ enum EVREventType VREvent_KeyboardCharInput = 1201, VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard - VREvent_ApplicationTransitionStarted = 1300, - VREvent_ApplicationTransitionAborted = 1301, - VREvent_ApplicationTransitionNewAppStarted = 1302, + //VREvent_ApplicationTransitionStarted = 1300, + //VREvent_ApplicationTransitionAborted = 1301, + //VREvent_ApplicationTransitionNewAppStarted = 1302, VREvent_ApplicationListUpdated = 1303, VREvent_ApplicationMimeTypeLoad = 1304, - VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, + // VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, VREvent_ProcessConnected = 1306, VREvent_ProcessDisconnected = 1307, - VREvent_Compositor_MirrorWindowShown = 1400, - VREvent_Compositor_MirrorWindowHidden = 1401, + //VREvent_Compositor_MirrorWindowShown = 1400, // DEPRECATED + //VREvent_Compositor_MirrorWindowHidden = 1401, // DEPRECATED VREvent_Compositor_ChaperoneBoundsShown = 1410, VREvent_Compositor_ChaperoneBoundsHidden = 1411, VREvent_Compositor_DisplayDisconnected = 1412, @@ -794,6 +841,9 @@ enum EVREventType VREvent_Compositor_HDCPError = 1414, // data is hdcpError VREvent_Compositor_ApplicationNotResponding = 1415, 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, @@ -816,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 @@ -824,6 +875,9 @@ enum EVREventType VREvent_SystemReport_Started = 1900, // user or system initiated generation of a system report. broadcast + VREvent_Monitor_ShowHeadsetView = 2000, // data is process + VREvent_Monitor_HideHeadsetView = 2001, // data is process + // Vendors are free to expose private events in this reserved region VREvent_VendorSpecific_Reserved_Start = 10000, VREvent_VendorSpecific_Reserved_End = 19999, @@ -842,6 +896,7 @@ enum EDeviceActivityLevel k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management) + k_EDeviceActivityLevel_Idle_Timeout = 4, }; @@ -871,9 +926,9 @@ enum EVRButtonId k_EButton_Dashboard_Back = k_EButton_Grip, - k_EButton_Knuckles_A = k_EButton_Grip, - k_EButton_Knuckles_B = k_EButton_ApplicationMenu, - k_EButton_Knuckles_JoyStick = k_EButton_Axis3, + k_EButton_IndexController_A = k_EButton_Grip, + k_EButton_IndexController_B = k_EButton_ApplicationMenu, + k_EButton_IndexController_JoyStick = k_EButton_Axis3, k_EButton_Max = 64 }; @@ -1099,9 +1154,11 @@ enum EShowUIType { ShowUI_ControllerBinding = 0, ShowUI_ManageTrackers = 1, - ShowUI_QuickStart = 2, + // ShowUI_QuickStart = 2, // Deprecated ShowUI_Pairing = 3, ShowUI_Settings = 4, + ShowUI_DebugCommands = 5, + ShowUI_FullControllerBinding = 6, }; struct VREvent_ShowUI_t @@ -1428,7 +1485,7 @@ enum EVRSkeletalTrackingLevel // body part location can be measured directly but with fewer degrees of freedom than the actual body // part. Certain body part positions may be unmeasured by the device and estimated from other input data. - // E.g. Knuckles, gloves that only measure finger curl + // E.g. Index Controllers, gloves that only measure finger curl VRSkeletalTracking_Partial, // Body part location can be measured directly throughout the entire range of motion of the body part. @@ -1505,6 +1562,9 @@ enum EVRInitError VRInitError_Init_VRWebHelperStartupFailed = 141, VRInitError_Init_TrackerManagerInitFailed = 142, VRInitError_Init_AlreadyRunning = 143, + VRInitError_Init_FailedForVrMonitor = 144, + VRInitError_Init_PropertyManagerInitFailed = 145, + VRInitError_Init_WebServerFailed = 146, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1519,6 +1579,8 @@ enum EVRInitError // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons VRInitError_Driver_HmdDriverIdOutOfBounds = 211, VRInitError_Driver_HmdDisplayMirrored = 212, + VRInitError_Driver_HmdDisplayNotFoundLaptop = 213, + // Never make error 259 because we return it from main and it would conflict with STILL_ACTIVE VRInitError_IPC_ServerInitFailed = 300, VRInitError_IPC_ConnectFailed = 301, @@ -1529,6 +1591,8 @@ enum EVRInitError VRInitError_IPC_CompositorConnectFailed = 306, VRInitError_IPC_CompositorInvalidConnectResponse = 307, VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + VRInitError_IPC_ConnectFailedAfterTargetExited = 309, + VRInitError_IPC_NamespaceUnavailable = 310, VRInitError_Compositor_Failed = 400, VRInitError_Compositor_D3D11HardwareRequired = 401, @@ -1615,6 +1679,9 @@ enum EVRInitError VRInitError_Compositor_CreateTextIndexBuffer = 482, VRInitError_Compositor_CreateMirrorTextures = 483, VRInitError_Compositor_CreateLastFrameRenderTexture = 484, + VRInitError_Compositor_CreateMirrorOverlay = 485, + VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486, + VRInitError_Compositor_DisplayModeNotSupported = 487, VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, @@ -1632,6 +1699,7 @@ enum EVRInitError VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, VRInitError_Steam_SteamInstallationNotFound = 2000, @@ -1715,7 +1783,7 @@ struct CameraVideoStreamFrameHeader_t uint32_t nFrameSequence; - TrackedDevicePose_t standingTrackedDevicePose; + TrackedDevicePose_t trackedDevicePose; uint64_t ulFrameExposureTime; // mid-point of the exposure of the image in host system ticks }; @@ -1725,6 +1793,75 @@ typedef uint32_t ScreenshotHandle_t; static const uint32_t k_unScreenshotHandleInvalid = 0; +/** Compositor frame timing reprojection flags. */ +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +const uint32_t VRCompositor_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame + +const uint32_t VRCompositor_PredictionMask = 0x30; // The runtime may predict more than one frame (up to four) ahead if + // it detects the application is taking too long to render. These two + // bits will contain the count of additional frames (normally zero). + // Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from + // the latest frame timing entry. + +const uint32_t VRCompositor_ThrottleMask = 0xC0; // Number of frames the compositor is throttling the application. + // Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from + // the latest frame timing entry. + +#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 ) +#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 6 ) + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + + uint32_t m_nNumVSyncsReadyForUse; + uint32_t m_nNumVSyncsToFirstView; +}; + /** Frame timing data provided by direct mode drivers. */ struct DriverDirectMode_FrameTiming { @@ -2091,15 +2228,6 @@ class IVRSystem * its own workload. One common way to do this is to reduce the size of the render target provided for each eye. */ virtual bool ShouldApplicationReduceRenderingWork() = 0; - // ------------------------------------ - // Debug Methods - // ------------------------------------ - - /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, - * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. - * The size of the response including its terminating null is returned. */ - virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, VR_OUT_STRING() char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; - // ------------------------------------ // Firmware methods // ------------------------------------ @@ -2119,14 +2247,29 @@ class IVRSystem * This extends the timeout until the process is killed. */ virtual void AcknowledgeQuit_Exiting() = 0; - /** Call this to tell the system that the user is being prompted to save data. This - * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually - * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ - virtual void AcknowledgeQuit_UserPrompt() = 0; + // ------------------------------------- + // App container sandbox methods + // ------------------------------------- + + /** Retrieves a null-terminated, semicolon-delimited list of UTF8 file paths that an application + * must have read access to when running inside of an app container. Returns the number of bytes + * needed to hold the list. */ + virtual uint32_t GetAppContainerFilePaths( VR_OUT_STRING() char *pchBuffer, uint32_t unBufferSize ) = 0; + + // ------------------------------------- + // System methods + // ------------------------------------- + + /** Returns the current version of the SteamVR runtime. The returned string will remain valid until VR_Shutdown is called. + * + * NOTE: Is it not appropriate to use this version to test for the presence of any SteamVR feature. Only use this version + * number for logging or showing to a user, and not to try to detect anything at runtime. When appropriate, feature-specific + * presence information is provided by other APIs. */ + virtual const char *GetRuntimeVersion() = 0; }; -static const char * const IVRSystem_Version = "IVRSystem_019"; +static const char * const IVRSystem_Version = "IVRSystem_021"; } @@ -2188,19 +2331,18 @@ namespace vr VRApplicationProperty_IsInstanced_Bool = 62, VRApplicationProperty_IsInternal_Bool = 63, VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64, + VRApplicationProperty_IsHidden_Bool = 65, VRApplicationProperty_LastLaunchTime_Uint64 = 70, }; - /** These are states the scene application startup process will go through. */ - enum EVRApplicationTransitionState + enum EVRSceneApplicationState { - VRApplicationTransition_None = 0, - - VRApplicationTransition_OldAppQuitSent = 10, - VRApplicationTransition_WaitingForExternalLaunch = 11, - - VRApplicationTransition_NewAppLaunched = 20, + EVRSceneApplicationState_None = 0, // Scene Application is not running + EVRSceneApplicationState_Starting = 1, // Scene Application is starting + EVRSceneApplicationState_Quitting = 2, // Scene Application is quitting + EVRSceneApplicationState_Running = 3, // Scene Application is running, and submitting frames, a custom skybox, or a visible overlay + EVRSceneApplicationState_Waiting = 4, // Scene Application is running, but not drawing anything }; struct AppOverrideKeys_t @@ -2310,7 +2452,7 @@ namespace vr virtual EVRApplicationError GetStartingApplication( VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; /** Returns the application transition state */ - virtual EVRApplicationTransitionState GetTransitionState() = 0; + virtual EVRSceneApplicationState GetSceneApplicationState() = 0; /** Returns errors that would prevent the specified application from launching immediately. Calling this function will * cause the current scene application to quit, so only call it when you are actually about to launch something else. @@ -2324,10 +2466,7 @@ namespace vr virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; /** Returns a string for an application transition state */ - virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; - - /** Returns true if the outgoing scene app has requested a save prompt before exiting */ - virtual bool IsQuitUserPromptRequested() = 0; + virtual const char *GetSceneApplicationStateNameFromEnum( EVRSceneApplicationState state ) = 0; /** Starts a subprocess within the calling application. This * suppresses all application transition UI and automatically identifies the new executable @@ -2342,7 +2481,7 @@ namespace vr virtual uint32_t GetCurrentSceneProcessId() = 0; }; - static const char * const IVRApplications_Version = "IVRApplications_006"; + static const char * const IVRApplications_Version = "IVRApplications_007"; } // namespace vr @@ -2369,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; @@ -2389,7 +2525,7 @@ namespace vr }; //----------------------------------------------------------------------------- - static const char * const IVRSettings_Version = "IVRSettings_002"; + static const char * const IVRSettings_Version = "IVRSettings_003"; class CVRSettingHelper { @@ -2405,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 ); @@ -2492,21 +2622,28 @@ namespace vr static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; - static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; + static const char * const k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement"; + static const char * const k_pch_SteamVR_ShowBaseStationPowerManagementTip_Int32 = "ShowBaseStationPowerManagementTip"; static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; static const char * const k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; static const char * const k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; + static const char * const k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; - static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_ShowLegacyMirrorView_Bool = "showLegacyMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewVisibility_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewDisplayMode_Int32 = "mirrorViewDisplayMode"; + 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"; @@ -2521,15 +2658,20 @@ 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_InputBindingUIBlock = "inputBindingUI"; + static const char * const k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; static const char * const k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; static const char * const k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; static const char * const k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; static const char * const k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; static const char * const k_pch_SteamVR_LastVersionNotice = "lastVersionNotice"; static const char * const k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB"; + static const char * const k_pch_SteamVR_CustomIconStyle_String = "customIconStyle"; + static const char * const k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle"; + static const char * const k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate"; //----------------------------------------------------------------------------- // direct mode keys @@ -2551,8 +2693,8 @@ namespace vr static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; static const char * const k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; + static const char * const k_pch_Lighthouse_InactivityTimeoutForBaseStations_Int32 = "InactivityTimeoutForBaseStations"; static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; - static const char * const k_pch_Lighthouse_NewPairing_Bool = "newPairing"; //----------------------------------------------------------------------------- // null keys @@ -2600,7 +2742,7 @@ namespace vr static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; static const char * const k_pch_Perf_TestData_Float = "perfTestData"; - static const char * const k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling"; + static const char * const k_pch_Perf_GPUProfiling_Bool = "GPUProfiling"; //----------------------------------------------------------------------------- // collision bounds keys @@ -2614,6 +2756,7 @@ namespace vr static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + static const char * const k_pch_CollisionBounds_EnableDriverImport = "enableDriverBoundsImport"; //----------------------------------------------------------------------------- // camera keys @@ -2632,11 +2775,19 @@ namespace vr //----------------------------------------------------------------------------- // audio keys static const char * const k_pch_audio_Section = "audio"; - static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; - static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; - static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; - static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; - static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_SetOsDefaultPlaybackDevice_Bool = "setOsDefaultPlaybackDevice"; + static const char * const k_pch_audio_EnablePlaybackDeviceOverride_Bool = "enablePlaybackDeviceOverride"; + static const char * const k_pch_audio_PlaybackDeviceOverride_String = "playbackDeviceOverride"; + static const char * const k_pch_audio_PlaybackDeviceOverrideName_String = "playbackDeviceOverrideName"; + static const char * const k_pch_audio_SetOsDefaultRecordingDevice_Bool = "setOsDefaultRecordingDevice"; + static const char * const k_pch_audio_EnableRecordingDeviceOverride_Bool = "enableRecordingDeviceOverride"; + static const char * const k_pch_audio_RecordingDeviceOverride_String = "recordingDeviceOverride"; + static const char * const k_pch_audio_RecordingDeviceOverrideName_String = "recordingDeviceOverrideName"; + static const char * const k_pch_audio_EnablePlaybackMirror_Bool = "enablePlaybackMirror"; + static const char * const k_pch_audio_PlaybackMirrorDevice_String = "playbackMirrorDevice"; + static const char * const k_pch_audio_PlaybackMirrorDeviceName_String = "playbackMirrorDeviceName"; + static const char * const k_pch_audio_OldPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId"; static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; //----------------------------------------------------------------------------- @@ -2654,10 +2805,11 @@ namespace vr static const char * const k_pch_Dashboard_Section = "dashboard"; static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; - static const char * const k_pch_Dashboard_UseWebDashboard = "useWebDashboard"; + 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_UseWebIPD = "useWebIPD"; - static const char * const k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu"; + 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 @@ -2666,12 +2818,11 @@ namespace vr //----------------------------------------------------------------------------- // driver keys - These could be checked in any driver_ section static const char * const k_pch_Driver_Enable_Bool = "enable"; + static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority"; //----------------------------------------------------------------------------- // web interface keys static const char* const k_pch_WebInterface_Section = "WebInterface"; - static const char* const k_pch_WebInterface_WebEnable_Bool = "WebEnable"; - static const char* const k_pch_WebInterface_WebPort_String = "WebPort"; //----------------------------------------------------------------------------- // vrwebhelper keys @@ -2688,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"; //----------------------------------------------------------------------------- @@ -2708,6 +2860,17 @@ namespace vr // Dismissed warnings static const char * const k_pch_DismissedWarnings_Section = "DismissedWarnings"; + //----------------------------------------------------------------------------- + // Input Settings + static const char * const k_pch_Input_Section = "input"; + static const char* const k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation"; + 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 // ivrchaperone.h @@ -2867,6 +3030,11 @@ class IVRChaperoneSetup /** Hides the chaperone data in the working set to preview in the compositor (if it was visible).*/ virtual void HideWorkingSetPreview() = 0; + + /** Fire an event that the tracking system can use to know room setup is about to begin. This lets the tracking + * system make any last minute adjustments that should be incorporated into the new setup. If the user is adjusting + * live in HMD using a tweak tool, keep in mind that calling this might cause the user to see the room jump. */ + virtual void RoomSetupStarting() = 0; }; static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_006"; @@ -2895,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 */ @@ -2905,74 +3074,6 @@ enum EVRCompositorTimingMode VRCompositorTimingMode_Explicit_ApplicationPerformsPostPresentHandoff = 2, }; -const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; -const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; -const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, - // but does not indicate if reprojection actually happened or not. - // Use the ReprojectionReason flags above to check if reprojection - // was actually applied (i.e. scene texture was reused). - // NumFramePresents > 1 also indicates the scene texture was reused, - // and also the number of times that it was presented in total. - -const uint32_t VRCompositor_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame - -const uint32_t VRCompositor_PredictionMask = 0x30; // The runtime may predict more than one frame (up to four) ahead if - // it detects the application is taking too long to render. These two - // bits will contain the count of additional frames (normally zero). - // Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from - // the latest frame timing entry. - -const uint32_t VRCompositor_ThrottleMask = 0xC0; // Number of frames the compositor is throttling the application. - // Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from - // the latest frame timing entry. - -#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 ) -#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 6 ) - -/** Provides a single frame's timing information to the app */ -struct Compositor_FrameTiming -{ - uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) - uint32_t m_nFrameIndex; - uint32_t m_nNumFramePresents; // number of times this frame was presented - uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to - uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out - uint32_t m_nReprojectionFlags; - - /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ - double m_flSystemTimeInSeconds; - - /** These times may include work from other processes due to OS scheduling. - * The fewer packets of work these are broken up into, the less likely this will happen. - * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started - * processing that work earlier in the frame. */ - float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) - float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) - float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work - float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. - float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame - float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) - - /** Miscellaneous measured intervals. */ - float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses - float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) - float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) - float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) - - /** The following are all relative to this frame's SystemTimeInSeconds */ - float m_flWaitGetPosesCalledMs; - float m_flNewPosesReadyMs; - float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit - float m_flCompositorUpdateStartMs; - float m_flCompositorUpdateEndMs; - float m_flCompositorRenderStartMs; - - vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame - - uint32_t m_nNumVSyncsReadyForUse; - uint32_t m_nNumVSyncsToFirstView; -}; - /** Cumulative stats for current application. These are not cleared until a new app connects, * but they do stop accumulating once the associated app disconnects. */ struct Compositor_CumulativeStats @@ -3003,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 */ @@ -3124,13 +3251,14 @@ class IVRCompositor /** Returns true if the current process has the scene focus */ virtual bool CanRenderScene() = 0; - /** Creates a window on the primary monitor to display what is being shown in the headset. */ + /** DEPRECATED: Opens the headset view (as either a window or docked widget depending on user's preferences) that displays what the user + * sees in the headset. */ virtual void ShowMirrorWindow() = 0; - /** Closes the mirror window. */ + /** DEPRECATED: Closes the headset view, either as a window or docked widget. */ virtual void HideMirrorWindow() = 0; - /** Returns true if the mirror window is shown. */ + /** DEPRECATED: Returns true if the headset view (either as a window or docked widget) is shown. */ virtual bool IsMirrorWindowVisible() = 0; /** Writes back buffer and stereo left/right pair from the application to a 'screenshots' folder in the SteamVR runtime root. */ @@ -3201,9 +3329,25 @@ class IVRCompositor * If you want to know if motion smoothing actually triggered due to a late frame, check Compositor_FrameTiming * m_nReprojectionFlags & VRCompositor_ReprojectionMotion instead. */ virtual bool IsMotionSmoothingEnabled() = 0; + + /** Indicates whether or not motion smoothing is supported by the current hardware. */ + virtual bool IsMotionSmoothingSupported() = 0; + + /** 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 @@ -3309,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; @@ -3325,66 +3469,65 @@ 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 */ enum VROverlayFlags { - VROverlayFlags_None = 0, - - // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). - VROverlayFlags_Curved = 1, - VROverlayFlags_RGSS4X = 2, - // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay - VROverlayFlags_NoDashboardTab = 3, - - // Set this flag on a dashboard that is able to deal with gamepad focus events - VROverlayFlags_AcceptsGamepadEvents = 4, - - // Indicates that the overlay should dim/brighten to show gamepad focus - VROverlayFlags_ShowGamepadFocus = 5, + VROverlayFlags_NoDashboardTab = 1 << 3, // When this is set the overlay will receive VREvent_ScrollDiscrete events like a mouse wheel. // Requires mouse input mode. - VROverlayFlags_SendVRDiscreteScrollEvents = 6, + VROverlayFlags_SendVRDiscreteScrollEvents = 1 << 6, // Indicates that the overlay would like to receive - VROverlayFlags_SendVRTouchpadEvents = 7, + VROverlayFlags_SendVRTouchpadEvents = 1 << 7, // If set this will render a vertical scroll wheel on the primary controller, // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel - VROverlayFlags_ShowTouchPadScrollWheel = 8, + VROverlayFlags_ShowTouchPadScrollWheel = 1 << 8, // If this is set ownership and render access to the overlay are transferred // to the new scene process on a call to IVRApplications::LaunchInternalProcess - VROverlayFlags_TransferOwnershipToInternalProcess = 9, + VROverlayFlags_TransferOwnershipToInternalProcess = 1 << 9, // If set, renders 50% of the texture in each eye, side by side - VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right - VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + VROverlayFlags_SideBySide_Parallel = 1 << 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 1 << 11, // Texture is crossed and right/left - VROverlayFlags_Panorama = 12, // Texture is a panorama - VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + VROverlayFlags_Panorama = 1 << 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 1 << 13, // Texture is a stereo panorama // If this is set on an overlay owned by the scene application that overlay // will be sorted with the "Other" overlays on top of all other scene overlays - VROverlayFlags_SortWithNonSceneOverlays = 14, + VROverlayFlags_SortWithNonSceneOverlays = 1 << 14, // If set, the overlay will be shown in the dashboard, otherwise it will be hidden. - VROverlayFlags_VisibleInDashboard = 15, + VROverlayFlags_VisibleInDashboard = 1 << 15, // If this is set and the overlay's input method is not none, the system-wide laser mouse // mode will be activated whenever this overlay is visible. - VROverlayFlags_MakeOverlaysInteractiveIfVisible = 16, + VROverlayFlags_MakeOverlaysInteractiveIfVisible = 1 << 16, // If this is set the overlay will receive smooth VREvent_ScrollSmooth that emulate trackpad scrolling. // Requires mouse input mode. - VROverlayFlags_SendVRSmoothScrollEvents = 17, + VROverlayFlags_SendVRSmoothScrollEvents = 1 << 17, + + // If this is set, the overlay texture will be protected content, preventing unauthorized reads. + VROverlayFlags_ProtectedContent = 1 << 18, + + // If this is set, the laser mouse splat will not be drawn over this overlay. The overlay will + // be responsible for drawing its own "cursor". + VROverlayFlags_HideLaserIntersection = 1 << 19, }; enum VRMessageOverlayResponse @@ -3428,17 +3571,6 @@ namespace vr k_EGamepadTextInputLineModeMultipleLines = 1 }; - /** Directions for changing focus between overlays with the gamepad */ - enum EOverlayDirection - { - OverlayDirection_Up = 0, - OverlayDirection_Down = 1, - OverlayDirection_Left = 2, - OverlayDirection_Right = 3, - - OverlayDirection_Count = 4, - }; - enum EVROverlayIntersectionMaskPrimitiveType { OverlayIntersectionPrimitiveType_Rectangle, @@ -3491,17 +3623,6 @@ namespace vr * automatically destroyed. */ virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; - /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which - * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than - * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful - * for overlays that are expected to take up most of the user's view (e.g. streaming video). - * This mode does not support mouse input to your overlay. */ - virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; - - /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. - * Otherwise it will return k_ulOverlayHandleInvalid. */ - virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; - /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; @@ -3538,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; @@ -3576,13 +3700,12 @@ namespace vr /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; - /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve - * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ - virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + /** Use to draw overlay as a curved surface. Curvature is a percentage from (0..1] where 1 is a fully closed cylinder. + * For a specific radius, curvature can be computed as: overlay.width / (2 PI r). */ + virtual EVROverlayError SetOverlayCurvature( VROverlayHandle_t ulOverlayHandle, float fCurvature ) = 0; - /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve - * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ - virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + /** Returns the curvature of the overlay as a percentage from (0..1] where 1 is a fully closed cylinder. */ + virtual EVROverlayError GetOverlayCurvature( VROverlayHandle_t ulOverlayHandle, float *pfCurvature ) = 0; /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ @@ -3632,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; @@ -3674,27 +3804,29 @@ namespace vr * by the virtual mouse pointer */ virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; - /** Returns the current Gamepad focus overlay */ - virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; - - /** Sets the current Gamepad focus overlay */ - virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; - - /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay - * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both - * ends will be cleared */ - virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; - - /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no - * neighbor in that direction */ - virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; - /** Sets the analog input to Dual Analog coordinate scale for the specified overlay. */ virtual EVROverlayError SetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, const HmdVector2_t *pvCenter, float fRadius ) = 0; /** Gets the analog input to Dual Analog coordinate scale for the specified overlay. */ virtual EVROverlayError GetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t *pvCenter, float *pfRadius ) = 0; + /** Sets a list of primitives to be used for controller ray intersection + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0; + + /** 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 // --------------------------------------------- @@ -3711,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 */ @@ -3783,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 // --------------------------------------------- @@ -3804,7 +3926,7 @@ namespace vr virtual void CloseMessageOverlay() = 0; }; - static const char * const IVROverlay_Version = "IVROverlay_019"; + static const char * const IVROverlay_Version = "IVROverlay_022"; } // namespace vr @@ -4094,9 +4216,11 @@ class IVRTrackedCamera /** Access a shared GL texture for the specified tracked camera stream */ virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; + virtual void SetCameraTrackingSpace( vr::ETrackingUniverseOrigin eUniverse ) = 0; + virtual vr::ETrackingUniverseOrigin GetCameraTrackingSpace( ) = 0; }; -static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_005"; +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_006"; } // namespace vr @@ -4247,6 +4371,8 @@ class IVRDriverManager virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0; + + virtual bool IsEnabled( vr::DriverId_t nDriver ) const = 0; }; static const char * const IVRDriverManager_Version = "IVRDriverManager_001"; @@ -4296,6 +4422,16 @@ namespace vr VRFingerSplay_Count }; + enum EVRSummaryType + { + // The skeletal summary data will match the animated bone transforms for the action. + VRSummaryType_FromAnimation = 0, + + // The skeletal summary data will include unprocessed data directly from the device when available. + // This data is generally less latent than the data that is computed from the animations. + VRSummaryType_FromDevice = 1, + }; + enum EVRInputFilterCancelType { VRInputFilterCancel_Timers = 0, @@ -4375,6 +4511,14 @@ namespace vr char rchRenderModelComponentName[128]; }; + struct InputBindingInfo_t + { + char rchDevicePathName[128]; + char rchInputPathName[128]; + char rchModeName[128]; + char rchSlotName[128]; + }; + struct VRActiveActionSet_t { /** This is the handle of the action set to activate for this frame. */ @@ -4432,7 +4576,9 @@ namespace vr virtual EVRInputError GetActionHandle( const char *pchActionName, VRActionHandle_t *pHandle ) = 0; /** Returns a handle for any path in the input system. E.g. /user/hand/right */ - virtual EVRInputError GetInputSourceHandle( const char *pchInputSourcePath, VRInputValueHandle_t *pHandle ) = 0; + virtual EVRInputError GetInputSourceHandle( const char *pchInputSourcePath, VRInputValueHandle_t *pHandle ) = 0; + + // --------------- Reading action state ------------------- // @@ -4448,8 +4594,13 @@ namespace vr * action is something other than analog */ virtual EVRInputError GetAnalogActionData( VRActionHandle_t action, InputAnalogActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; - /** Reads the state of a pose action given its handle. */ - virtual EVRInputError GetPoseActionData( VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + /** Reads the state of a pose action given its handle for the number of seconds relative to now. This + * will generally be called with negative times from the fUpdateTime fields in other actions. */ + virtual EVRInputError GetPoseActionDataRelativeToNow( VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + /** Reads the state of a pose action given its handle. The returned values will match the values returned + * by the last call to IVRCompositor::WaitGetPoses(). */ + virtual EVRInputError GetPoseActionDataForNextFrame( VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, InputPoseActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; /** Reads the state of a skeletal action given its handle. */ virtual EVRInputError GetSkeletalActionData( VRActionHandle_t action, InputSkeletalActionData_t *pActionData, uint32_t unActionDataSize ) = 0; @@ -4477,7 +4628,7 @@ namespace vr virtual EVRInputError GetSkeletalBoneData( VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VR_ARRAY_COUNT( unTransformArrayCount ) VRBoneTransform_t *pTransformArray, uint32_t unTransformArrayCount ) = 0; /** Reads summary information about the current pose of the skeleton associated with the given action. */ - virtual EVRInputError GetSkeletalSummaryData( VRActionHandle_t action, VRSkeletalSummaryData_t * pSkeletalSummaryData ) = 0; + virtual EVRInputError GetSkeletalSummaryData( VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData ) = 0; /** Reads the state of the skeletal bone data in a compressed form that is suitable for * sending over the network. The required buffer size will never exceed ( sizeof(VR_BoneTransform_t)*boneCount + 2). @@ -4504,6 +4655,9 @@ namespace vr /** Retrieves useful information for the origin of this action */ virtual EVRInputError GetOriginTrackedDeviceInfo( VRInputValueHandle_t origin, InputOriginInfo_t *pOriginInfo, uint32_t unOriginInfoSize ) = 0; + /** Retrieves useful information about the bindings for an action */ + virtual EVRInputError GetActionBindingInfo( VRActionHandle_t action, InputBindingInfo_t *pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t *punReturnedBindingInfoCount ) = 0; + /** Shows the current binding for the action in-headset */ virtual EVRInputError ShowActionOrigins( VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle ) = 0; @@ -4512,9 +4666,16 @@ namespace vr // --------------- Legacy Input ------------------- // virtual bool IsUsingLegacyInput() = 0; + + + // --------------- Utilities ------------------- // + + /** Opens the binding user interface. If no app key is provided it will use the key from the calling process. + * If no set is provided it will open to the root of the app binding page. */ + virtual EVRInputError OpenBindingUI( const char* pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop ) = 0; }; - static const char * const IVRInput_Version = "IVRInput_005"; + static const char * const IVRInput_Version = "IVRInput_007"; } // namespace vr @@ -4621,12 +4782,56 @@ namespace vr static const char * const IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; +} // namespace vr + +// ivrdebug.h +namespace vr +{ + enum EVRDebugError + { + VRDebugError_Success = 0, + VRDebugError_BadParameter + }; + + /** Handle for vr profiler events */ + typedef uint64_t VrProfilerEventHandle_t; + + class IVRDebug + { + public: + + /** Create a vr profiler discrete event (point) + * The event will be associated with the message provided in pchMessage, and the current + * time will be used as the event timestamp. */ + virtual EVRDebugError EmitVrProfilerEvent( const char *pchMessage ) = 0; + + /** Create an vr profiler duration event (line) + * The current time will be used as the timestamp for the start of the line. + * On success, pHandleOut will contain a handle valid for terminating this event. */ + virtual EVRDebugError BeginVrProfilerEvent( VrProfilerEventHandle_t *pHandleOut ) = 0; + + /** Terminate a vr profiler event + * The event associated with hHandle will be considered completed when this method is called. + * The current time will be used assocaited to the termination time of the event, and + * pchMessage will be used as the event title. */ + virtual EVRDebugError FinishVrProfilerEvent( VrProfilerEventHandle_t hHandle, const char *pchMessage ) = 0; + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, VR_OUT_STRING() char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + }; + + static const char * const IVRDebug_Version = "IVRDebug_001"; + } // namespace vr // End #endif // _OPENVR_API + namespace vr { #if !defined( OPENVR_INTERFACE_INTERNAL ) @@ -4656,8 +4861,8 @@ namespace vr VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); /** Returns where the OpenVR runtime is installed. */ - VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); - + VR_INTERFACE bool VR_GetRuntimePath( VR_OUT_STRING() char *pchPathBuffer, uint32_t unBufferSize, uint32_t *punRequiredBufferSize ); + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); @@ -4890,6 +5095,17 @@ namespace vr return m_pVRSpatialAnchors; } + IVRDebug *VRDebug() + { + CheckClear(); + if ( !m_pVRDebug ) + { + EVRInitError eError; + m_pVRDebug = (IVRDebug *)VR_GetGenericInterface( IVRDebug_Version, &eError ); + } + return m_pVRDebug; + } + IVRNotifications *VRNotifications() { CheckClear(); @@ -4918,6 +5134,7 @@ namespace vr IVRInput *m_pVRInput; IVRIOBuffer *m_pVRIOBuffer; IVRSpatialAnchors *m_pVRSpatialAnchors; + IVRDebug *m_pVRDebug; IVRNotifications *m_pVRNotifications; }; @@ -4944,6 +5161,7 @@ namespace vr inline IVRIOBuffer *VR_CALLTYPE VRIOBuffer() { return OpenVRInternal_ModuleContext().VRIOBuffer(); } inline IVRSpatialAnchors *VR_CALLTYPE VRSpatialAnchors() { return OpenVRInternal_ModuleContext().VRSpatialAnchors(); } inline IVRNotifications *VR_CALLTYPE VRNotifications() { return OpenVRInternal_ModuleContext().VRNotifications(); } + inline IVRDebug *VR_CALLTYPE VRDebug() { return OpenVRInternal_ModuleContext().VRDebug(); } inline void COpenVRContext::Clear() { @@ -4964,6 +5182,7 @@ namespace vr m_pVRIOBuffer = nullptr; m_pVRSpatialAnchors = nullptr; m_pVRNotifications = nullptr; + m_pVRDebug = nullptr; } VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal2( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo ); diff --git a/OpenVR/headers/openvr_api.cs b/OpenVR/headers/openvr_api.cs index 3f8267b..2f30de3 100644 --- a/OpenVR/headers/openvr_api.cs +++ b/OpenVR/headers/openvr_api.cs @@ -9,6 +9,10 @@ using System.Runtime.InteropServices; using Valve.VR; +#if UNITY_5_3_OR_NEWER +using UnityEngine; +#endif + namespace Valve.VR { @@ -230,11 +234,6 @@ public struct IVRSystem [MarshalAs(UnmanagedType.FunctionPtr)] internal _ShouldApplicationReduceRenderingWork ShouldApplicationReduceRenderingWork; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _DriverDebugRequest(uint unDeviceIndex, string pchRequest, System.Text.StringBuilder pchResponseBuffer, uint unResponseBufferSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _DriverDebugRequest DriverDebugRequest; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVRFirmwareError _PerformFirmwareUpdate(uint unDeviceIndex); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -246,9 +245,14 @@ public struct IVRSystem internal _AcknowledgeQuit_Exiting AcknowledgeQuit_Exiting; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _AcknowledgeQuit_UserPrompt(); + internal delegate uint _GetAppContainerFilePaths(System.Text.StringBuilder pchBuffer, uint unBufferSize); [MarshalAs(UnmanagedType.FunctionPtr)] - internal _AcknowledgeQuit_UserPrompt AcknowledgeQuit_UserPrompt; + internal _GetAppContainerFilePaths GetAppContainerFilePaths; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate IntPtr _GetRuntimeVersion(); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetRuntimeVersion GetRuntimeVersion; } @@ -335,6 +339,16 @@ public struct IVRTrackedCamera [MarshalAs(UnmanagedType.FunctionPtr)] internal _ReleaseVideoStreamTextureGL ReleaseVideoStreamTextureGL; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate void _SetCameraTrackingSpace(ETrackingUniverseOrigin eUniverse); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SetCameraTrackingSpace SetCameraTrackingSpace; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate ETrackingUniverseOrigin _GetCameraTrackingSpace(); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetCameraTrackingSpace GetCameraTrackingSpace; + } [StructLayout(LayoutKind.Sequential)] @@ -466,9 +480,9 @@ public struct IVRApplications internal _GetStartingApplication GetStartingApplication; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationTransitionState _GetTransitionState(); + internal delegate EVRSceneApplicationState _GetSceneApplicationState(); [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetTransitionState GetTransitionState; + internal _GetSceneApplicationState GetSceneApplicationState; [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVRApplicationError _PerformApplicationPrelaunchCheck(string pchAppKey); @@ -476,14 +490,9 @@ public struct IVRApplications internal _PerformApplicationPrelaunchCheck PerformApplicationPrelaunchCheck; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate IntPtr _GetApplicationsTransitionStateNameFromEnum(EVRApplicationTransitionState state); + internal delegate IntPtr _GetSceneApplicationStateNameFromEnum(EVRSceneApplicationState state); [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationsTransitionStateNameFromEnum GetApplicationsTransitionStateNameFromEnum; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _IsQuitUserPromptRequested(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IsQuitUserPromptRequested IsQuitUserPromptRequested; + internal _GetSceneApplicationStateNameFromEnum GetSceneApplicationStateNameFromEnum; [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVRApplicationError _LaunchInternalProcess(string pchBinaryPath, string pchArguments, string pchWorkingDirectory); @@ -640,6 +649,11 @@ public struct IVRChaperoneSetup [MarshalAs(UnmanagedType.FunctionPtr)] internal _HideWorkingSetPreview HideWorkingSetPreview; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate void _RoomSetupStarting(); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _RoomSetupStarting RoomSetupStarting; + } [StructLayout(LayoutKind.Sequential)] @@ -865,6 +879,26 @@ public struct IVRCompositor [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsMotionSmoothingEnabled IsMotionSmoothingEnabled; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate bool _IsMotionSmoothingSupported(); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _IsMotionSmoothingSupported IsMotionSmoothingSupported; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate bool _IsCurrentSceneFocusAppLoading(); + [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)] @@ -885,16 +919,6 @@ public struct IVROverlay [MarshalAs(UnmanagedType.FunctionPtr)] internal _DestroyOverlay DestroyOverlay; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetHighQualityOverlay(ulong ulOverlayHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetHighQualityOverlay SetHighQualityOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate ulong _GetHighQualityOverlay(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetHighQualityOverlay GetHighQualityOverlay; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate uint _GetOverlayKey(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -940,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)] @@ -991,14 +1020,14 @@ public struct IVROverlay internal _GetOverlayWidthInMeters GetOverlayWidthInMeters; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters); + internal delegate EVROverlayError _SetOverlayCurvature(ulong ulOverlayHandle, float fCurvature); [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayAutoCurveDistanceRangeInMeters SetOverlayAutoCurveDistanceRangeInMeters; + internal _SetOverlayCurvature SetOverlayCurvature; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle, ref float pfMinDistanceInMeters, ref float pfMaxDistanceInMeters); + internal delegate EVROverlayError _GetOverlayCurvature(ulong ulOverlayHandle, ref float pfCurvature); [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayAutoCurveDistanceRangeInMeters GetOverlayAutoCurveDistanceRangeInMeters; + internal _GetOverlayCurvature GetOverlayCurvature; [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVROverlayError _SetOverlayTextureColorSpace(ulong ulOverlayHandle, EColorSpace eTextureColorSpace); @@ -1075,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)] @@ -1131,34 +1170,39 @@ public struct IVROverlay internal _IsHoverTargetOverlay IsHoverTargetOverlay; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate ulong _GetGamepadFocusOverlay(); + internal delegate EVROverlayError _SetOverlayDualAnalogTransform(ulong ulOverlay, EDualAnalogWhich eWhich, ref HmdVector2_t pvCenter, float fRadius); [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetGamepadFocusOverlay GetGamepadFocusOverlay; + internal _SetOverlayDualAnalogTransform SetOverlayDualAnalogTransform; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetGamepadFocusOverlay(ulong ulNewFocusOverlay); + internal delegate EVROverlayError _GetOverlayDualAnalogTransform(ulong ulOverlay, EDualAnalogWhich eWhich, ref HmdVector2_t pvCenter, ref float pfRadius); [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetGamepadFocusOverlay SetGamepadFocusOverlay; + internal _GetOverlayDualAnalogTransform GetOverlayDualAnalogTransform; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayNeighbor(EOverlayDirection eDirection, ulong ulFrom, ulong ulTo); + internal delegate EVROverlayError _SetOverlayIntersectionMask(ulong ulOverlayHandle, ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, uint unNumMaskPrimitives, uint unPrimitiveSize); [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayNeighbor SetOverlayNeighbor; + internal _SetOverlayIntersectionMask SetOverlayIntersectionMask; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _MoveGamepadFocusToNeighbor(EOverlayDirection eDirection, ulong ulFrom); + internal delegate EVROverlayError _TriggerLaserMouseHapticVibration(ulong ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude); [MarshalAs(UnmanagedType.FunctionPtr)] - internal _MoveGamepadFocusToNeighbor MoveGamepadFocusToNeighbor; + internal _TriggerLaserMouseHapticVibration TriggerLaserMouseHapticVibration; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayDualAnalogTransform(ulong ulOverlay, EDualAnalogWhich eWhich, ref HmdVector2_t pvCenter, float fRadius); + internal delegate EVROverlayError _SetOverlayCursor(ulong ulOverlayHandle, ulong ulCursorHandle); [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayDualAnalogTransform SetOverlayDualAnalogTransform; + internal _SetOverlayCursor SetOverlayCursor; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayDualAnalogTransform(ulong ulOverlay, EDualAnalogWhich eWhich, ref HmdVector2_t pvCenter, ref float pfRadius); + internal delegate EVROverlayError _SetOverlayCursorPositionOverride(ulong ulOverlayHandle, ref HmdVector2_t pvCursor); [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayDualAnalogTransform GetOverlayDualAnalogTransform; + 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); @@ -1171,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; @@ -1260,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)] @@ -1405,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)] @@ -1535,6 +1564,11 @@ public struct IVRDriverManager [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetDriverHandle GetDriverHandle; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate bool _IsEnabled(uint nDriver); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _IsEnabled IsEnabled; + } [StructLayout(LayoutKind.Sequential)] @@ -1576,9 +1610,14 @@ public struct IVRInput internal _GetAnalogActionData GetAnalogActionData; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRInputError _GetPoseActionData(ulong action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, ref InputPoseActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice); + internal delegate EVRInputError _GetPoseActionDataRelativeToNow(ulong action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, ref InputPoseActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice); [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetPoseActionData GetPoseActionData; + internal _GetPoseActionDataRelativeToNow GetPoseActionDataRelativeToNow; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetPoseActionDataForNextFrame(ulong action, ETrackingUniverseOrigin eOrigin, ref InputPoseActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetPoseActionDataForNextFrame GetPoseActionDataForNextFrame; [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVRInputError _GetSkeletalActionData(ulong action, ref InputSkeletalActionData_t pActionData, uint unActionDataSize); @@ -1616,7 +1655,7 @@ public struct IVRInput internal _GetSkeletalBoneData GetSkeletalBoneData; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRInputError _GetSkeletalSummaryData(ulong action, ref VRSkeletalSummaryData_t pSkeletalSummaryData); + internal delegate EVRInputError _GetSkeletalSummaryData(ulong action, EVRSummaryType eSummaryType, ref VRSkeletalSummaryData_t pSkeletalSummaryData); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetSkeletalSummaryData GetSkeletalSummaryData; @@ -1650,6 +1689,11 @@ public struct IVRInput [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetOriginTrackedDeviceInfo GetOriginTrackedDeviceInfo; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetActionBindingInfo(ulong action, ref InputBindingInfo_t pOriginInfo, uint unBindingInfoSize, uint unBindingInfoCount, ref uint punReturnedBindingInfoCount); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetActionBindingInfo GetActionBindingInfo; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVRInputError _ShowActionOrigins(ulong actionSetHandle, ulong ulActionHandle); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -1665,6 +1709,11 @@ public struct IVRInput [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsUsingLegacyInput IsUsingLegacyInput; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _OpenBindingUI(string pchAppKey, ulong ulActionSetHandle, ulong ulDeviceHandle, bool bShowOnDesktop); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _OpenBindingUI OpenBindingUI; + } [StructLayout(LayoutKind.Sequential)] @@ -1727,6 +1776,31 @@ public struct IVRSpatialAnchors } +[StructLayout(LayoutKind.Sequential)] +public struct IVRDebug +{ + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRDebugError _EmitVrProfilerEvent(string pchMessage); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _EmitVrProfilerEvent EmitVrProfilerEvent; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRDebugError _BeginVrProfilerEvent(ref ulong pHandleOut); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _BeginVrProfilerEvent BeginVrProfilerEvent; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRDebugError _FinishVrProfilerEvent(ulong hHandle, string pchMessage); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _FinishVrProfilerEvent FinishVrProfilerEvent; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate uint _DriverDebugRequest(uint unDeviceIndex, string pchRequest, System.Text.StringBuilder pchResponseBuffer, uint unResponseBufferSize); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _DriverDebugRequest DriverDebugRequest; + +} + public class CVRSystem { @@ -2030,11 +2104,6 @@ public bool ShouldApplicationReduceRenderingWork() bool result = FnTable.ShouldApplicationReduceRenderingWork(); return result; } - public uint DriverDebugRequest(uint unDeviceIndex,string pchRequest,System.Text.StringBuilder pchResponseBuffer,uint unResponseBufferSize) - { - uint result = FnTable.DriverDebugRequest(unDeviceIndex,pchRequest,pchResponseBuffer,unResponseBufferSize); - return result; - } public EVRFirmwareError PerformFirmwareUpdate(uint unDeviceIndex) { EVRFirmwareError result = FnTable.PerformFirmwareUpdate(unDeviceIndex); @@ -2044,9 +2113,15 @@ public void AcknowledgeQuit_Exiting() { FnTable.AcknowledgeQuit_Exiting(); } - public void AcknowledgeQuit_UserPrompt() + public uint GetAppContainerFilePaths(System.Text.StringBuilder pchBuffer,uint unBufferSize) { - FnTable.AcknowledgeQuit_UserPrompt(); + uint result = FnTable.GetAppContainerFilePaths(pchBuffer,unBufferSize); + return result; + } + public string GetRuntimeVersion() + { + IntPtr result = FnTable.GetRuntimeVersion(); + return Marshal.PtrToStringAnsi(result); } } @@ -2158,6 +2233,15 @@ public EVRTrackedCameraError ReleaseVideoStreamTextureGL(ulong hTrackedCamera,ui EVRTrackedCameraError result = FnTable.ReleaseVideoStreamTextureGL(hTrackedCamera,glTextureId); return result; } + public void SetCameraTrackingSpace(ETrackingUniverseOrigin eUniverse) + { + FnTable.SetCameraTrackingSpace(eUniverse); + } + public ETrackingUniverseOrigin GetCameraTrackingSpace() + { + ETrackingUniverseOrigin result = FnTable.GetCameraTrackingSpace(); + return result; + } } @@ -2293,9 +2377,9 @@ public EVRApplicationError GetStartingApplication(System.Text.StringBuilder pchA EVRApplicationError result = FnTable.GetStartingApplication(pchAppKeyBuffer,unAppKeyBufferLen); return result; } - public EVRApplicationTransitionState GetTransitionState() + public EVRSceneApplicationState GetSceneApplicationState() { - EVRApplicationTransitionState result = FnTable.GetTransitionState(); + EVRSceneApplicationState result = FnTable.GetSceneApplicationState(); return result; } public EVRApplicationError PerformApplicationPrelaunchCheck(string pchAppKey) @@ -2303,16 +2387,11 @@ public EVRApplicationError PerformApplicationPrelaunchCheck(string pchAppKey) EVRApplicationError result = FnTable.PerformApplicationPrelaunchCheck(pchAppKey); return result; } - public string GetApplicationsTransitionStateNameFromEnum(EVRApplicationTransitionState state) + public string GetSceneApplicationStateNameFromEnum(EVRSceneApplicationState state) { - IntPtr result = FnTable.GetApplicationsTransitionStateNameFromEnum(state); + IntPtr result = FnTable.GetSceneApplicationStateNameFromEnum(state); return Marshal.PtrToStringAnsi(result); } - public bool IsQuitUserPromptRequested() - { - bool result = FnTable.IsQuitUserPromptRequested(); - return result; - } public EVRApplicationError LaunchInternalProcess(string pchBinaryPath,string pchArguments,string pchWorkingDirectory) { EVRApplicationError result = FnTable.LaunchInternalProcess(pchBinaryPath,pchArguments,pchWorkingDirectory); @@ -2476,6 +2555,10 @@ public void HideWorkingSetPreview() { FnTable.HideWorkingSetPreview(); } + public void RoomSetupStarting() + { + FnTable.RoomSetupStarting(); + } } @@ -2687,6 +2770,25 @@ public bool IsMotionSmoothingEnabled() bool result = FnTable.IsMotionSmoothingEnabled(); return result; } + public bool IsMotionSmoothingSupported() + { + bool result = FnTable.IsMotionSmoothingSupported(); + return result; + } + public bool IsCurrentSceneFocusAppLoading() + { + 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(); + } } @@ -2714,16 +2816,6 @@ public EVROverlayError DestroyOverlay(ulong ulOverlayHandle) EVROverlayError result = FnTable.DestroyOverlay(ulOverlayHandle); return result; } - public EVROverlayError SetHighQualityOverlay(ulong ulOverlayHandle) - { - EVROverlayError result = FnTable.SetHighQualityOverlay(ulOverlayHandle); - return result; - } - public ulong GetHighQualityOverlay() - { - ulong result = FnTable.GetHighQualityOverlay(); - return result; - } public uint GetOverlayKey(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref EVROverlayError pError) { uint result = FnTable.GetOverlayKey(ulOverlayHandle,pchValue,unBufferSize,ref pError); @@ -2772,6 +2864,12 @@ public EVROverlayError GetOverlayFlag(ulong ulOverlayHandle,VROverlayFlags eOver 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); @@ -2829,16 +2927,15 @@ public EVROverlayError GetOverlayWidthInMeters(ulong ulOverlayHandle,ref float p EVROverlayError result = FnTable.GetOverlayWidthInMeters(ulOverlayHandle,ref pfWidthInMeters); return result; } - public EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle,float fMinDistanceInMeters,float fMaxDistanceInMeters) + public EVROverlayError SetOverlayCurvature(ulong ulOverlayHandle,float fCurvature) { - EVROverlayError result = FnTable.SetOverlayAutoCurveDistanceRangeInMeters(ulOverlayHandle,fMinDistanceInMeters,fMaxDistanceInMeters); + EVROverlayError result = FnTable.SetOverlayCurvature(ulOverlayHandle,fCurvature); return result; } - public EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle,ref float pfMinDistanceInMeters,ref float pfMaxDistanceInMeters) + public EVROverlayError GetOverlayCurvature(ulong ulOverlayHandle,ref float pfCurvature) { - pfMinDistanceInMeters = 0; - pfMaxDistanceInMeters = 0; - EVROverlayError result = FnTable.GetOverlayAutoCurveDistanceRangeInMeters(ulOverlayHandle,ref pfMinDistanceInMeters,ref pfMaxDistanceInMeters); + pfCurvature = 0; + EVROverlayError result = FnTable.GetOverlayCurvature(ulOverlayHandle,ref pfCurvature); return result; } public EVROverlayError SetOverlayTextureColorSpace(ulong ulOverlayHandle,EColorSpace eTextureColorSpace) @@ -2919,6 +3016,16 @@ public EVROverlayError SetOverlayTransformOverlayRelative(ulong ulOverlayHandle, 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); @@ -3000,35 +3107,40 @@ public bool IsHoverTargetOverlay(ulong ulOverlayHandle) bool result = FnTable.IsHoverTargetOverlay(ulOverlayHandle); return result; } - public ulong GetGamepadFocusOverlay() + public EVROverlayError SetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,ref HmdVector2_t pvCenter,float fRadius) { - ulong result = FnTable.GetGamepadFocusOverlay(); + EVROverlayError result = FnTable.SetOverlayDualAnalogTransform(ulOverlay,eWhich,ref pvCenter,fRadius); return result; } - public EVROverlayError SetGamepadFocusOverlay(ulong ulNewFocusOverlay) + public EVROverlayError GetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,ref HmdVector2_t pvCenter,ref float pfRadius) { - EVROverlayError result = FnTable.SetGamepadFocusOverlay(ulNewFocusOverlay); + pfRadius = 0; + EVROverlayError result = FnTable.GetOverlayDualAnalogTransform(ulOverlay,eWhich,ref pvCenter,ref pfRadius); return result; } - public EVROverlayError SetOverlayNeighbor(EOverlayDirection eDirection,ulong ulFrom,ulong ulTo) + public EVROverlayError SetOverlayIntersectionMask(ulong ulOverlayHandle,ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives,uint unNumMaskPrimitives,uint unPrimitiveSize) { - EVROverlayError result = FnTable.SetOverlayNeighbor(eDirection,ulFrom,ulTo); + EVROverlayError result = FnTable.SetOverlayIntersectionMask(ulOverlayHandle,ref pMaskPrimitives,unNumMaskPrimitives,unPrimitiveSize); return result; } - public EVROverlayError MoveGamepadFocusToNeighbor(EOverlayDirection eDirection,ulong ulFrom) + public EVROverlayError TriggerLaserMouseHapticVibration(ulong ulOverlayHandle,float fDurationSeconds,float fFrequency,float fAmplitude) { - EVROverlayError result = FnTable.MoveGamepadFocusToNeighbor(eDirection,ulFrom); + EVROverlayError result = FnTable.TriggerLaserMouseHapticVibration(ulOverlayHandle,fDurationSeconds,fFrequency,fAmplitude); return result; } - public EVROverlayError SetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,ref HmdVector2_t pvCenter,float fRadius) + public EVROverlayError SetOverlayCursor(ulong ulOverlayHandle,ulong ulCursorHandle) { - EVROverlayError result = FnTable.SetOverlayDualAnalogTransform(ulOverlay,eWhich,ref pvCenter,fRadius); + EVROverlayError result = FnTable.SetOverlayCursor(ulOverlayHandle,ulCursorHandle); return result; } - public EVROverlayError GetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,ref HmdVector2_t pvCenter,ref float pfRadius) + public EVROverlayError SetOverlayCursorPositionOverride(ulong ulOverlayHandle,ref HmdVector2_t pvCursor) { - pfRadius = 0; - EVROverlayError result = FnTable.GetOverlayDualAnalogTransform(ulOverlay,eWhich,ref pvCenter,ref pfRadius); + 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) @@ -3041,9 +3153,9 @@ public EVROverlayError ClearOverlayTexture(ulong ulOverlayHandle) 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) @@ -3135,17 +3247,6 @@ public void SetKeyboardPositionForOverlay(ulong ulOverlayHandle,HmdRect2_t avoid { 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); @@ -3319,11 +3420,6 @@ public string GetSettingsErrorNameFromEnum(EVRSettingsError eError) 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); @@ -3459,6 +3555,11 @@ public ulong GetDriverHandle(string pchDriverName) ulong result = FnTable.GetDriverHandle(pchDriverName); return result; } + public bool IsEnabled(uint nDriver) + { + bool result = FnTable.IsEnabled(nDriver); + return result; + } } @@ -3507,9 +3608,14 @@ public EVRInputError GetAnalogActionData(ulong action,ref InputAnalogActionData_ EVRInputError result = FnTable.GetAnalogActionData(action,ref pActionData,unActionDataSize,ulRestrictToDevice); return result; } - public EVRInputError GetPoseActionData(ulong action,ETrackingUniverseOrigin eOrigin,float fPredictedSecondsFromNow,ref InputPoseActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice) + public EVRInputError GetPoseActionDataRelativeToNow(ulong action,ETrackingUniverseOrigin eOrigin,float fPredictedSecondsFromNow,ref InputPoseActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice) + { + EVRInputError result = FnTable.GetPoseActionDataRelativeToNow(action,eOrigin,fPredictedSecondsFromNow,ref pActionData,unActionDataSize,ulRestrictToDevice); + return result; + } + public EVRInputError GetPoseActionDataForNextFrame(ulong action,ETrackingUniverseOrigin eOrigin,ref InputPoseActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice) { - EVRInputError result = FnTable.GetPoseActionData(action,eOrigin,fPredictedSecondsFromNow,ref pActionData,unActionDataSize,ulRestrictToDevice); + EVRInputError result = FnTable.GetPoseActionDataForNextFrame(action,eOrigin,ref pActionData,unActionDataSize,ulRestrictToDevice); return result; } public EVRInputError GetSkeletalActionData(ulong action,ref InputSkeletalActionData_t pActionData,uint unActionDataSize) @@ -3548,9 +3654,9 @@ public EVRInputError GetSkeletalBoneData(ulong action,EVRSkeletalTransformSpace EVRInputError result = FnTable.GetSkeletalBoneData(action,eTransformSpace,eMotionRange,pTransformArray,(uint) pTransformArray.Length); return result; } - public EVRInputError GetSkeletalSummaryData(ulong action,ref VRSkeletalSummaryData_t pSkeletalSummaryData) + public EVRInputError GetSkeletalSummaryData(ulong action,EVRSummaryType eSummaryType,ref VRSkeletalSummaryData_t pSkeletalSummaryData) { - EVRInputError result = FnTable.GetSkeletalSummaryData(action,ref pSkeletalSummaryData); + EVRInputError result = FnTable.GetSkeletalSummaryData(action,eSummaryType,ref pSkeletalSummaryData); return result; } public EVRInputError GetSkeletalBoneDataCompressed(ulong action,EVRSkeletalMotionRange eMotionRange,IntPtr pvCompressedData,uint unCompressedSize,ref uint punRequiredCompressedSize) @@ -3584,6 +3690,12 @@ public EVRInputError GetOriginTrackedDeviceInfo(ulong origin,ref InputOriginInfo EVRInputError result = FnTable.GetOriginTrackedDeviceInfo(origin,ref pOriginInfo,unOriginInfoSize); return result; } + public EVRInputError GetActionBindingInfo(ulong action,ref InputBindingInfo_t pOriginInfo,uint unBindingInfoSize,uint unBindingInfoCount,ref uint punReturnedBindingInfoCount) + { + punReturnedBindingInfoCount = 0; + EVRInputError result = FnTable.GetActionBindingInfo(action,ref pOriginInfo,unBindingInfoSize,unBindingInfoCount,ref punReturnedBindingInfoCount); + return result; + } public EVRInputError ShowActionOrigins(ulong actionSetHandle,ulong ulActionHandle) { EVRInputError result = FnTable.ShowActionOrigins(actionSetHandle,ulActionHandle); @@ -3599,6 +3711,11 @@ public bool IsUsingLegacyInput() bool result = FnTable.IsUsingLegacyInput(); return result; } + public EVRInputError OpenBindingUI(string pchAppKey,ulong ulActionSetHandle,ulong ulDeviceHandle,bool bShowOnDesktop) + { + EVRInputError result = FnTable.OpenBindingUI(pchAppKey,ulActionSetHandle,ulDeviceHandle,bShowOnDesktop); + return result; + } } @@ -3677,6 +3794,37 @@ public EVRSpatialAnchorError GetSpatialAnchorDescriptor(uint unHandle,System.Tex } +public class CVRDebug +{ + IVRDebug FnTable; + internal CVRDebug(IntPtr pInterface) + { + FnTable = (IVRDebug)Marshal.PtrToStructure(pInterface, typeof(IVRDebug)); + } + public EVRDebugError EmitVrProfilerEvent(string pchMessage) + { + EVRDebugError result = FnTable.EmitVrProfilerEvent(pchMessage); + return result; + } + public EVRDebugError BeginVrProfilerEvent(ref ulong pHandleOut) + { + pHandleOut = 0; + EVRDebugError result = FnTable.BeginVrProfilerEvent(ref pHandleOut); + return result; + } + public EVRDebugError FinishVrProfilerEvent(ulong hHandle,string pchMessage) + { + EVRDebugError result = FnTable.FinishVrProfilerEvent(hHandle,pchMessage); + return result; + } + public uint DriverDebugRequest(uint unDeviceIndex,string pchRequest,System.Text.StringBuilder pchResponseBuffer,uint unResponseBufferSize) + { + uint result = FnTable.DriverDebugRequest(unDeviceIndex,pchRequest,pchResponseBuffer,unResponseBufferSize); + return result; + } +} + + public class OpenVRInterop { [DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal", CallingConvention = CallingConvention.Cdecl)] @@ -3691,6 +3839,8 @@ public class OpenVRInterop internal static extern bool IsRuntimeInstalled(); [DllImportAttribute("openvr_api", EntryPoint = "VR_RuntimePath", CallingConvention = CallingConvention.Cdecl)] internal static extern string RuntimePath(); + [DllImportAttribute("openvr_api", EntryPoint = "VR_GetRuntimePath", CallingConvention = CallingConvention.Cdecl)] + internal static extern bool GetRuntimePath(System.Text.StringBuilder pchPathBuffer, uint unBufferSize, ref uint punRequiredBufferSize); [DllImportAttribute("openvr_api", EntryPoint = "VR_GetStringForHmdError", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr GetStringForHmdError(EVRInitError error); [DllImportAttribute("openvr_api", EntryPoint = "VR_GetGenericInterface", CallingConvention = CallingConvention.Cdecl)] @@ -3750,7 +3900,8 @@ public enum ETrackedControllerRole RightHand = 2, OptOut = 3, Treadmill = 4, - Max = 4, + Stylus = 5, + Max = 5, } public enum ETrackingUniverseOrigin { @@ -3815,6 +3966,11 @@ public enum ETrackedDeviceProperty Prop_BootloaderVersion_Uint64 = 1044, 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, @@ -3887,6 +4043,22 @@ public enum ETrackedDeviceProperty Prop_CameraDistortionFunction_Int32_Array = 2072, Prop_CameraDistortionCoefficients_Float_Array = 2073, Prop_ExpectedControllerType_String = 2074, + Prop_HmdTrackingStyle_Int32 = 2075, + Prop_DriverProvidedChaperoneVisibility_Bool = 2076, + 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, + Prop_IpdUIRangeMaxMeters_Float = 2101, Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, @@ -3896,6 +4068,9 @@ public enum ETrackedDeviceProperty Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206, Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, + Prop_Audio_DefaultPlaybackDeviceId_String = 2300, + Prop_Audio_DefaultRecordingDeviceId_String = 2301, + Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, Prop_AttachedDeviceId_String = 3000, Prop_SupportedButtons_Uint64 = 3001, Prop_Axis0Type_Int32 = 3002, @@ -3922,9 +4097,11 @@ public enum ETrackedDeviceProperty Prop_NamedIconPathDeviceNotReady_String = 5006, Prop_NamedIconPathDeviceStandby_String = 5007, Prop_NamedIconPathDeviceAlertLow_String = 5008, + Prop_NamedIconPathDeviceStandbyAlert_String = 5009, Prop_DisplayHiddenArea_Binary_Start = 5100, Prop_DisplayHiddenArea_Binary_End = 5150, Prop_ParentContainer = 5151, + Prop_OverrideContainer_Uint64 = 5152, Prop_UserConfigPath_String = 6000, Prop_InstallPath_String = 6001, Prop_HasDisplayComponent_Bool = 6002, @@ -3934,7 +4111,6 @@ public enum ETrackedDeviceProperty Prop_HasVirtualDisplayComponent_Bool = 6006, Prop_HasSpatialAnchorsSupport_Bool = 6007, Prop_ControllerType_String = 7000, - Prop_LegacyInputProfile_String = 7001, Prop_ControllerHandSelectionPriority_Int32 = 7002, Prop_VendorSpecific_Reserved_Start = 10000, Prop_VendorSpecific_Reserved_End = 10999, @@ -3956,6 +4132,15 @@ public enum ETrackedPropertyError TrackedProp_InvalidOperation = 11, TrackedProp_CannotWriteToWildcards = 12, TrackedProp_IPCReadFailure = 13, + TrackedProp_OutOfMemory = 14, + TrackedProp_InvalidContainer = 15, +} +public enum EHmdTrackingStyle +{ + Unknown = 0, + Lighthouse = 1, + OutsideInCameras = 2, + InsideOutCameras = 3, } public enum EVRSubmitFlags { @@ -4019,16 +4204,14 @@ public enum EVREventType VREvent_ScrollSmooth = 309, VREvent_InputFocusCaptured = 400, VREvent_InputFocusReleased = 401, - VREvent_SceneFocusLost = 402, - VREvent_SceneFocusGained = 403, VREvent_SceneApplicationChanged = 404, VREvent_SceneFocusChanged = 405, VREvent_InputFocusChanged = 406, - VREvent_SceneApplicationSecondaryRenderingStarted = 407, VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, VREvent_ActionBindingReloaded = 409, VREvent_HideRenderModels = 410, VREvent_ShowRenderModels = 411, + VREvent_SceneApplicationStateChanged = 412, VREvent_ConsoleOpened = 420, VREvent_ConsoleClosed = 421, VREvent_OverlayShown = 500, @@ -4064,7 +4247,6 @@ public enum EVREventType VREvent_Notification_Destroyed = 603, VREvent_Quit = 700, VREvent_ProcessQuit = 701, - VREvent_QuitAborted_UserPrompt = 702, VREvent_QuitAcknowledged = 703, VREvent_DriverRequestedQuit = 704, VREvent_RestartRequested = 705, @@ -4074,6 +4256,8 @@ public enum EVREventType VREvent_ChaperoneSettingsHaveChanged = 803, VREvent_SeatedZeroPoseReset = 804, VREvent_ChaperoneFlushCache = 805, + VREvent_ChaperoneRoomSetupStarting = 806, + VREvent_ChaperoneRoomSetupFinished = 807, VREvent_AudioSettingsHaveChanged = 820, VREvent_BackgroundSettingHasChanged = 850, VREvent_CameraSettingsHaveChanged = 851, @@ -4094,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, @@ -4102,16 +4287,10 @@ public enum EVREventType VREvent_KeyboardClosed = 1200, VREvent_KeyboardCharInput = 1201, VREvent_KeyboardDone = 1202, - VREvent_ApplicationTransitionStarted = 1300, - VREvent_ApplicationTransitionAborted = 1301, - VREvent_ApplicationTransitionNewAppStarted = 1302, VREvent_ApplicationListUpdated = 1303, VREvent_ApplicationMimeTypeLoad = 1304, - VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, VREvent_ProcessConnected = 1306, VREvent_ProcessDisconnected = 1307, - VREvent_Compositor_MirrorWindowShown = 1400, - VREvent_Compositor_MirrorWindowHidden = 1401, VREvent_Compositor_ChaperoneBoundsShown = 1410, VREvent_Compositor_ChaperoneBoundsHidden = 1411, VREvent_Compositor_DisplayDisconnected = 1412, @@ -4119,6 +4298,9 @@ public enum EVREventType VREvent_Compositor_HDCPError = 1414, VREvent_Compositor_ApplicationNotResponding = 1415, 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, @@ -4137,11 +4319,14 @@ 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, VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, VREvent_SystemReport_Started = 1900, + VREvent_Monitor_ShowHeadsetView = 2000, + VREvent_Monitor_HideHeadsetView = 2001, VREvent_VendorSpecific_Reserved_Start = 10000, VREvent_VendorSpecific_Reserved_End = 19999, } @@ -4152,6 +4337,7 @@ public enum EDeviceActivityLevel k_EDeviceActivityLevel_UserInteraction = 1, k_EDeviceActivityLevel_UserInteraction_Timeout = 2, k_EDeviceActivityLevel_Standby = 3, + k_EDeviceActivityLevel_Idle_Timeout = 4, } public enum EVRButtonId { @@ -4172,9 +4358,9 @@ public enum EVRButtonId k_EButton_SteamVR_Touchpad = 32, k_EButton_SteamVR_Trigger = 33, k_EButton_Dashboard_Back = 2, - k_EButton_Knuckles_A = 2, - k_EButton_Knuckles_B = 1, - k_EButton_Knuckles_JoyStick = 35, + k_EButton_IndexController_A = 2, + k_EButton_IndexController_B = 1, + k_EButton_IndexController_JoyStick = 35, k_EButton_Max = 64, } public enum EVRMouseButton @@ -4192,9 +4378,10 @@ public enum EShowUIType { ShowUI_ControllerBinding = 0, ShowUI_ManageTrackers = 1, - ShowUI_QuickStart = 2, ShowUI_Pairing = 3, ShowUI_Settings = 4, + ShowUI_DebugCommands = 5, + ShowUI_FullControllerBinding = 6, } public enum EHDCPError { @@ -4385,6 +4572,9 @@ public enum EVRInitError Init_VRWebHelperStartupFailed = 141, Init_TrackerManagerInitFailed = 142, Init_AlreadyRunning = 143, + Init_FailedForVrMonitor = 144, + Init_PropertyManagerInitFailed = 145, + Init_WebServerFailed = 146, Driver_Failed = 200, Driver_Unknown = 201, Driver_HmdUnknown = 202, @@ -4397,6 +4587,7 @@ public enum EVRInitError Driver_TrackedDeviceInterfaceUnknown = 209, Driver_HmdDriverIdOutOfBounds = 211, Driver_HmdDisplayMirrored = 212, + Driver_HmdDisplayNotFoundLaptop = 213, IPC_ServerInitFailed = 300, IPC_ConnectFailed = 301, IPC_SharedStateInitFailed = 302, @@ -4406,6 +4597,8 @@ public enum EVRInitError IPC_CompositorConnectFailed = 306, IPC_CompositorInvalidConnectResponse = 307, IPC_ConnectFailedAfterMultipleAttempts = 308, + IPC_ConnectFailedAfterTargetExited = 309, + IPC_NamespaceUnavailable = 310, Compositor_Failed = 400, Compositor_D3D11HardwareRequired = 401, Compositor_FirmwareRequiresUpdate = 402, @@ -4491,6 +4684,9 @@ public enum EVRInitError Compositor_CreateTextIndexBuffer = 482, Compositor_CreateMirrorTextures = 483, Compositor_CreateLastFrameRenderTexture = 484, + Compositor_CreateMirrorOverlay = 485, + Compositor_FailedToCreateVirtualDisplayBackbuffer = 486, + Compositor_DisplayModeNotSupported = 487, VendorSpecific_UnableToConnectToOculusRuntime = 1000, VendorSpecific_WindowsNotInDevMode = 1001, VendorSpecific_HmdFound_CantOpenDevice = 1101, @@ -4506,6 +4702,7 @@ public enum EVRInitError VendorSpecific_HmdFound_UserDataAddressRange = 1111, VendorSpecific_HmdFound_UserDataError = 1112, VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + VendorSpecific_OculusRuntimeBadInstall = 1114, Steam_SteamInstallationNotFound = 2000, LastError = 2001, } @@ -4626,14 +4823,16 @@ public enum EVRApplicationProperty IsInstanced_Bool = 62, IsInternal_Bool = 63, WantsCompositorPauseInStandby_Bool = 64, + IsHidden_Bool = 65, LastLaunchTime_Uint64 = 70, } -public enum EVRApplicationTransitionState +public enum EVRSceneApplicationState { - VRApplicationTransition_None = 0, - VRApplicationTransition_OldAppQuitSent = 10, - VRApplicationTransition_WaitingForExternalLaunch = 11, - VRApplicationTransition_NewAppLaunched = 20, + None = 0, + Starting = 1, + Quitting = 2, + Running = 3, + Waiting = 4, } public enum ChaperoneCalibrationState { @@ -4671,6 +4870,7 @@ public enum EVRCompositorError IndexOutOfRange = 107, AlreadySubmitted = 108, InvalidBounds = 109, + AlreadySet = 110, } public enum EVRCompositorTimingMode { @@ -4686,31 +4886,32 @@ 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 { - None = 0, - Curved = 1, - RGSS4X = 2, - NoDashboardTab = 3, - AcceptsGamepadEvents = 4, - ShowGamepadFocus = 5, - SendVRDiscreteScrollEvents = 6, - SendVRTouchpadEvents = 7, - ShowTouchPadScrollWheel = 8, - TransferOwnershipToInternalProcess = 9, - SideBySide_Parallel = 10, - SideBySide_Crossed = 11, - Panorama = 12, - StereoPanorama = 13, - SortWithNonSceneOverlays = 14, - VisibleInDashboard = 15, - MakeOverlaysInteractiveIfVisible = 16, - SendVRSmoothScrollEvents = 17, + NoDashboardTab = 8, + SendVRDiscreteScrollEvents = 64, + SendVRTouchpadEvents = 128, + ShowTouchPadScrollWheel = 256, + TransferOwnershipToInternalProcess = 512, + SideBySide_Parallel = 1024, + SideBySide_Crossed = 2048, + Panorama = 4096, + StereoPanorama = 8192, + SortWithNonSceneOverlays = 16384, + VisibleInDashboard = 32768, + MakeOverlaysInteractiveIfVisible = 65536, + SendVRSmoothScrollEvents = 131072, + ProtectedContent = 262144, + HideLaserIntersection = 524288, } public enum VRMessageOverlayResponse { @@ -4733,14 +4934,6 @@ public enum EGamepadTextInputLineMode k_EGamepadTextInputLineModeSingleLine = 0, k_EGamepadTextInputLineModeMultipleLines = 1, } -public enum EOverlayDirection -{ - Up = 0, - Down = 1, - Left = 2, - Right = 3, - Count = 4, -} public enum EVROverlayIntersectionMaskPrimitiveType { OverlayIntersectionPrimitiveType_Rectangle = 0, @@ -4831,6 +5024,11 @@ public enum EVRFingerSplay Ring_Pinky = 3, Count = 4, } +public enum EVRSummaryType +{ + FromAnimation = 0, + FromDevice = 1, +} public enum EVRInputFilterCancelType { VRInputFilterCancel_Timers = 0, @@ -4859,6 +5057,11 @@ public enum EIOBufferMode Write = 2, Create = 512, } +public enum EVRDebugError +{ + Success = 0, + BadParameter = 1, +} [StructLayout(LayoutKind.Explicit)] public struct VREvent_Data_t { @@ -4915,6 +5118,42 @@ public enum EIOBufferMode public float m9; public float m10; public float m11; +#if UNITY_5_3_OR_NEWER + + public Vector3 GetPosition() + { + return new Vector3(m3, m7, -m11); + } + + public bool IsRotationValid() + { + return ((m2 != 0 || m6 != 0 || m10 != 0) && (m1 != 0 || m5 != 0 || m9 != 0)); + } + + public Quaternion GetRotation() + { + if (IsRotationValid()) + { + float w = Mathf.Sqrt(Mathf.Max(0, 1 + m0 + m5 + m10)) / 2; + float x = Mathf.Sqrt(Mathf.Max(0, 1 + m0 - m5 - m10)) / 2; + float y = Mathf.Sqrt(Mathf.Max(0, 1 - m0 + m5 - m10)) / 2; + float z = Mathf.Sqrt(Mathf.Max(0, 1 - m0 - m5 + m10)) / 2; + + _copysign(ref x, -m9 - -m6); + _copysign(ref y, -m2 - -m8); + _copysign(ref z, m4 - m1); + + return new Quaternion(x, y, z, w); + } + return Quaternion.identity; + } + + private static void _copysign(ref float sizeval, float signval) + { + if (signval > 0 != sizeval > 0) + sizeval = -sizeval; + } +#endif } [StructLayout(LayoutKind.Sequential)] public struct HmdMatrix33_t { @@ -5374,29 +5613,9 @@ public void Unpack(ref VRControllerState_t unpacked) public uint nHeight; public uint nBytesPerPixel; public uint nFrameSequence; - public TrackedDevicePose_t standingTrackedDevicePose; + public TrackedDevicePose_t trackedDevicePose; public ulong ulFrameExposureTime; } -[StructLayout(LayoutKind.Sequential)] public struct DriverDirectMode_FrameTiming -{ - public uint m_nSize; - public uint m_nNumFramePresents; - public uint m_nNumMisPresented; - public uint m_nNumDroppedFrames; - public uint m_nReprojectionFlags; -} -[StructLayout(LayoutKind.Sequential)] public struct ImuSample_t -{ - public double fSampleTime; - public HmdVector3d_t vAccel; - public HmdVector3d_t vGyro; - public uint unOffScaleFlags; -} -[StructLayout(LayoutKind.Sequential)] public struct AppOverrideKeys_t -{ - public IntPtr pchKey; // const char * - public IntPtr pchValue; // const char * -} [StructLayout(LayoutKind.Sequential)] public struct Compositor_FrameTiming { public uint m_nSize; @@ -5426,6 +5645,26 @@ public void Unpack(ref VRControllerState_t unpacked) public uint m_nNumVSyncsReadyForUse; public uint m_nNumVSyncsToFirstView; } +[StructLayout(LayoutKind.Sequential)] public struct DriverDirectMode_FrameTiming +{ + public uint m_nSize; + public uint m_nNumFramePresents; + public uint m_nNumMisPresented; + public uint m_nNumDroppedFrames; + public uint m_nReprojectionFlags; +} +[StructLayout(LayoutKind.Sequential)] public struct ImuSample_t +{ + public double fSampleTime; + public HmdVector3d_t vAccel; + public HmdVector3d_t vGyro; + public uint unOffScaleFlags; +} +[StructLayout(LayoutKind.Sequential)] public struct AppOverrideKeys_t +{ + public IntPtr pchKey; // const char * + public IntPtr pchValue; // const char * +} [StructLayout(LayoutKind.Sequential)] public struct Compositor_CumulativeStats { public uint m_nPid; @@ -5444,6 +5683,20 @@ public void Unpack(ref VRControllerState_t unpacked) 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; @@ -5741,6 +5994,557 @@ public string rchRenderModelComponentName } } } +[StructLayout(LayoutKind.Sequential)] public struct InputBindingInfo_t +{ + public byte rchDevicePathName0,rchDevicePathName1,rchDevicePathName2,rchDevicePathName3,rchDevicePathName4,rchDevicePathName5,rchDevicePathName6,rchDevicePathName7,rchDevicePathName8,rchDevicePathName9,rchDevicePathName10,rchDevicePathName11,rchDevicePathName12,rchDevicePathName13,rchDevicePathName14,rchDevicePathName15,rchDevicePathName16,rchDevicePathName17,rchDevicePathName18,rchDevicePathName19,rchDevicePathName20,rchDevicePathName21,rchDevicePathName22,rchDevicePathName23,rchDevicePathName24,rchDevicePathName25,rchDevicePathName26,rchDevicePathName27,rchDevicePathName28,rchDevicePathName29,rchDevicePathName30,rchDevicePathName31,rchDevicePathName32,rchDevicePathName33,rchDevicePathName34,rchDevicePathName35,rchDevicePathName36,rchDevicePathName37,rchDevicePathName38,rchDevicePathName39,rchDevicePathName40,rchDevicePathName41,rchDevicePathName42,rchDevicePathName43,rchDevicePathName44,rchDevicePathName45,rchDevicePathName46,rchDevicePathName47,rchDevicePathName48,rchDevicePathName49,rchDevicePathName50,rchDevicePathName51,rchDevicePathName52,rchDevicePathName53,rchDevicePathName54,rchDevicePathName55,rchDevicePathName56,rchDevicePathName57,rchDevicePathName58,rchDevicePathName59,rchDevicePathName60,rchDevicePathName61,rchDevicePathName62,rchDevicePathName63,rchDevicePathName64,rchDevicePathName65,rchDevicePathName66,rchDevicePathName67,rchDevicePathName68,rchDevicePathName69,rchDevicePathName70,rchDevicePathName71,rchDevicePathName72,rchDevicePathName73,rchDevicePathName74,rchDevicePathName75,rchDevicePathName76,rchDevicePathName77,rchDevicePathName78,rchDevicePathName79,rchDevicePathName80,rchDevicePathName81,rchDevicePathName82,rchDevicePathName83,rchDevicePathName84,rchDevicePathName85,rchDevicePathName86,rchDevicePathName87,rchDevicePathName88,rchDevicePathName89,rchDevicePathName90,rchDevicePathName91,rchDevicePathName92,rchDevicePathName93,rchDevicePathName94,rchDevicePathName95,rchDevicePathName96,rchDevicePathName97,rchDevicePathName98,rchDevicePathName99,rchDevicePathName100,rchDevicePathName101,rchDevicePathName102,rchDevicePathName103,rchDevicePathName104,rchDevicePathName105,rchDevicePathName106,rchDevicePathName107,rchDevicePathName108,rchDevicePathName109,rchDevicePathName110,rchDevicePathName111,rchDevicePathName112,rchDevicePathName113,rchDevicePathName114,rchDevicePathName115,rchDevicePathName116,rchDevicePathName117,rchDevicePathName118,rchDevicePathName119,rchDevicePathName120,rchDevicePathName121,rchDevicePathName122,rchDevicePathName123,rchDevicePathName124,rchDevicePathName125,rchDevicePathName126,rchDevicePathName127; + public string rchDevicePathName + { + get + { + return new string(new char[] { + (char)rchDevicePathName0, + (char)rchDevicePathName1, + (char)rchDevicePathName2, + (char)rchDevicePathName3, + (char)rchDevicePathName4, + (char)rchDevicePathName5, + (char)rchDevicePathName6, + (char)rchDevicePathName7, + (char)rchDevicePathName8, + (char)rchDevicePathName9, + (char)rchDevicePathName10, + (char)rchDevicePathName11, + (char)rchDevicePathName12, + (char)rchDevicePathName13, + (char)rchDevicePathName14, + (char)rchDevicePathName15, + (char)rchDevicePathName16, + (char)rchDevicePathName17, + (char)rchDevicePathName18, + (char)rchDevicePathName19, + (char)rchDevicePathName20, + (char)rchDevicePathName21, + (char)rchDevicePathName22, + (char)rchDevicePathName23, + (char)rchDevicePathName24, + (char)rchDevicePathName25, + (char)rchDevicePathName26, + (char)rchDevicePathName27, + (char)rchDevicePathName28, + (char)rchDevicePathName29, + (char)rchDevicePathName30, + (char)rchDevicePathName31, + (char)rchDevicePathName32, + (char)rchDevicePathName33, + (char)rchDevicePathName34, + (char)rchDevicePathName35, + (char)rchDevicePathName36, + (char)rchDevicePathName37, + (char)rchDevicePathName38, + (char)rchDevicePathName39, + (char)rchDevicePathName40, + (char)rchDevicePathName41, + (char)rchDevicePathName42, + (char)rchDevicePathName43, + (char)rchDevicePathName44, + (char)rchDevicePathName45, + (char)rchDevicePathName46, + (char)rchDevicePathName47, + (char)rchDevicePathName48, + (char)rchDevicePathName49, + (char)rchDevicePathName50, + (char)rchDevicePathName51, + (char)rchDevicePathName52, + (char)rchDevicePathName53, + (char)rchDevicePathName54, + (char)rchDevicePathName55, + (char)rchDevicePathName56, + (char)rchDevicePathName57, + (char)rchDevicePathName58, + (char)rchDevicePathName59, + (char)rchDevicePathName60, + (char)rchDevicePathName61, + (char)rchDevicePathName62, + (char)rchDevicePathName63, + (char)rchDevicePathName64, + (char)rchDevicePathName65, + (char)rchDevicePathName66, + (char)rchDevicePathName67, + (char)rchDevicePathName68, + (char)rchDevicePathName69, + (char)rchDevicePathName70, + (char)rchDevicePathName71, + (char)rchDevicePathName72, + (char)rchDevicePathName73, + (char)rchDevicePathName74, + (char)rchDevicePathName75, + (char)rchDevicePathName76, + (char)rchDevicePathName77, + (char)rchDevicePathName78, + (char)rchDevicePathName79, + (char)rchDevicePathName80, + (char)rchDevicePathName81, + (char)rchDevicePathName82, + (char)rchDevicePathName83, + (char)rchDevicePathName84, + (char)rchDevicePathName85, + (char)rchDevicePathName86, + (char)rchDevicePathName87, + (char)rchDevicePathName88, + (char)rchDevicePathName89, + (char)rchDevicePathName90, + (char)rchDevicePathName91, + (char)rchDevicePathName92, + (char)rchDevicePathName93, + (char)rchDevicePathName94, + (char)rchDevicePathName95, + (char)rchDevicePathName96, + (char)rchDevicePathName97, + (char)rchDevicePathName98, + (char)rchDevicePathName99, + (char)rchDevicePathName100, + (char)rchDevicePathName101, + (char)rchDevicePathName102, + (char)rchDevicePathName103, + (char)rchDevicePathName104, + (char)rchDevicePathName105, + (char)rchDevicePathName106, + (char)rchDevicePathName107, + (char)rchDevicePathName108, + (char)rchDevicePathName109, + (char)rchDevicePathName110, + (char)rchDevicePathName111, + (char)rchDevicePathName112, + (char)rchDevicePathName113, + (char)rchDevicePathName114, + (char)rchDevicePathName115, + (char)rchDevicePathName116, + (char)rchDevicePathName117, + (char)rchDevicePathName118, + (char)rchDevicePathName119, + (char)rchDevicePathName120, + (char)rchDevicePathName121, + (char)rchDevicePathName122, + (char)rchDevicePathName123, + (char)rchDevicePathName124, + (char)rchDevicePathName125, + (char)rchDevicePathName126, + (char)rchDevicePathName127 + }).TrimEnd('\0'); + } + } + public byte rchInputPathName0,rchInputPathName1,rchInputPathName2,rchInputPathName3,rchInputPathName4,rchInputPathName5,rchInputPathName6,rchInputPathName7,rchInputPathName8,rchInputPathName9,rchInputPathName10,rchInputPathName11,rchInputPathName12,rchInputPathName13,rchInputPathName14,rchInputPathName15,rchInputPathName16,rchInputPathName17,rchInputPathName18,rchInputPathName19,rchInputPathName20,rchInputPathName21,rchInputPathName22,rchInputPathName23,rchInputPathName24,rchInputPathName25,rchInputPathName26,rchInputPathName27,rchInputPathName28,rchInputPathName29,rchInputPathName30,rchInputPathName31,rchInputPathName32,rchInputPathName33,rchInputPathName34,rchInputPathName35,rchInputPathName36,rchInputPathName37,rchInputPathName38,rchInputPathName39,rchInputPathName40,rchInputPathName41,rchInputPathName42,rchInputPathName43,rchInputPathName44,rchInputPathName45,rchInputPathName46,rchInputPathName47,rchInputPathName48,rchInputPathName49,rchInputPathName50,rchInputPathName51,rchInputPathName52,rchInputPathName53,rchInputPathName54,rchInputPathName55,rchInputPathName56,rchInputPathName57,rchInputPathName58,rchInputPathName59,rchInputPathName60,rchInputPathName61,rchInputPathName62,rchInputPathName63,rchInputPathName64,rchInputPathName65,rchInputPathName66,rchInputPathName67,rchInputPathName68,rchInputPathName69,rchInputPathName70,rchInputPathName71,rchInputPathName72,rchInputPathName73,rchInputPathName74,rchInputPathName75,rchInputPathName76,rchInputPathName77,rchInputPathName78,rchInputPathName79,rchInputPathName80,rchInputPathName81,rchInputPathName82,rchInputPathName83,rchInputPathName84,rchInputPathName85,rchInputPathName86,rchInputPathName87,rchInputPathName88,rchInputPathName89,rchInputPathName90,rchInputPathName91,rchInputPathName92,rchInputPathName93,rchInputPathName94,rchInputPathName95,rchInputPathName96,rchInputPathName97,rchInputPathName98,rchInputPathName99,rchInputPathName100,rchInputPathName101,rchInputPathName102,rchInputPathName103,rchInputPathName104,rchInputPathName105,rchInputPathName106,rchInputPathName107,rchInputPathName108,rchInputPathName109,rchInputPathName110,rchInputPathName111,rchInputPathName112,rchInputPathName113,rchInputPathName114,rchInputPathName115,rchInputPathName116,rchInputPathName117,rchInputPathName118,rchInputPathName119,rchInputPathName120,rchInputPathName121,rchInputPathName122,rchInputPathName123,rchInputPathName124,rchInputPathName125,rchInputPathName126,rchInputPathName127; + public string rchInputPathName + { + get + { + return new string(new char[] { + (char)rchInputPathName0, + (char)rchInputPathName1, + (char)rchInputPathName2, + (char)rchInputPathName3, + (char)rchInputPathName4, + (char)rchInputPathName5, + (char)rchInputPathName6, + (char)rchInputPathName7, + (char)rchInputPathName8, + (char)rchInputPathName9, + (char)rchInputPathName10, + (char)rchInputPathName11, + (char)rchInputPathName12, + (char)rchInputPathName13, + (char)rchInputPathName14, + (char)rchInputPathName15, + (char)rchInputPathName16, + (char)rchInputPathName17, + (char)rchInputPathName18, + (char)rchInputPathName19, + (char)rchInputPathName20, + (char)rchInputPathName21, + (char)rchInputPathName22, + (char)rchInputPathName23, + (char)rchInputPathName24, + (char)rchInputPathName25, + (char)rchInputPathName26, + (char)rchInputPathName27, + (char)rchInputPathName28, + (char)rchInputPathName29, + (char)rchInputPathName30, + (char)rchInputPathName31, + (char)rchInputPathName32, + (char)rchInputPathName33, + (char)rchInputPathName34, + (char)rchInputPathName35, + (char)rchInputPathName36, + (char)rchInputPathName37, + (char)rchInputPathName38, + (char)rchInputPathName39, + (char)rchInputPathName40, + (char)rchInputPathName41, + (char)rchInputPathName42, + (char)rchInputPathName43, + (char)rchInputPathName44, + (char)rchInputPathName45, + (char)rchInputPathName46, + (char)rchInputPathName47, + (char)rchInputPathName48, + (char)rchInputPathName49, + (char)rchInputPathName50, + (char)rchInputPathName51, + (char)rchInputPathName52, + (char)rchInputPathName53, + (char)rchInputPathName54, + (char)rchInputPathName55, + (char)rchInputPathName56, + (char)rchInputPathName57, + (char)rchInputPathName58, + (char)rchInputPathName59, + (char)rchInputPathName60, + (char)rchInputPathName61, + (char)rchInputPathName62, + (char)rchInputPathName63, + (char)rchInputPathName64, + (char)rchInputPathName65, + (char)rchInputPathName66, + (char)rchInputPathName67, + (char)rchInputPathName68, + (char)rchInputPathName69, + (char)rchInputPathName70, + (char)rchInputPathName71, + (char)rchInputPathName72, + (char)rchInputPathName73, + (char)rchInputPathName74, + (char)rchInputPathName75, + (char)rchInputPathName76, + (char)rchInputPathName77, + (char)rchInputPathName78, + (char)rchInputPathName79, + (char)rchInputPathName80, + (char)rchInputPathName81, + (char)rchInputPathName82, + (char)rchInputPathName83, + (char)rchInputPathName84, + (char)rchInputPathName85, + (char)rchInputPathName86, + (char)rchInputPathName87, + (char)rchInputPathName88, + (char)rchInputPathName89, + (char)rchInputPathName90, + (char)rchInputPathName91, + (char)rchInputPathName92, + (char)rchInputPathName93, + (char)rchInputPathName94, + (char)rchInputPathName95, + (char)rchInputPathName96, + (char)rchInputPathName97, + (char)rchInputPathName98, + (char)rchInputPathName99, + (char)rchInputPathName100, + (char)rchInputPathName101, + (char)rchInputPathName102, + (char)rchInputPathName103, + (char)rchInputPathName104, + (char)rchInputPathName105, + (char)rchInputPathName106, + (char)rchInputPathName107, + (char)rchInputPathName108, + (char)rchInputPathName109, + (char)rchInputPathName110, + (char)rchInputPathName111, + (char)rchInputPathName112, + (char)rchInputPathName113, + (char)rchInputPathName114, + (char)rchInputPathName115, + (char)rchInputPathName116, + (char)rchInputPathName117, + (char)rchInputPathName118, + (char)rchInputPathName119, + (char)rchInputPathName120, + (char)rchInputPathName121, + (char)rchInputPathName122, + (char)rchInputPathName123, + (char)rchInputPathName124, + (char)rchInputPathName125, + (char)rchInputPathName126, + (char)rchInputPathName127 + }).TrimEnd('\0'); + } + } + public byte rchModeName0,rchModeName1,rchModeName2,rchModeName3,rchModeName4,rchModeName5,rchModeName6,rchModeName7,rchModeName8,rchModeName9,rchModeName10,rchModeName11,rchModeName12,rchModeName13,rchModeName14,rchModeName15,rchModeName16,rchModeName17,rchModeName18,rchModeName19,rchModeName20,rchModeName21,rchModeName22,rchModeName23,rchModeName24,rchModeName25,rchModeName26,rchModeName27,rchModeName28,rchModeName29,rchModeName30,rchModeName31,rchModeName32,rchModeName33,rchModeName34,rchModeName35,rchModeName36,rchModeName37,rchModeName38,rchModeName39,rchModeName40,rchModeName41,rchModeName42,rchModeName43,rchModeName44,rchModeName45,rchModeName46,rchModeName47,rchModeName48,rchModeName49,rchModeName50,rchModeName51,rchModeName52,rchModeName53,rchModeName54,rchModeName55,rchModeName56,rchModeName57,rchModeName58,rchModeName59,rchModeName60,rchModeName61,rchModeName62,rchModeName63,rchModeName64,rchModeName65,rchModeName66,rchModeName67,rchModeName68,rchModeName69,rchModeName70,rchModeName71,rchModeName72,rchModeName73,rchModeName74,rchModeName75,rchModeName76,rchModeName77,rchModeName78,rchModeName79,rchModeName80,rchModeName81,rchModeName82,rchModeName83,rchModeName84,rchModeName85,rchModeName86,rchModeName87,rchModeName88,rchModeName89,rchModeName90,rchModeName91,rchModeName92,rchModeName93,rchModeName94,rchModeName95,rchModeName96,rchModeName97,rchModeName98,rchModeName99,rchModeName100,rchModeName101,rchModeName102,rchModeName103,rchModeName104,rchModeName105,rchModeName106,rchModeName107,rchModeName108,rchModeName109,rchModeName110,rchModeName111,rchModeName112,rchModeName113,rchModeName114,rchModeName115,rchModeName116,rchModeName117,rchModeName118,rchModeName119,rchModeName120,rchModeName121,rchModeName122,rchModeName123,rchModeName124,rchModeName125,rchModeName126,rchModeName127; + public string rchModeName + { + get + { + return new string(new char[] { + (char)rchModeName0, + (char)rchModeName1, + (char)rchModeName2, + (char)rchModeName3, + (char)rchModeName4, + (char)rchModeName5, + (char)rchModeName6, + (char)rchModeName7, + (char)rchModeName8, + (char)rchModeName9, + (char)rchModeName10, + (char)rchModeName11, + (char)rchModeName12, + (char)rchModeName13, + (char)rchModeName14, + (char)rchModeName15, + (char)rchModeName16, + (char)rchModeName17, + (char)rchModeName18, + (char)rchModeName19, + (char)rchModeName20, + (char)rchModeName21, + (char)rchModeName22, + (char)rchModeName23, + (char)rchModeName24, + (char)rchModeName25, + (char)rchModeName26, + (char)rchModeName27, + (char)rchModeName28, + (char)rchModeName29, + (char)rchModeName30, + (char)rchModeName31, + (char)rchModeName32, + (char)rchModeName33, + (char)rchModeName34, + (char)rchModeName35, + (char)rchModeName36, + (char)rchModeName37, + (char)rchModeName38, + (char)rchModeName39, + (char)rchModeName40, + (char)rchModeName41, + (char)rchModeName42, + (char)rchModeName43, + (char)rchModeName44, + (char)rchModeName45, + (char)rchModeName46, + (char)rchModeName47, + (char)rchModeName48, + (char)rchModeName49, + (char)rchModeName50, + (char)rchModeName51, + (char)rchModeName52, + (char)rchModeName53, + (char)rchModeName54, + (char)rchModeName55, + (char)rchModeName56, + (char)rchModeName57, + (char)rchModeName58, + (char)rchModeName59, + (char)rchModeName60, + (char)rchModeName61, + (char)rchModeName62, + (char)rchModeName63, + (char)rchModeName64, + (char)rchModeName65, + (char)rchModeName66, + (char)rchModeName67, + (char)rchModeName68, + (char)rchModeName69, + (char)rchModeName70, + (char)rchModeName71, + (char)rchModeName72, + (char)rchModeName73, + (char)rchModeName74, + (char)rchModeName75, + (char)rchModeName76, + (char)rchModeName77, + (char)rchModeName78, + (char)rchModeName79, + (char)rchModeName80, + (char)rchModeName81, + (char)rchModeName82, + (char)rchModeName83, + (char)rchModeName84, + (char)rchModeName85, + (char)rchModeName86, + (char)rchModeName87, + (char)rchModeName88, + (char)rchModeName89, + (char)rchModeName90, + (char)rchModeName91, + (char)rchModeName92, + (char)rchModeName93, + (char)rchModeName94, + (char)rchModeName95, + (char)rchModeName96, + (char)rchModeName97, + (char)rchModeName98, + (char)rchModeName99, + (char)rchModeName100, + (char)rchModeName101, + (char)rchModeName102, + (char)rchModeName103, + (char)rchModeName104, + (char)rchModeName105, + (char)rchModeName106, + (char)rchModeName107, + (char)rchModeName108, + (char)rchModeName109, + (char)rchModeName110, + (char)rchModeName111, + (char)rchModeName112, + (char)rchModeName113, + (char)rchModeName114, + (char)rchModeName115, + (char)rchModeName116, + (char)rchModeName117, + (char)rchModeName118, + (char)rchModeName119, + (char)rchModeName120, + (char)rchModeName121, + (char)rchModeName122, + (char)rchModeName123, + (char)rchModeName124, + (char)rchModeName125, + (char)rchModeName126, + (char)rchModeName127 + }).TrimEnd('\0'); + } + } + public byte rchSlotName0,rchSlotName1,rchSlotName2,rchSlotName3,rchSlotName4,rchSlotName5,rchSlotName6,rchSlotName7,rchSlotName8,rchSlotName9,rchSlotName10,rchSlotName11,rchSlotName12,rchSlotName13,rchSlotName14,rchSlotName15,rchSlotName16,rchSlotName17,rchSlotName18,rchSlotName19,rchSlotName20,rchSlotName21,rchSlotName22,rchSlotName23,rchSlotName24,rchSlotName25,rchSlotName26,rchSlotName27,rchSlotName28,rchSlotName29,rchSlotName30,rchSlotName31,rchSlotName32,rchSlotName33,rchSlotName34,rchSlotName35,rchSlotName36,rchSlotName37,rchSlotName38,rchSlotName39,rchSlotName40,rchSlotName41,rchSlotName42,rchSlotName43,rchSlotName44,rchSlotName45,rchSlotName46,rchSlotName47,rchSlotName48,rchSlotName49,rchSlotName50,rchSlotName51,rchSlotName52,rchSlotName53,rchSlotName54,rchSlotName55,rchSlotName56,rchSlotName57,rchSlotName58,rchSlotName59,rchSlotName60,rchSlotName61,rchSlotName62,rchSlotName63,rchSlotName64,rchSlotName65,rchSlotName66,rchSlotName67,rchSlotName68,rchSlotName69,rchSlotName70,rchSlotName71,rchSlotName72,rchSlotName73,rchSlotName74,rchSlotName75,rchSlotName76,rchSlotName77,rchSlotName78,rchSlotName79,rchSlotName80,rchSlotName81,rchSlotName82,rchSlotName83,rchSlotName84,rchSlotName85,rchSlotName86,rchSlotName87,rchSlotName88,rchSlotName89,rchSlotName90,rchSlotName91,rchSlotName92,rchSlotName93,rchSlotName94,rchSlotName95,rchSlotName96,rchSlotName97,rchSlotName98,rchSlotName99,rchSlotName100,rchSlotName101,rchSlotName102,rchSlotName103,rchSlotName104,rchSlotName105,rchSlotName106,rchSlotName107,rchSlotName108,rchSlotName109,rchSlotName110,rchSlotName111,rchSlotName112,rchSlotName113,rchSlotName114,rchSlotName115,rchSlotName116,rchSlotName117,rchSlotName118,rchSlotName119,rchSlotName120,rchSlotName121,rchSlotName122,rchSlotName123,rchSlotName124,rchSlotName125,rchSlotName126,rchSlotName127; + public string rchSlotName + { + get + { + return new string(new char[] { + (char)rchSlotName0, + (char)rchSlotName1, + (char)rchSlotName2, + (char)rchSlotName3, + (char)rchSlotName4, + (char)rchSlotName5, + (char)rchSlotName6, + (char)rchSlotName7, + (char)rchSlotName8, + (char)rchSlotName9, + (char)rchSlotName10, + (char)rchSlotName11, + (char)rchSlotName12, + (char)rchSlotName13, + (char)rchSlotName14, + (char)rchSlotName15, + (char)rchSlotName16, + (char)rchSlotName17, + (char)rchSlotName18, + (char)rchSlotName19, + (char)rchSlotName20, + (char)rchSlotName21, + (char)rchSlotName22, + (char)rchSlotName23, + (char)rchSlotName24, + (char)rchSlotName25, + (char)rchSlotName26, + (char)rchSlotName27, + (char)rchSlotName28, + (char)rchSlotName29, + (char)rchSlotName30, + (char)rchSlotName31, + (char)rchSlotName32, + (char)rchSlotName33, + (char)rchSlotName34, + (char)rchSlotName35, + (char)rchSlotName36, + (char)rchSlotName37, + (char)rchSlotName38, + (char)rchSlotName39, + (char)rchSlotName40, + (char)rchSlotName41, + (char)rchSlotName42, + (char)rchSlotName43, + (char)rchSlotName44, + (char)rchSlotName45, + (char)rchSlotName46, + (char)rchSlotName47, + (char)rchSlotName48, + (char)rchSlotName49, + (char)rchSlotName50, + (char)rchSlotName51, + (char)rchSlotName52, + (char)rchSlotName53, + (char)rchSlotName54, + (char)rchSlotName55, + (char)rchSlotName56, + (char)rchSlotName57, + (char)rchSlotName58, + (char)rchSlotName59, + (char)rchSlotName60, + (char)rchSlotName61, + (char)rchSlotName62, + (char)rchSlotName63, + (char)rchSlotName64, + (char)rchSlotName65, + (char)rchSlotName66, + (char)rchSlotName67, + (char)rchSlotName68, + (char)rchSlotName69, + (char)rchSlotName70, + (char)rchSlotName71, + (char)rchSlotName72, + (char)rchSlotName73, + (char)rchSlotName74, + (char)rchSlotName75, + (char)rchSlotName76, + (char)rchSlotName77, + (char)rchSlotName78, + (char)rchSlotName79, + (char)rchSlotName80, + (char)rchSlotName81, + (char)rchSlotName82, + (char)rchSlotName83, + (char)rchSlotName84, + (char)rchSlotName85, + (char)rchSlotName86, + (char)rchSlotName87, + (char)rchSlotName88, + (char)rchSlotName89, + (char)rchSlotName90, + (char)rchSlotName91, + (char)rchSlotName92, + (char)rchSlotName93, + (char)rchSlotName94, + (char)rchSlotName95, + (char)rchSlotName96, + (char)rchSlotName97, + (char)rchSlotName98, + (char)rchSlotName99, + (char)rchSlotName100, + (char)rchSlotName101, + (char)rchSlotName102, + (char)rchSlotName103, + (char)rchSlotName104, + (char)rchSlotName105, + (char)rchSlotName106, + (char)rchSlotName107, + (char)rchSlotName108, + (char)rchSlotName109, + (char)rchSlotName110, + (char)rchSlotName111, + (char)rchSlotName112, + (char)rchSlotName113, + (char)rchSlotName114, + (char)rchSlotName115, + (char)rchSlotName116, + (char)rchSlotName117, + (char)rchSlotName118, + (char)rchSlotName119, + (char)rchSlotName120, + (char)rchSlotName121, + (char)rchSlotName122, + (char)rchSlotName123, + (char)rchSlotName124, + (char)rchSlotName125, + (char)rchSlotName126, + (char)rchSlotName127 + }).TrimEnd('\0'); + } + } +} [StructLayout(LayoutKind.Sequential)] public struct VRActiveActionSet_t { public ulong ulActionSet; @@ -5783,6 +6587,7 @@ public string rchRenderModelComponentName public IntPtr m_pVRInput; // class vr::IVRInput * public IntPtr m_pVRIOBuffer; // class vr::IVRIOBuffer * public IntPtr m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors * + public IntPtr m_pVRDebug; // class vr::IVRDebug * public IntPtr m_pVRNotifications; // class vr::IVRNotifications * } @@ -5816,7 +6621,22 @@ public static bool IsRuntimeInstalled() public static string RuntimePath() { - return OpenVRInterop.RuntimePath(); + try + { + uint pathSize = 512; + uint requiredPathSize = 512; + System.Text.StringBuilder path = new System.Text.StringBuilder((int)pathSize); + bool success = OpenVRInterop.GetRuntimePath(path, pathSize, ref requiredPathSize); + if (success == false) + { + return null; + } + + return path.ToString(); + } catch + { + return OpenVRInterop.RuntimePath(); //this api is deprecated but here to support older unity versions + } } public static string GetStringForHmdError(EVRInitError error) @@ -5853,6 +6673,7 @@ public static uint GetInitToken() 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; @@ -5879,21 +6700,21 @@ public static uint GetInitToken() public const ulong k_ulOverlayHandleInvalid = 0; public const uint k_unMaxDistortionFunctionParameters = 8; public const uint k_unScreenshotHandleInvalid = 0; - public const string IVRSystem_Version = "IVRSystem_019"; + public const string IVRSystem_Version = "IVRSystem_021"; public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; - public const string IVRTrackedCamera_Version = "IVRTrackedCamera_005"; + public const string IVRTrackedCamera_Version = "IVRTrackedCamera_006"; public const uint k_unMaxApplicationKeyLength = 128; public const string k_pch_MimeType_HomeApp = "vr/home"; public const string k_pch_MimeType_GameTheater = "vr/game_theater"; - public const string IVRApplications_Version = "IVRApplications_006"; + 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_019"; + 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"; @@ -5903,7 +6724,7 @@ public static uint GetInitToken() 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"; @@ -5921,21 +6742,28 @@ public static uint GetInitToken() public const string k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; public const string k_pch_SteamVR_GridColor_String = "gridColor"; public const string k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + public const string k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; public const string k_pch_SteamVR_ShowStage_Bool = "showStage"; public const string k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; public const string k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; public const string k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; - public const string k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; + public const string k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement"; + public const string k_pch_SteamVR_ShowBaseStationPowerManagementTip_Int32 = "ShowBaseStationPowerManagementTip"; public const string k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; public const string k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; public const string k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; public const string k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; public const string k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; + public const string k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; public const string k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; public const string k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; - public const string k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + public const string k_pch_SteamVR_ShowLegacyMirrorView_Bool = "showLegacyMirrorView"; + public const string k_pch_SteamVR_MirrorViewVisibility_Bool = "showMirrorView"; + public const string k_pch_SteamVR_MirrorViewDisplayMode_Int32 = "mirrorViewDisplayMode"; + 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"; @@ -5950,15 +6778,20 @@ public static uint GetInitToken() 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_InputBindingUIBlock = "inputBindingUI"; + public const string k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; public const string k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; public const string k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; public const string k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; public const string k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; public const string k_pch_SteamVR_LastVersionNotice = "lastVersionNotice"; public const string k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate"; + public const string k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR"; + public const string k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG"; + public const string k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB"; + public const string k_pch_SteamVR_CustomIconStyle_String = "customIconStyle"; + public const string k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle"; + public const string k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate"; public const string k_pch_DirectMode_Section = "direct_mode"; public const string k_pch_DirectMode_Enable_Bool = "enable"; public const string k_pch_DirectMode_Count_Int32 = "count"; @@ -5974,8 +6807,8 @@ public static uint GetInitToken() public const string k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; public const string k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; public const string k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; + public const string k_pch_Lighthouse_InactivityTimeoutForBaseStations_Int32 = "InactivityTimeoutForBaseStations"; public const string k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; - public const string k_pch_Lighthouse_NewPairing_Bool = "newPairing"; public const string k_pch_Null_Section = "driver_null"; public const string k_pch_Null_SerialNumber_String = "serialNumber"; public const string k_pch_Null_ModelNumber_String = "modelNumber"; @@ -6008,7 +6841,7 @@ public static uint GetInitToken() public const string k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; public const string k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; public const string k_pch_Perf_TestData_Float = "perfTestData"; - public const string k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling"; + public const string k_pch_Perf_GPUProfiling_Bool = "GPUProfiling"; public const string k_pch_CollisionBounds_Section = "collisionBounds"; public const string k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; public const string k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; @@ -6019,6 +6852,7 @@ public static uint GetInitToken() public const string k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; public const string k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; public const string k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + public const string k_pch_CollisionBounds_EnableDriverImport = "enableDriverBoundsImport"; public const string k_pch_Camera_Section = "camera"; public const string k_pch_Camera_EnableCamera_Bool = "enableCamera"; public const string k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; @@ -6031,11 +6865,19 @@ public static uint GetInitToken() public const string k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; public const string k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode"; public const string k_pch_audio_Section = "audio"; - public const string k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; - public const string k_pch_audio_OnRecordDevice_String = "onRecordDevice"; - public const string k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; - public const string k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; - public const string k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + public const string k_pch_audio_SetOsDefaultPlaybackDevice_Bool = "setOsDefaultPlaybackDevice"; + public const string k_pch_audio_EnablePlaybackDeviceOverride_Bool = "enablePlaybackDeviceOverride"; + public const string k_pch_audio_PlaybackDeviceOverride_String = "playbackDeviceOverride"; + public const string k_pch_audio_PlaybackDeviceOverrideName_String = "playbackDeviceOverrideName"; + public const string k_pch_audio_SetOsDefaultRecordingDevice_Bool = "setOsDefaultRecordingDevice"; + public const string k_pch_audio_EnableRecordingDeviceOverride_Bool = "enableRecordingDeviceOverride"; + public const string k_pch_audio_RecordingDeviceOverride_String = "recordingDeviceOverride"; + public const string k_pch_audio_RecordingDeviceOverrideName_String = "recordingDeviceOverrideName"; + public const string k_pch_audio_EnablePlaybackMirror_Bool = "enablePlaybackMirror"; + public const string k_pch_audio_PlaybackMirrorDevice_String = "playbackMirrorDevice"; + public const string k_pch_audio_PlaybackMirrorDeviceName_String = "playbackMirrorDeviceName"; + public const string k_pch_audio_OldPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + public const string k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId"; public const string k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; public const string k_pch_Power_Section = "power"; public const string k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; @@ -6047,21 +6889,22 @@ public static uint GetInitToken() public const string k_pch_Dashboard_Section = "dashboard"; public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; - public const string k_pch_Dashboard_UseWebDashboard = "useWebDashboard"; + public const string k_pch_Dashboard_UseWebKeyboard = "useWebKeyboard"; public const string k_pch_Dashboard_UseWebSettings = "useWebSettings"; - public const string k_pch_Dashboard_UseWebIPD = "useWebIPD"; - public const string k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu"; + 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"; public const string k_pch_WebInterface_Section = "WebInterface"; - public const string k_pch_WebInterface_WebEnable_Bool = "WebEnable"; - public const string k_pch_WebInterface_WebPort_String = "WebPort"; public const string k_pch_VRWebHelper_Section = "VRWebHelper"; public const string k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled"; public const string k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort"; public const string k_pch_TrackingOverride_Section = "TrackingOverrides"; public const string k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; public const string k_pch_App_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"; @@ -6069,6 +6912,11 @@ public static uint GetInitToken() public const string k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; public const string k_pch_LastKnown_HMDModel_String = "HMDModel"; public const string k_pch_DismissedWarnings_Section = "DismissedWarnings"; + public const string k_pch_Input_Section = "input"; + 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"; @@ -6076,11 +6924,12 @@ public static uint GetInitToken() public const uint k_unMaxActionSetNameLength = 64; public const uint k_unMaxActionOriginCount = 16; public const uint k_unMaxBoneNameLength = 32; - public const string IVRInput_Version = "IVRInput_005"; + public const string IVRInput_Version = "IVRInput_007"; public const ulong k_ulInvalidIOBufferHandle = 0; public const string IVRIOBuffer_Version = "IVRIOBuffer_002"; public const uint k_ulInvalidSpatialAnchorHandle = 0; public const string IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; + public const string IVRDebug_Version = "IVRDebug_001"; static uint VRToken { get; set; } @@ -6107,6 +6956,7 @@ public void Clear() m_pVRIOBuffer = null; m_pVRSpatialAnchors = null; m_pVRNotifications = null; + m_pVRDebug = null; } void CheckClear() @@ -6300,6 +7150,19 @@ public CVRSpatialAnchors VRSpatialAnchors() return m_pVRSpatialAnchors; } + public CVRDebug VRDebug() + { + CheckClear(); + if (m_pVRDebug == null) + { + var eError = EVRInitError.None; + var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix + IVRDebug_Version, ref eError); + if (pInterface != IntPtr.Zero && eError == EVRInitError.None) + m_pVRDebug = new CVRDebug(pInterface); + } + return m_pVRDebug; + } + public CVRNotifications VRNotifications() { CheckClear(); @@ -6328,6 +7191,7 @@ public CVRNotifications VRNotifications() private CVRIOBuffer m_pVRIOBuffer; private CVRSpatialAnchors m_pVRSpatialAnchors; private CVRNotifications m_pVRNotifications; + private CVRDebug m_pVRDebug; }; private static COpenVRContext _OpenVRInternal_ModuleContext = null; @@ -6356,6 +7220,8 @@ static COpenVRContext OpenVRInternal_ModuleContext public static CVRIOBuffer IOBuffer { get { return OpenVRInternal_ModuleContext.VRIOBuffer(); } } public static CVRSpatialAnchors SpatialAnchors { get { return OpenVRInternal_ModuleContext.VRSpatialAnchors(); } } public static CVRNotifications Notifications { get { return OpenVRInternal_ModuleContext.VRNotifications(); } } + public static CVRDebug Debug { get { return OpenVRInternal_ModuleContext.VRDebug(); } } + /** Finds the active installation of vrclient.dll and initializes it */ public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene, string pchStartupInfo= "") diff --git a/OpenVR/headers/openvr_api.json b/OpenVR/headers/openvr_api.json index 508e434..b481362 100644 --- a/OpenVR/headers/openvr_api.json +++ b/OpenVR/headers/openvr_api.json @@ -23,6 +23,7 @@ ,{"typedef": "vr::TextureID_t","type": "int32_t"} ,{"typedef": "vr::VRNotificationId","type": "uint32_t"} ,{"typedef": "vr::IOBufferHandle_t","type": "uint64_t"} +,{"typedef": "vr::VrProfilerEventHandle_t","type": "uint64_t"} ,{"typedef": "vr::HmdError","type": "enum vr::EVRInitError"} ,{"typedef": "vr::Hmd_Eye","type": "enum vr::EVREye"} ,{"typedef": "vr::ColorSpace","type": "enum vr::EColorSpace"} @@ -82,7 +83,8 @@ ,{"name": "TrackedControllerRole_RightHand","value": "2"} ,{"name": "TrackedControllerRole_OptOut","value": "3"} ,{"name": "TrackedControllerRole_Treadmill","value": "4"} - ,{"name": "TrackedControllerRole_Max","value": "4"} + ,{"name": "TrackedControllerRole_Stylus","value": "5"} + ,{"name": "TrackedControllerRole_Max","value": "5"} ]} , {"enumname": "vr::ETrackingUniverseOrigin","values": [ {"name": "TrackingUniverseSeated","value": "0"} @@ -144,6 +146,11 @@ ,{"name": "Prop_BootloaderVersion_Uint64","value": "1044"} ,{"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"} @@ -216,6 +223,22 @@ ,{"name": "Prop_CameraDistortionFunction_Int32_Array","value": "2072"} ,{"name": "Prop_CameraDistortionCoefficients_Float_Array","value": "2073"} ,{"name": "Prop_ExpectedControllerType_String","value": "2074"} + ,{"name": "Prop_HmdTrackingStyle_Int32","value": "2075"} + ,{"name": "Prop_DriverProvidedChaperoneVisibility_Bool","value": "2076"} + ,{"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"} + ,{"name": "Prop_IpdUIRangeMaxMeters_Float","value": "2101"} ,{"name": "Prop_DriverRequestedMuraCorrectionMode_Int32","value": "2200"} ,{"name": "Prop_DriverRequestedMuraFeather_InnerLeft_Int32","value": "2201"} ,{"name": "Prop_DriverRequestedMuraFeather_InnerRight_Int32","value": "2202"} @@ -225,6 +248,9 @@ ,{"name": "Prop_DriverRequestedMuraFeather_OuterRight_Int32","value": "2206"} ,{"name": "Prop_DriverRequestedMuraFeather_OuterTop_Int32","value": "2207"} ,{"name": "Prop_DriverRequestedMuraFeather_OuterBottom_Int32","value": "2208"} + ,{"name": "Prop_Audio_DefaultPlaybackDeviceId_String","value": "2300"} + ,{"name": "Prop_Audio_DefaultRecordingDeviceId_String","value": "2301"} + ,{"name": "Prop_Audio_DefaultPlaybackDeviceVolume_Float","value": "2302"} ,{"name": "Prop_AttachedDeviceId_String","value": "3000"} ,{"name": "Prop_SupportedButtons_Uint64","value": "3001"} ,{"name": "Prop_Axis0Type_Int32","value": "3002"} @@ -251,9 +277,11 @@ ,{"name": "Prop_NamedIconPathDeviceNotReady_String","value": "5006"} ,{"name": "Prop_NamedIconPathDeviceStandby_String","value": "5007"} ,{"name": "Prop_NamedIconPathDeviceAlertLow_String","value": "5008"} + ,{"name": "Prop_NamedIconPathDeviceStandbyAlert_String","value": "5009"} ,{"name": "Prop_DisplayHiddenArea_Binary_Start","value": "5100"} ,{"name": "Prop_DisplayHiddenArea_Binary_End","value": "5150"} ,{"name": "Prop_ParentContainer","value": "5151"} + ,{"name": "Prop_OverrideContainer_Uint64","value": "5152"} ,{"name": "Prop_UserConfigPath_String","value": "6000"} ,{"name": "Prop_InstallPath_String","value": "6001"} ,{"name": "Prop_HasDisplayComponent_Bool","value": "6002"} @@ -263,7 +291,6 @@ ,{"name": "Prop_HasVirtualDisplayComponent_Bool","value": "6006"} ,{"name": "Prop_HasSpatialAnchorsSupport_Bool","value": "6007"} ,{"name": "Prop_ControllerType_String","value": "7000"} - ,{"name": "Prop_LegacyInputProfile_String","value": "7001"} ,{"name": "Prop_ControllerHandSelectionPriority_Int32","value": "7002"} ,{"name": "Prop_VendorSpecific_Reserved_Start","value": "10000"} ,{"name": "Prop_VendorSpecific_Reserved_End","value": "10999"} @@ -284,6 +311,14 @@ ,{"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"} + ,{"name": "HmdTrackingStyle_Lighthouse","value": "1"} + ,{"name": "HmdTrackingStyle_OutsideInCameras","value": "2"} + ,{"name": "HmdTrackingStyle_InsideOutCameras","value": "3"} ]} , {"enumname": "vr::EVRSubmitFlags","values": [ {"name": "Submit_Default","value": "0"} @@ -344,16 +379,14 @@ ,{"name": "VREvent_ScrollSmooth","value": "309"} ,{"name": "VREvent_InputFocusCaptured","value": "400"} ,{"name": "VREvent_InputFocusReleased","value": "401"} - ,{"name": "VREvent_SceneFocusLost","value": "402"} - ,{"name": "VREvent_SceneFocusGained","value": "403"} ,{"name": "VREvent_SceneApplicationChanged","value": "404"} ,{"name": "VREvent_SceneFocusChanged","value": "405"} ,{"name": "VREvent_InputFocusChanged","value": "406"} - ,{"name": "VREvent_SceneApplicationSecondaryRenderingStarted","value": "407"} ,{"name": "VREvent_SceneApplicationUsingWrongGraphicsAdapter","value": "408"} ,{"name": "VREvent_ActionBindingReloaded","value": "409"} ,{"name": "VREvent_HideRenderModels","value": "410"} ,{"name": "VREvent_ShowRenderModels","value": "411"} + ,{"name": "VREvent_SceneApplicationStateChanged","value": "412"} ,{"name": "VREvent_ConsoleOpened","value": "420"} ,{"name": "VREvent_ConsoleClosed","value": "421"} ,{"name": "VREvent_OverlayShown","value": "500"} @@ -389,7 +422,6 @@ ,{"name": "VREvent_Notification_Destroyed","value": "603"} ,{"name": "VREvent_Quit","value": "700"} ,{"name": "VREvent_ProcessQuit","value": "701"} - ,{"name": "VREvent_QuitAborted_UserPrompt","value": "702"} ,{"name": "VREvent_QuitAcknowledged","value": "703"} ,{"name": "VREvent_DriverRequestedQuit","value": "704"} ,{"name": "VREvent_RestartRequested","value": "705"} @@ -399,6 +431,8 @@ ,{"name": "VREvent_ChaperoneSettingsHaveChanged","value": "803"} ,{"name": "VREvent_SeatedZeroPoseReset","value": "804"} ,{"name": "VREvent_ChaperoneFlushCache","value": "805"} + ,{"name": "VREvent_ChaperoneRoomSetupStarting","value": "806"} + ,{"name": "VREvent_ChaperoneRoomSetupFinished","value": "807"} ,{"name": "VREvent_AudioSettingsHaveChanged","value": "820"} ,{"name": "VREvent_BackgroundSettingHasChanged","value": "850"} ,{"name": "VREvent_CameraSettingsHaveChanged","value": "851"} @@ -419,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"} @@ -427,16 +462,10 @@ ,{"name": "VREvent_KeyboardClosed","value": "1200"} ,{"name": "VREvent_KeyboardCharInput","value": "1201"} ,{"name": "VREvent_KeyboardDone","value": "1202"} - ,{"name": "VREvent_ApplicationTransitionStarted","value": "1300"} - ,{"name": "VREvent_ApplicationTransitionAborted","value": "1301"} - ,{"name": "VREvent_ApplicationTransitionNewAppStarted","value": "1302"} ,{"name": "VREvent_ApplicationListUpdated","value": "1303"} ,{"name": "VREvent_ApplicationMimeTypeLoad","value": "1304"} - ,{"name": "VREvent_ApplicationTransitionNewAppLaunchComplete","value": "1305"} ,{"name": "VREvent_ProcessConnected","value": "1306"} ,{"name": "VREvent_ProcessDisconnected","value": "1307"} - ,{"name": "VREvent_Compositor_MirrorWindowShown","value": "1400"} - ,{"name": "VREvent_Compositor_MirrorWindowHidden","value": "1401"} ,{"name": "VREvent_Compositor_ChaperoneBoundsShown","value": "1410"} ,{"name": "VREvent_Compositor_ChaperoneBoundsHidden","value": "1411"} ,{"name": "VREvent_Compositor_DisplayDisconnected","value": "1412"} @@ -444,6 +473,9 @@ ,{"name": "VREvent_Compositor_HDCPError","value": "1414"} ,{"name": "VREvent_Compositor_ApplicationNotResponding","value": "1415"} ,{"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"} @@ -462,11 +494,14 @@ ,{"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"} ,{"name": "VREvent_SpatialAnchors_RequestDescriptorUpdate","value": "1803"} ,{"name": "VREvent_SystemReport_Started","value": "1900"} + ,{"name": "VREvent_Monitor_ShowHeadsetView","value": "2000"} + ,{"name": "VREvent_Monitor_HideHeadsetView","value": "2001"} ,{"name": "VREvent_VendorSpecific_Reserved_Start","value": "10000"} ,{"name": "VREvent_VendorSpecific_Reserved_End","value": "19999"} ]} @@ -476,6 +511,7 @@ ,{"name": "k_EDeviceActivityLevel_UserInteraction","value": "1"} ,{"name": "k_EDeviceActivityLevel_UserInteraction_Timeout","value": "2"} ,{"name": "k_EDeviceActivityLevel_Standby","value": "3"} + ,{"name": "k_EDeviceActivityLevel_Idle_Timeout","value": "4"} ]} , {"enumname": "vr::EVRButtonId","values": [ {"name": "k_EButton_System","value": "0"} @@ -495,9 +531,9 @@ ,{"name": "k_EButton_SteamVR_Touchpad","value": "32"} ,{"name": "k_EButton_SteamVR_Trigger","value": "33"} ,{"name": "k_EButton_Dashboard_Back","value": "2"} - ,{"name": "k_EButton_Knuckles_A","value": "2"} - ,{"name": "k_EButton_Knuckles_B","value": "1"} - ,{"name": "k_EButton_Knuckles_JoyStick","value": "35"} + ,{"name": "k_EButton_IndexController_A","value": "2"} + ,{"name": "k_EButton_IndexController_B","value": "1"} + ,{"name": "k_EButton_IndexController_JoyStick","value": "35"} ,{"name": "k_EButton_Max","value": "64"} ]} , {"enumname": "vr::EVRMouseButton","values": [ @@ -512,9 +548,10 @@ , {"enumname": "vr::EShowUIType","values": [ {"name": "ShowUI_ControllerBinding","value": "0"} ,{"name": "ShowUI_ManageTrackers","value": "1"} - ,{"name": "ShowUI_QuickStart","value": "2"} ,{"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"} @@ -691,6 +728,9 @@ ,{"name": "VRInitError_Init_VRWebHelperStartupFailed","value": "141"} ,{"name": "VRInitError_Init_TrackerManagerInitFailed","value": "142"} ,{"name": "VRInitError_Init_AlreadyRunning","value": "143"} + ,{"name": "VRInitError_Init_FailedForVrMonitor","value": "144"} + ,{"name": "VRInitError_Init_PropertyManagerInitFailed","value": "145"} + ,{"name": "VRInitError_Init_WebServerFailed","value": "146"} ,{"name": "VRInitError_Driver_Failed","value": "200"} ,{"name": "VRInitError_Driver_Unknown","value": "201"} ,{"name": "VRInitError_Driver_HmdUnknown","value": "202"} @@ -703,6 +743,7 @@ ,{"name": "VRInitError_Driver_TrackedDeviceInterfaceUnknown","value": "209"} ,{"name": "VRInitError_Driver_HmdDriverIdOutOfBounds","value": "211"} ,{"name": "VRInitError_Driver_HmdDisplayMirrored","value": "212"} + ,{"name": "VRInitError_Driver_HmdDisplayNotFoundLaptop","value": "213"} ,{"name": "VRInitError_IPC_ServerInitFailed","value": "300"} ,{"name": "VRInitError_IPC_ConnectFailed","value": "301"} ,{"name": "VRInitError_IPC_SharedStateInitFailed","value": "302"} @@ -712,6 +753,8 @@ ,{"name": "VRInitError_IPC_CompositorConnectFailed","value": "306"} ,{"name": "VRInitError_IPC_CompositorInvalidConnectResponse","value": "307"} ,{"name": "VRInitError_IPC_ConnectFailedAfterMultipleAttempts","value": "308"} + ,{"name": "VRInitError_IPC_ConnectFailedAfterTargetExited","value": "309"} + ,{"name": "VRInitError_IPC_NamespaceUnavailable","value": "310"} ,{"name": "VRInitError_Compositor_Failed","value": "400"} ,{"name": "VRInitError_Compositor_D3D11HardwareRequired","value": "401"} ,{"name": "VRInitError_Compositor_FirmwareRequiresUpdate","value": "402"} @@ -797,6 +840,9 @@ ,{"name": "VRInitError_Compositor_CreateTextIndexBuffer","value": "482"} ,{"name": "VRInitError_Compositor_CreateMirrorTextures","value": "483"} ,{"name": "VRInitError_Compositor_CreateLastFrameRenderTexture","value": "484"} + ,{"name": "VRInitError_Compositor_CreateMirrorOverlay","value": "485"} + ,{"name": "VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer","value": "486"} + ,{"name": "VRInitError_Compositor_DisplayModeNotSupported","value": "487"} ,{"name": "VRInitError_VendorSpecific_UnableToConnectToOculusRuntime","value": "1000"} ,{"name": "VRInitError_VendorSpecific_WindowsNotInDevMode","value": "1001"} ,{"name": "VRInitError_VendorSpecific_HmdFound_CantOpenDevice","value": "1101"} @@ -812,6 +858,7 @@ ,{"name": "VRInitError_VendorSpecific_HmdFound_UserDataAddressRange","value": "1111"} ,{"name": "VRInitError_VendorSpecific_HmdFound_UserDataError","value": "1112"} ,{"name": "VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck","value": "1113"} + ,{"name": "VRInitError_VendorSpecific_OculusRuntimeBadInstall","value": "1114"} ,{"name": "VRInitError_Steam_SteamInstallationNotFound","value": "2000"} ,{"name": "VRInitError_LastError","value": "2001"} ]} @@ -921,13 +968,15 @@ ,{"name": "VRApplicationProperty_IsInstanced_Bool","value": "62"} ,{"name": "VRApplicationProperty_IsInternal_Bool","value": "63"} ,{"name": "VRApplicationProperty_WantsCompositorPauseInStandby_Bool","value": "64"} + ,{"name": "VRApplicationProperty_IsHidden_Bool","value": "65"} ,{"name": "VRApplicationProperty_LastLaunchTime_Uint64","value": "70"} ]} -, {"enumname": "vr::EVRApplicationTransitionState","values": [ - {"name": "VRApplicationTransition_None","value": "0"} - ,{"name": "VRApplicationTransition_OldAppQuitSent","value": "10"} - ,{"name": "VRApplicationTransition_WaitingForExternalLaunch","value": "11"} - ,{"name": "VRApplicationTransition_NewAppLaunched","value": "20"} +, {"enumname": "vr::EVRSceneApplicationState","values": [ + {"name": "EVRSceneApplicationState_None","value": "0"} + ,{"name": "EVRSceneApplicationState_Starting","value": "1"} + ,{"name": "EVRSceneApplicationState_Quitting","value": "2"} + ,{"name": "EVRSceneApplicationState_Running","value": "3"} + ,{"name": "EVRSceneApplicationState_Waiting","value": "4"} ]} , {"enumname": "vr::ChaperoneCalibrationState","values": [ {"name": "ChaperoneCalibrationState_OK","value": "1"} @@ -961,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"} @@ -973,30 +1023,31 @@ ,{"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_None","value": "0"} - ,{"name": "VROverlayFlags_Curved","value": "1"} - ,{"name": "VROverlayFlags_RGSS4X","value": "2"} - ,{"name": "VROverlayFlags_NoDashboardTab","value": "3"} - ,{"name": "VROverlayFlags_AcceptsGamepadEvents","value": "4"} - ,{"name": "VROverlayFlags_ShowGamepadFocus","value": "5"} - ,{"name": "VROverlayFlags_SendVRDiscreteScrollEvents","value": "6"} - ,{"name": "VROverlayFlags_SendVRTouchpadEvents","value": "7"} - ,{"name": "VROverlayFlags_ShowTouchPadScrollWheel","value": "8"} - ,{"name": "VROverlayFlags_TransferOwnershipToInternalProcess","value": "9"} - ,{"name": "VROverlayFlags_SideBySide_Parallel","value": "10"} - ,{"name": "VROverlayFlags_SideBySide_Crossed","value": "11"} - ,{"name": "VROverlayFlags_Panorama","value": "12"} - ,{"name": "VROverlayFlags_StereoPanorama","value": "13"} - ,{"name": "VROverlayFlags_SortWithNonSceneOverlays","value": "14"} - ,{"name": "VROverlayFlags_VisibleInDashboard","value": "15"} - ,{"name": "VROverlayFlags_MakeOverlaysInteractiveIfVisible","value": "16"} - ,{"name": "VROverlayFlags_SendVRSmoothScrollEvents","value": "17"} + {"name": "VROverlayFlags_NoDashboardTab","value": "8"} + ,{"name": "VROverlayFlags_SendVRDiscreteScrollEvents","value": "64"} + ,{"name": "VROverlayFlags_SendVRTouchpadEvents","value": "128"} + ,{"name": "VROverlayFlags_ShowTouchPadScrollWheel","value": "256"} + ,{"name": "VROverlayFlags_TransferOwnershipToInternalProcess","value": "512"} + ,{"name": "VROverlayFlags_SideBySide_Parallel","value": "1024"} + ,{"name": "VROverlayFlags_SideBySide_Crossed","value": "2048"} + ,{"name": "VROverlayFlags_Panorama","value": "4096"} + ,{"name": "VROverlayFlags_StereoPanorama","value": "8192"} + ,{"name": "VROverlayFlags_SortWithNonSceneOverlays","value": "16384"} + ,{"name": "VROverlayFlags_VisibleInDashboard","value": "32768"} + ,{"name": "VROverlayFlags_MakeOverlaysInteractiveIfVisible","value": "65536"} + ,{"name": "VROverlayFlags_SendVRSmoothScrollEvents","value": "131072"} + ,{"name": "VROverlayFlags_ProtectedContent","value": "262144"} + ,{"name": "VROverlayFlags_HideLaserIntersection","value": "524288"} ]} , {"enumname": "vr::VRMessageOverlayResponse","values": [ {"name": "VRMessageOverlayResponse_ButtonPress_0","value": "0"} @@ -1016,13 +1067,6 @@ {"name": "k_EGamepadTextInputLineModeSingleLine","value": "0"} ,{"name": "k_EGamepadTextInputLineModeMultipleLines","value": "1"} ]} -, {"enumname": "vr::EOverlayDirection","values": [ - {"name": "OverlayDirection_Up","value": "0"} - ,{"name": "OverlayDirection_Down","value": "1"} - ,{"name": "OverlayDirection_Left","value": "2"} - ,{"name": "OverlayDirection_Right","value": "3"} - ,{"name": "OverlayDirection_Count","value": "4"} -]} , {"enumname": "vr::EVROverlayIntersectionMaskPrimitiveType","values": [ {"name": "OverlayIntersectionPrimitiveType_Rectangle","value": "0"} ,{"name": "OverlayIntersectionPrimitiveType_Circle","value": "1"} @@ -1102,6 +1146,10 @@ ,{"name": "VRFingerSplay_Ring_Pinky","value": "3"} ,{"name": "VRFingerSplay_Count","value": "4"} ]} +, {"enumname": "vr::EVRSummaryType","values": [ + {"name": "VRSummaryType_FromAnimation","value": "0"} + ,{"name": "VRSummaryType_FromDevice","value": "1"} +]} , {"enumname": "vr::EVRInputFilterCancelType","values": [ {"name": "VRInputFilterCancel_Timers","value": "0"} ,{"name": "VRInputFilterCancel_Momentum","value": "1"} @@ -1126,6 +1174,10 @@ ,{"name": "IOBufferMode_Write","value": "2"} ,{"name": "IOBufferMode_Create","value": "512"} ]} +, {"enumname": "vr::EVRDebugError","values": [ + {"name": "VRDebugError_Success","value": "0"} + ,{"name": "VRDebugError_BadParameter","value": "1"} +]} ], "consts":[{ "constname": "k_nDriverNone","consttype": "const uint32_t", "constval": "4294967295"} @@ -1155,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"} ,{ @@ -1208,11 +1262,11 @@ ,{ "constname": "k_unScreenshotHandleInvalid","consttype": "const uint32_t", "constval": "0"} ,{ - "constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_019"} + "constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_021"} ,{ "constname": "IVRExtendedDisplay_Version","consttype": "const char *const", "constval": "IVRExtendedDisplay_001"} ,{ - "constname": "IVRTrackedCamera_Version","consttype": "const char *const", "constval": "IVRTrackedCamera_005"} + "constname": "IVRTrackedCamera_Version","consttype": "const char *const", "constval": "IVRTrackedCamera_006"} ,{ "constname": "k_unMaxApplicationKeyLength","consttype": "const uint32_t", "constval": "128"} ,{ @@ -1220,23 +1274,23 @@ ,{ "constname": "k_pch_MimeType_GameTheater","consttype": "const char *const", "constval": "vr/game_theater"} ,{ - "constname": "IVRApplications_Version","consttype": "const char *const", "constval": "IVRApplications_006"} + "constname": "IVRApplications_Version","consttype": "const char *const", "constval": "IVRApplications_007"} ,{ "constname": "IVRChaperone_Version","consttype": "const char *const", "constval": "IVRChaperone_003"} ,{ "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_019"} + "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_022"} ,{ "constname": "k_pch_Controller_Component_GDC2015","consttype": "const char *const", "constval": "gdc2015"} ,{ @@ -1256,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"} ,{ @@ -1291,6 +1345,8 @@ "constname": "k_pch_SteamVR_GridColor_String","consttype": "const char *const", "constval": "gridColor"} ,{ "constname": "k_pch_SteamVR_PlayAreaColor_String","consttype": "const char *const", "constval": "playAreaColor"} +,{ + "constname": "k_pch_SteamVR_TrackingLossColor_String","consttype": "const char *const", "constval": "trackingLossColor"} ,{ "constname": "k_pch_SteamVR_ShowStage_Bool","consttype": "const char *const", "constval": "showStage"} ,{ @@ -1300,7 +1356,9 @@ ,{ "constname": "k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float","consttype": "const char *const", "constval": "speakersForwardYawOffsetDegrees"} ,{ - "constname": "k_pch_SteamVR_BaseStationPowerManagement_Bool","consttype": "const char *const", "constval": "basestationPowerManagement"} + "constname": "k_pch_SteamVR_BaseStationPowerManagement_Int32","consttype": "const char *const", "constval": "basestationPowerManagement"} +,{ + "constname": "k_pch_SteamVR_ShowBaseStationPowerManagementTip_Int32","consttype": "const char *const", "constval": "ShowBaseStationPowerManagementTip"} ,{ "constname": "k_pch_SteamVR_NeverKillProcesses_Bool","consttype": "const char *const", "constval": "neverKillProcesses"} ,{ @@ -1311,16 +1369,26 @@ "constname": "k_pch_SteamVR_MotionSmoothing_Bool","consttype": "const char *const", "constval": "motionSmoothing"} ,{ "constname": "k_pch_SteamVR_MotionSmoothingOverride_Int32","consttype": "const char *const", "constval": "motionSmoothingOverride"} +,{ + "constname": "k_pch_SteamVR_DisableAsyncReprojection_Bool","consttype": "const char *const", "constval": "disableAsync"} ,{ "constname": "k_pch_SteamVR_ForceFadeOnBadTracking_Bool","consttype": "const char *const", "constval": "forceFadeOnBadTracking"} ,{ "constname": "k_pch_SteamVR_DefaultMirrorView_Int32","consttype": "const char *const", "constval": "mirrorView"} ,{ - "constname": "k_pch_SteamVR_ShowMirrorView_Bool","consttype": "const char *const", "constval": "showMirrorView"} + "constname": "k_pch_SteamVR_ShowLegacyMirrorView_Bool","consttype": "const char *const", "constval": "showLegacyMirrorView"} +,{ + "constname": "k_pch_SteamVR_MirrorViewVisibility_Bool","consttype": "const char *const", "constval": "showMirrorView"} +,{ + "constname": "k_pch_SteamVR_MirrorViewDisplayMode_Int32","consttype": "const char *const", "constval": "mirrorViewDisplayMode"} +,{ + "constname": "k_pch_SteamVR_MirrorViewEye_Int32","consttype": "const char *const", "constval": "mirrorViewEye"} ,{ "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"} ,{ @@ -1349,12 +1417,10 @@ "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"} ,{ - "constname": "k_pch_SteamVR_InputBindingUIBlock","consttype": "const char *const", "constval": "inputBindingUI"} + "constname": "k_pch_SteamVR_DoNotFadeToGrid","consttype": "const char *const", "constval": "doNotFadeToGrid"} ,{ "constname": "k_pch_SteamVR_RenderCameraMode","consttype": "const char *const", "constval": "renderCameraMode"} ,{ @@ -1367,6 +1433,18 @@ "constname": "k_pch_SteamVR_LastVersionNotice","consttype": "const char *const", "constval": "lastVersionNotice"} ,{ "constname": "k_pch_SteamVR_LastVersionNoticeDate","consttype": "const char *const", "constval": "lastVersionNoticeDate"} +,{ + "constname": "k_pch_SteamVR_HmdDisplayColorGainR_Float","consttype": "const char *const", "constval": "hmdDisplayColorGainR"} +,{ + "constname": "k_pch_SteamVR_HmdDisplayColorGainG_Float","consttype": "const char *const", "constval": "hmdDisplayColorGainG"} +,{ + "constname": "k_pch_SteamVR_HmdDisplayColorGainB_Float","consttype": "const char *const", "constval": "hmdDisplayColorGainB"} +,{ + "constname": "k_pch_SteamVR_CustomIconStyle_String","consttype": "const char *const", "constval": "customIconStyle"} +,{ + "constname": "k_pch_SteamVR_CustomOffIconStyle_String","consttype": "const char *const", "constval": "customOffIconStyle"} +,{ + "constname": "k_pch_SteamVR_CustomIconForceUpdate_String","consttype": "const char *const", "constval": "customIconForceUpdate"} ,{ "constname": "k_pch_DirectMode_Section","consttype": "const char *const", "constval": "direct_mode"} ,{ @@ -1398,9 +1476,9 @@ ,{ "constname": "k_pch_Lighthouse_PowerManagedBaseStations2_String","consttype": "const char *const", "constval": "PowerManagedBaseStations2"} ,{ - "constname": "k_pch_Lighthouse_EnableImuFallback_Bool","consttype": "const char *const", "constval": "enableImuFallback"} + "constname": "k_pch_Lighthouse_InactivityTimeoutForBaseStations_Int32","consttype": "const char *const", "constval": "InactivityTimeoutForBaseStations"} ,{ - "constname": "k_pch_Lighthouse_NewPairing_Bool","consttype": "const char *const", "constval": "newPairing"} + "constname": "k_pch_Lighthouse_EnableImuFallback_Bool","consttype": "const char *const", "constval": "enableImuFallback"} ,{ "constname": "k_pch_Null_Section","consttype": "const char *const", "constval": "driver_null"} ,{ @@ -1466,7 +1544,7 @@ ,{ "constname": "k_pch_Perf_TestData_Float","consttype": "const char *const", "constval": "perfTestData"} ,{ - "constname": "k_pch_Perf_LinuxGPUProfiling_Bool","consttype": "const char *const", "constval": "linuxGPUProfiling"} + "constname": "k_pch_Perf_GPUProfiling_Bool","consttype": "const char *const", "constval": "GPUProfiling"} ,{ "constname": "k_pch_CollisionBounds_Section","consttype": "const char *const", "constval": "collisionBounds"} ,{ @@ -1487,6 +1565,8 @@ "constname": "k_pch_CollisionBounds_ColorGammaB_Int32","consttype": "const char *const", "constval": "CollisionBoundsColorGammaB"} ,{ "constname": "k_pch_CollisionBounds_ColorGammaA_Int32","consttype": "const char *const", "constval": "CollisionBoundsColorGammaA"} +,{ + "constname": "k_pch_CollisionBounds_EnableDriverImport","consttype": "const char *const", "constval": "enableDriverBoundsImport"} ,{ "constname": "k_pch_Camera_Section","consttype": "const char *const", "constval": "camera"} ,{ @@ -1512,15 +1592,31 @@ ,{ "constname": "k_pch_audio_Section","consttype": "const char *const", "constval": "audio"} ,{ - "constname": "k_pch_audio_OnPlaybackDevice_String","consttype": "const char *const", "constval": "onPlaybackDevice"} + "constname": "k_pch_audio_SetOsDefaultPlaybackDevice_Bool","consttype": "const char *const", "constval": "setOsDefaultPlaybackDevice"} +,{ + "constname": "k_pch_audio_EnablePlaybackDeviceOverride_Bool","consttype": "const char *const", "constval": "enablePlaybackDeviceOverride"} +,{ + "constname": "k_pch_audio_PlaybackDeviceOverride_String","consttype": "const char *const", "constval": "playbackDeviceOverride"} +,{ + "constname": "k_pch_audio_PlaybackDeviceOverrideName_String","consttype": "const char *const", "constval": "playbackDeviceOverrideName"} +,{ + "constname": "k_pch_audio_SetOsDefaultRecordingDevice_Bool","consttype": "const char *const", "constval": "setOsDefaultRecordingDevice"} +,{ + "constname": "k_pch_audio_EnableRecordingDeviceOverride_Bool","consttype": "const char *const", "constval": "enableRecordingDeviceOverride"} ,{ - "constname": "k_pch_audio_OnRecordDevice_String","consttype": "const char *const", "constval": "onRecordDevice"} + "constname": "k_pch_audio_RecordingDeviceOverride_String","consttype": "const char *const", "constval": "recordingDeviceOverride"} ,{ - "constname": "k_pch_audio_OnPlaybackMirrorDevice_String","consttype": "const char *const", "constval": "onPlaybackMirrorDevice"} + "constname": "k_pch_audio_RecordingDeviceOverrideName_String","consttype": "const char *const", "constval": "recordingDeviceOverrideName"} ,{ - "constname": "k_pch_audio_OffPlaybackDevice_String","consttype": "const char *const", "constval": "offPlaybackDevice"} + "constname": "k_pch_audio_EnablePlaybackMirror_Bool","consttype": "const char *const", "constval": "enablePlaybackMirror"} ,{ - "constname": "k_pch_audio_OffRecordDevice_String","consttype": "const char *const", "constval": "offRecordDevice"} + "constname": "k_pch_audio_PlaybackMirrorDevice_String","consttype": "const char *const", "constval": "playbackMirrorDevice"} +,{ + "constname": "k_pch_audio_PlaybackMirrorDeviceName_String","consttype": "const char *const", "constval": "playbackMirrorDeviceName"} +,{ + "constname": "k_pch_audio_OldPlaybackMirrorDevice_String","consttype": "const char *const", "constval": "onPlaybackMirrorDevice"} +,{ + "constname": "k_pch_audio_LastHmdPlaybackDeviceId_String","consttype": "const char *const", "constval": "lastHmdPlaybackDeviceId"} ,{ "constname": "k_pch_audio_VIVEHDMIGain","consttype": "const char *const", "constval": "viveHDMIGain"} ,{ @@ -1544,23 +1640,23 @@ ,{ "constname": "k_pch_Dashboard_ArcadeMode_Bool","consttype": "const char *const", "constval": "arcadeMode"} ,{ - "constname": "k_pch_Dashboard_UseWebDashboard","consttype": "const char *const", "constval": "useWebDashboard"} + "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_UseWebIPD","consttype": "const char *const", "constval": "useWebIPD"} + "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_UseWebPowerMenu","consttype": "const char *const", "constval": "useWebPowerMenu"} + "constname": "k_pch_Dashboard_DashboardScale","consttype": "const char *const", "constval": "dashboardScale"} ,{ "constname": "k_pch_modelskin_Section","consttype": "const char *const", "constval": "modelskins"} ,{ "constname": "k_pch_Driver_Enable_Bool","consttype": "const char *const", "constval": "enable"} ,{ - "constname": "k_pch_WebInterface_Section","consttype": "const char *const", "constval": "WebInterface"} -,{ - "constname": "k_pch_WebInterface_WebEnable_Bool","consttype": "const char *const", "constval": "WebEnable"} + "constname": "k_pch_Driver_LoadPriority_Int32","consttype": "const char *const", "constval": "loadPriority"} ,{ - "constname": "k_pch_WebInterface_WebPort_String","consttype": "const char *const", "constval": "WebPort"} + "constname": "k_pch_WebInterface_Section","consttype": "const char *const", "constval": "WebInterface"} ,{ "constname": "k_pch_VRWebHelper_Section","consttype": "const char *const", "constval": "VRWebHelper"} ,{ @@ -1573,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"} ,{ @@ -1587,6 +1685,16 @@ "constname": "k_pch_LastKnown_HMDModel_String","consttype": "const char *const", "constval": "HMDModel"} ,{ "constname": "k_pch_DismissedWarnings_Section","consttype": "const char *const", "constval": "DismissedWarnings"} +,{ + "constname": "k_pch_Input_Section","consttype": "const char *const", "constval": "input"} +,{ + "constname": "k_pch_Input_LeftThumbstickRotation_Float","consttype": "const char *const", "constval": "leftThumbstickRotation"} +,{ + "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"} ,{ @@ -1602,7 +1710,7 @@ ,{ "constname": "k_unMaxBoneNameLength","consttype": "const uint32_t", "constval": "32"} ,{ - "constname": "IVRInput_Version","consttype": "const char *const", "constval": "IVRInput_005"} + "constname": "IVRInput_Version","consttype": "const char *const", "constval": "IVRInput_007"} ,{ "constname": "k_ulInvalidIOBufferHandle","consttype": "const uint64_t", "constval": "0"} ,{ @@ -1611,6 +1719,8 @@ "constname": "k_ulInvalidSpatialAnchorHandle","consttype": "const SpatialAnchorHandle_t", "constval": "0"} ,{ "constname": "IVRSpatialAnchors_Version","consttype": "const char *const", "constval": "IVRSpatialAnchors_001"} +,{ + "constname": "IVRDebug_Version","consttype": "const char *const", "constval": "IVRDebug_001"} ], "structs":[{"struct": "vr::HmdMatrix34_t","fields": [ { "fieldname": "m", "fieldtype": "float [3][4]"}]} @@ -1867,22 +1977,8 @@ { "fieldname": "nHeight", "fieldtype": "uint32_t"}, { "fieldname": "nBytesPerPixel", "fieldtype": "uint32_t"}, { "fieldname": "nFrameSequence", "fieldtype": "uint32_t"}, -{ "fieldname": "standingTrackedDevicePose", "fieldtype": "struct vr::TrackedDevicePose_t"}, +{ "fieldname": "trackedDevicePose", "fieldtype": "struct vr::TrackedDevicePose_t"}, { "fieldname": "ulFrameExposureTime", "fieldtype": "uint64_t"}]} -,{"struct": "vr::DriverDirectMode_FrameTiming","fields": [ -{ "fieldname": "m_nSize", "fieldtype": "uint32_t"}, -{ "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"}, -{ "fieldname": "m_nNumMisPresented", "fieldtype": "uint32_t"}, -{ "fieldname": "m_nNumDroppedFrames", "fieldtype": "uint32_t"}, -{ "fieldname": "m_nReprojectionFlags", "fieldtype": "uint32_t"}]} -,{"struct": "vr::ImuSample_t","fields": [ -{ "fieldname": "fSampleTime", "fieldtype": "double"}, -{ "fieldname": "vAccel", "fieldtype": "struct vr::HmdVector3d_t"}, -{ "fieldname": "vGyro", "fieldtype": "struct vr::HmdVector3d_t"}, -{ "fieldname": "unOffScaleFlags", "fieldtype": "uint32_t"}]} -,{"struct": "vr::AppOverrideKeys_t","fields": [ -{ "fieldname": "pchKey", "fieldtype": "const char *"}, -{ "fieldname": "pchValue", "fieldtype": "const char *"}]} ,{"struct": "vr::Compositor_FrameTiming","fields": [ { "fieldname": "m_nSize", "fieldtype": "uint32_t"}, { "fieldname": "m_nFrameIndex", "fieldtype": "uint32_t"}, @@ -1910,6 +2006,20 @@ { "fieldname": "m_HmdPose", "fieldtype": "vr::TrackedDevicePose_t"}, { "fieldname": "m_nNumVSyncsReadyForUse", "fieldtype": "uint32_t"}, { "fieldname": "m_nNumVSyncsToFirstView", "fieldtype": "uint32_t"}]} +,{"struct": "vr::DriverDirectMode_FrameTiming","fields": [ +{ "fieldname": "m_nSize", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nNumMisPresented", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nNumDroppedFrames", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nReprojectionFlags", "fieldtype": "uint32_t"}]} +,{"struct": "vr::ImuSample_t","fields": [ +{ "fieldname": "fSampleTime", "fieldtype": "double"}, +{ "fieldname": "vAccel", "fieldtype": "struct vr::HmdVector3d_t"}, +{ "fieldname": "vGyro", "fieldtype": "struct vr::HmdVector3d_t"}, +{ "fieldname": "unOffScaleFlags", "fieldtype": "uint32_t"}]} +,{"struct": "vr::AppOverrideKeys_t","fields": [ +{ "fieldname": "pchKey", "fieldtype": "const char *"}, +{ "fieldname": "pchValue", "fieldtype": "const char *"}]} ,{"struct": "vr::Compositor_CumulativeStats","fields": [ { "fieldname": "m_nPid", "fieldtype": "uint32_t"}, { "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"}, @@ -1926,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"}, @@ -2004,6 +2123,11 @@ { "fieldname": "devicePath", "fieldtype": "VRInputValueHandle_t"}, { "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"}, { "fieldname": "rchRenderModelComponentName", "fieldtype": "char [128]"}]} +,{"struct": "vr::InputBindingInfo_t","fields": [ +{ "fieldname": "rchDevicePathName", "fieldtype": "char [128]"}, +{ "fieldname": "rchInputPathName", "fieldtype": "char [128]"}, +{ "fieldname": "rchModeName", "fieldtype": "char [128]"}, +{ "fieldname": "rchSlotName", "fieldtype": "char [128]"}]} ,{"struct": "vr::VRActiveActionSet_t","fields": [ { "fieldname": "ulActionSet", "fieldtype": "VRActionSetHandle_t"}, { "fieldname": "ulRestrictedToDevice", "fieldtype": "VRInputValueHandle_t"}, @@ -2032,6 +2156,7 @@ { "fieldname": "m_pVRInput", "fieldtype": "class vr::IVRInput *"}, { "fieldname": "m_pVRIOBuffer", "fieldtype": "class vr::IVRIOBuffer *"}, { "fieldname": "m_pVRSpatialAnchors", "fieldtype": "class vr::IVRSpatialAnchors *"}, +{ "fieldname": "m_pVRDebug", "fieldtype": "class vr::IVRDebug *"}, { "fieldname": "m_pVRNotifications", "fieldtype": "class vr::IVRNotifications *"}]} ], "methods":[{ @@ -2404,17 +2529,6 @@ "methodname": "ShouldApplicationReduceRenderingWork", "returntype": "bool" } -,{ - "classname": "vr::IVRSystem", - "methodname": "DriverDebugRequest", - "returntype": "uint32_t", - "params": [ -{ "paramname": "unDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"}, -{ "paramname": "pchRequest" ,"paramtype": "const char *"}, -{ "paramname": "pchResponseBuffer" ,"out_string": " " ,"paramtype": "char *"}, -{ "paramname": "unResponseBufferSize" ,"paramtype": "uint32_t"} - ] -} ,{ "classname": "vr::IVRSystem", "methodname": "PerformFirmwareUpdate", @@ -2430,8 +2544,17 @@ } ,{ "classname": "vr::IVRSystem", - "methodname": "AcknowledgeQuit_UserPrompt", - "returntype": "void" + "methodname": "GetAppContainerFilePaths", + "returntype": "uint32_t", + "params": [ +{ "paramname": "pchBuffer" ,"out_string": " " ,"paramtype": "char *"}, +{ "paramname": "unBufferSize" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRSystem", + "methodname": "GetRuntimeVersion", + "returntype": "const char *" } ,{ "classname": "vr::IVRExtendedDisplay", @@ -2595,6 +2718,19 @@ { "paramname": "glTextureId" ,"paramtype": "vr::glUInt_t"} ] } +,{ + "classname": "vr::IVRTrackedCamera", + "methodname": "SetCameraTrackingSpace", + "returntype": "void", + "params": [ +{ "paramname": "eUniverse" ,"paramtype": "vr::ETrackingUniverseOrigin"} + ] +} +,{ + "classname": "vr::IVRTrackedCamera", + "methodname": "GetCameraTrackingSpace", + "returntype": "vr::ETrackingUniverseOrigin" +} ,{ "classname": "vr::IVRApplications", "methodname": "AddApplicationManifest", @@ -2823,8 +2959,8 @@ } ,{ "classname": "vr::IVRApplications", - "methodname": "GetTransitionState", - "returntype": "vr::EVRApplicationTransitionState" + "methodname": "GetSceneApplicationState", + "returntype": "vr::EVRSceneApplicationState" } ,{ "classname": "vr::IVRApplications", @@ -2836,17 +2972,12 @@ } ,{ "classname": "vr::IVRApplications", - "methodname": "GetApplicationsTransitionStateNameFromEnum", + "methodname": "GetSceneApplicationStateNameFromEnum", "returntype": "const char *", "params": [ -{ "paramname": "state" ,"paramtype": "vr::EVRApplicationTransitionState"} +{ "paramname": "state" ,"paramtype": "vr::EVRSceneApplicationState"} ] } -,{ - "classname": "vr::IVRApplications", - "methodname": "IsQuitUserPromptRequested", - "returntype": "bool" -} ,{ "classname": "vr::IVRApplications", "methodname": "LaunchInternalProcess", @@ -3072,6 +3203,11 @@ "methodname": "HideWorkingSetPreview", "returntype": "void" } +,{ + "classname": "vr::IVRChaperoneSetup", + "methodname": "RoomSetupStarting", + "returntype": "void" +} ,{ "classname": "vr::IVRCompositor", "methodname": "SetTrackingSpace", @@ -3390,6 +3526,32 @@ "methodname": "IsMotionSmoothingEnabled", "returntype": "bool" } +,{ + "classname": "vr::IVRCompositor", + "methodname": "IsMotionSmoothingSupported", + "returntype": "bool" +} +,{ + "classname": "vr::IVRCompositor", + "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", @@ -3417,19 +3579,6 @@ { "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"} ] } -,{ - "classname": "vr::IVROverlay", - "methodname": "SetHighQualityOverlay", - "returntype": "vr::EVROverlayError", - "params": [ -{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"} - ] -} -,{ - "classname": "vr::IVROverlay", - "methodname": "GetHighQualityOverlay", - "returntype": "vr::VROverlayHandle_t" -} ,{ "classname": "vr::IVROverlay", "methodname": "GetOverlayKey", @@ -3518,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", @@ -3614,22 +3772,20 @@ } ,{ "classname": "vr::IVROverlay", - "methodname": "SetOverlayAutoCurveDistanceRangeInMeters", + "methodname": "SetOverlayCurvature", "returntype": "vr::EVROverlayError", "params": [ { "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, -{ "paramname": "fMinDistanceInMeters" ,"paramtype": "float"}, -{ "paramname": "fMaxDistanceInMeters" ,"paramtype": "float"} +{ "paramname": "fCurvature" ,"paramtype": "float"} ] } ,{ "classname": "vr::IVROverlay", - "methodname": "GetOverlayAutoCurveDistanceRangeInMeters", + "methodname": "GetOverlayCurvature", "returntype": "vr::EVROverlayError", "params": [ { "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, -{ "paramname": "pfMinDistanceInMeters" ,"paramtype": "float *"}, -{ "paramname": "pfMaxDistanceInMeters" ,"paramtype": "float *"} +{ "paramname": "pfCurvature" ,"paramtype": "float *"} ] } ,{ @@ -3780,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", @@ -3881,56 +4055,72 @@ } ,{ "classname": "vr::IVROverlay", - "methodname": "GetGamepadFocusOverlay", - "returntype": "vr::VROverlayHandle_t" + "methodname": "SetOverlayDualAnalogTransform", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlay" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "eWhich" ,"paramtype": "vr::EDualAnalogWhich"}, +{ "paramname": "pvCenter" ,"paramtype": "const struct vr::HmdVector2_t *"}, +{ "paramname": "fRadius" ,"paramtype": "float"} + ] } ,{ "classname": "vr::IVROverlay", - "methodname": "SetGamepadFocusOverlay", + "methodname": "GetOverlayDualAnalogTransform", "returntype": "vr::EVROverlayError", "params": [ -{ "paramname": "ulNewFocusOverlay" ,"paramtype": "vr::VROverlayHandle_t"} +{ "paramname": "ulOverlay" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "eWhich" ,"paramtype": "vr::EDualAnalogWhich"}, +{ "paramname": "pvCenter" ,"paramtype": "struct vr::HmdVector2_t *"}, +{ "paramname": "pfRadius" ,"paramtype": "float *"} ] } ,{ "classname": "vr::IVROverlay", - "methodname": "SetOverlayNeighbor", + "methodname": "SetOverlayIntersectionMask", "returntype": "vr::EVROverlayError", "params": [ -{ "paramname": "eDirection" ,"paramtype": "vr::EOverlayDirection"}, -{ "paramname": "ulFrom" ,"paramtype": "vr::VROverlayHandle_t"}, -{ "paramname": "ulTo" ,"paramtype": "vr::VROverlayHandle_t"} +{ "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": "MoveGamepadFocusToNeighbor", + "methodname": "TriggerLaserMouseHapticVibration", "returntype": "vr::EVROverlayError", "params": [ -{ "paramname": "eDirection" ,"paramtype": "vr::EOverlayDirection"}, -{ "paramname": "ulFrom" ,"paramtype": "vr::VROverlayHandle_t"} +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "fDurationSeconds" ,"paramtype": "float"}, +{ "paramname": "fFrequency" ,"paramtype": "float"}, +{ "paramname": "fAmplitude" ,"paramtype": "float"} ] } ,{ "classname": "vr::IVROverlay", - "methodname": "SetOverlayDualAnalogTransform", + "methodname": "SetOverlayCursor", "returntype": "vr::EVROverlayError", "params": [ -{ "paramname": "ulOverlay" ,"paramtype": "vr::VROverlayHandle_t"}, -{ "paramname": "eWhich" ,"paramtype": "vr::EDualAnalogWhich"}, -{ "paramname": "pvCenter" ,"paramtype": "const struct vr::HmdVector2_t *"}, -{ "paramname": "fRadius" ,"paramtype": "float"} +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "ulCursorHandle" ,"paramtype": "vr::VROverlayHandle_t"} ] } ,{ "classname": "vr::IVROverlay", - "methodname": "GetOverlayDualAnalogTransform", + "methodname": "SetOverlayCursorPositionOverride", "returntype": "vr::EVROverlayError", "params": [ -{ "paramname": "ulOverlay" ,"paramtype": "vr::VROverlayHandle_t"}, -{ "paramname": "eWhich" ,"paramtype": "vr::EDualAnalogWhich"}, -{ "paramname": "pvCenter" ,"paramtype": "struct vr::HmdVector2_t *"}, -{ "paramname": "pfRadius" ,"paramtype": "float *"} +{ "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"} ] } ,{ @@ -3959,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"} ] } ,{ @@ -4122,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", @@ -4368,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", @@ -4597,6 +4758,14 @@ { "paramname": "pchDriverName" ,"paramtype": "const char *"} ] } +,{ + "classname": "vr::IVRDriverManager", + "methodname": "IsEnabled", + "returntype": "bool", + "params": [ +{ "paramname": "nDriver" ,"paramtype": "vr::DriverId_t"} + ] +} ,{ "classname": "vr::IVRInput", "methodname": "SetActionManifestPath", @@ -4666,7 +4835,7 @@ } ,{ "classname": "vr::IVRInput", - "methodname": "GetPoseActionData", + "methodname": "GetPoseActionDataRelativeToNow", "returntype": "vr::EVRInputError", "params": [ { "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, @@ -4677,6 +4846,18 @@ { "paramname": "ulRestrictToDevice" ,"paramtype": "vr::VRInputValueHandle_t"} ] } +,{ + "classname": "vr::IVRInput", + "methodname": "GetPoseActionDataForNextFrame", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "eOrigin" ,"paramtype": "vr::ETrackingUniverseOrigin"}, +{ "paramname": "pActionData" ,"paramtype": "struct vr::InputPoseActionData_t *"}, +{ "paramname": "unActionDataSize" ,"paramtype": "uint32_t"}, +{ "paramname": "ulRestrictToDevice" ,"paramtype": "vr::VRInputValueHandle_t"} + ] +} ,{ "classname": "vr::IVRInput", "methodname": "GetSkeletalActionData", @@ -4756,6 +4937,7 @@ "returntype": "vr::EVRInputError", "params": [ { "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "eSummaryType" ,"paramtype": "vr::EVRSummaryType"}, { "paramname": "pSkeletalSummaryData" ,"paramtype": "struct vr::VRSkeletalSummaryData_t *"} ] } @@ -4828,6 +5010,18 @@ { "paramname": "unOriginInfoSize" ,"paramtype": "uint32_t"} ] } +,{ + "classname": "vr::IVRInput", + "methodname": "GetActionBindingInfo", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "pOriginInfo" ,"paramtype": "struct vr::InputBindingInfo_t *"}, +{ "paramname": "unBindingInfoSize" ,"paramtype": "uint32_t"}, +{ "paramname": "unBindingInfoCount" ,"paramtype": "uint32_t"}, +{ "paramname": "punReturnedBindingInfoCount" ,"paramtype": "uint32_t *"} + ] +} ,{ "classname": "vr::IVRInput", "methodname": "ShowActionOrigins", @@ -4853,6 +5047,17 @@ "methodname": "IsUsingLegacyInput", "returntype": "bool" } +,{ + "classname": "vr::IVRInput", + "methodname": "OpenBindingUI", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "pchAppKey" ,"paramtype": "const char *"}, +{ "paramname": "ulActionSetHandle" ,"paramtype": "vr::VRActionSetHandle_t"}, +{ "paramname": "ulDeviceHandle" ,"paramtype": "vr::VRInputValueHandle_t"}, +{ "paramname": "bShowOnDesktop" ,"paramtype": "bool"} + ] +} ,{ "classname": "vr::IVRIOBuffer", "methodname": "Open", @@ -4950,5 +5155,41 @@ { "paramname": "punDescriptorBufferLenInOut" ,"paramtype": "uint32_t *"} ] } +,{ + "classname": "vr::IVRDebug", + "methodname": "EmitVrProfilerEvent", + "returntype": "vr::EVRDebugError", + "params": [ +{ "paramname": "pchMessage" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "vr::IVRDebug", + "methodname": "BeginVrProfilerEvent", + "returntype": "vr::EVRDebugError", + "params": [ +{ "paramname": "pHandleOut" ,"paramtype": "vr::VrProfilerEventHandle_t *"} + ] +} +,{ + "classname": "vr::IVRDebug", + "methodname": "FinishVrProfilerEvent", + "returntype": "vr::EVRDebugError", + "params": [ +{ "paramname": "hHandle" ,"paramtype": "vr::VrProfilerEventHandle_t"}, +{ "paramname": "pchMessage" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "vr::IVRDebug", + "methodname": "DriverDebugRequest", + "returntype": "uint32_t", + "params": [ +{ "paramname": "unDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"}, +{ "paramname": "pchRequest" ,"paramtype": "const char *"}, +{ "paramname": "pchResponseBuffer" ,"out_string": " " ,"paramtype": "char *"}, +{ "paramname": "unResponseBufferSize" ,"paramtype": "uint32_t"} + ] +} ] } \ No newline at end of file diff --git a/OpenVR/headers/openvr_capi.h b/OpenVR/headers/openvr_capi.h index 03724dd..c636d53 100644 --- a/OpenVR/headers/openvr_capi.h +++ b/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; @@ -103,21 +104,21 @@ static const unsigned int k_unControllerStateAxisCount = 5; static const unsigned long k_ulOverlayHandleInvalid = 0; static const unsigned int k_unMaxDistortionFunctionParameters = 8; static const unsigned int k_unScreenshotHandleInvalid = 0; -static const char * IVRSystem_Version = "IVRSystem_019"; +static const char * IVRSystem_Version = "IVRSystem_021"; static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; -static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_005"; +static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_006"; static const unsigned int k_unMaxApplicationKeyLength = 128; static const char * k_pch_MimeType_HomeApp = "vr/home"; static const char * k_pch_MimeType_GameTheater = "vr/game_theater"; -static const char * IVRApplications_Version = "IVRApplications_006"; +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_019"; +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"; @@ -145,21 +146,28 @@ static const char * k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCame static const char * k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; static const char * k_pch_SteamVR_GridColor_String = "gridColor"; static const char * k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; +static const char * k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; static const char * k_pch_SteamVR_ShowStage_Bool = "showStage"; static const char * k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; static const char * k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; static const char * k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; -static const char * k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; +static const char * k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement"; +static const char * k_pch_SteamVR_ShowBaseStationPowerManagementTip_Int32 = "ShowBaseStationPowerManagementTip"; static const char * k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; static const char * k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; static const char * k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; static const char * k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; static const char * k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; +static const char * k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; static const char * k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; static const char * k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; -static const char * k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; +static const char * k_pch_SteamVR_ShowLegacyMirrorView_Bool = "showLegacyMirrorView"; +static const char * k_pch_SteamVR_MirrorViewVisibility_Bool = "showMirrorView"; +static const char * k_pch_SteamVR_MirrorViewDisplayMode_Int32 = "mirrorViewDisplayMode"; +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"; @@ -174,15 +182,20 @@ 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_InputBindingUIBlock = "inputBindingUI"; +static const char * k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; static const char * k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; static const char * k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; static const char * k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; static const char * k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; static const char * k_pch_SteamVR_LastVersionNotice = "lastVersionNotice"; static const char * k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate"; +static const char * k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR"; +static const char * k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG"; +static const char * k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB"; +static const char * k_pch_SteamVR_CustomIconStyle_String = "customIconStyle"; +static const char * k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle"; +static const char * k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate"; static const char * k_pch_DirectMode_Section = "direct_mode"; static const char * k_pch_DirectMode_Enable_Bool = "enable"; static const char * k_pch_DirectMode_Count_Int32 = "count"; @@ -198,8 +211,8 @@ static const char * k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; static const char * k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; static const char * k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; static const char * k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; +static const char * k_pch_Lighthouse_InactivityTimeoutForBaseStations_Int32 = "InactivityTimeoutForBaseStations"; static const char * k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; -static const char * k_pch_Lighthouse_NewPairing_Bool = "newPairing"; static const char * k_pch_Null_Section = "driver_null"; static const char * k_pch_Null_SerialNumber_String = "serialNumber"; static const char * k_pch_Null_ModelNumber_String = "modelNumber"; @@ -232,7 +245,7 @@ static const char * k_pch_Perf_PerfGraphInHMD_Bool = "perfGraphInHMD"; static const char * k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; static const char * k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; static const char * k_pch_Perf_TestData_Float = "perfTestData"; -static const char * k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling"; +static const char * k_pch_Perf_GPUProfiling_Bool = "GPUProfiling"; static const char * k_pch_CollisionBounds_Section = "collisionBounds"; static const char * k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; static const char * k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; @@ -243,6 +256,7 @@ static const char * k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsCo static const char * k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; static const char * k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; static const char * k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; +static const char * k_pch_CollisionBounds_EnableDriverImport = "enableDriverBoundsImport"; static const char * k_pch_Camera_Section = "camera"; static const char * k_pch_Camera_EnableCamera_Bool = "enableCamera"; static const char * k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; @@ -255,11 +269,19 @@ static const char * k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGam static const char * k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; static const char * k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode"; static const char * k_pch_audio_Section = "audio"; -static const char * k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; -static const char * k_pch_audio_OnRecordDevice_String = "onRecordDevice"; -static const char * k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; -static const char * k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; -static const char * k_pch_audio_OffRecordDevice_String = "offRecordDevice"; +static const char * k_pch_audio_SetOsDefaultPlaybackDevice_Bool = "setOsDefaultPlaybackDevice"; +static const char * k_pch_audio_EnablePlaybackDeviceOverride_Bool = "enablePlaybackDeviceOverride"; +static const char * k_pch_audio_PlaybackDeviceOverride_String = "playbackDeviceOverride"; +static const char * k_pch_audio_PlaybackDeviceOverrideName_String = "playbackDeviceOverrideName"; +static const char * k_pch_audio_SetOsDefaultRecordingDevice_Bool = "setOsDefaultRecordingDevice"; +static const char * k_pch_audio_EnableRecordingDeviceOverride_Bool = "enableRecordingDeviceOverride"; +static const char * k_pch_audio_RecordingDeviceOverride_String = "recordingDeviceOverride"; +static const char * k_pch_audio_RecordingDeviceOverrideName_String = "recordingDeviceOverrideName"; +static const char * k_pch_audio_EnablePlaybackMirror_Bool = "enablePlaybackMirror"; +static const char * k_pch_audio_PlaybackMirrorDevice_String = "playbackMirrorDevice"; +static const char * k_pch_audio_PlaybackMirrorDeviceName_String = "playbackMirrorDeviceName"; +static const char * k_pch_audio_OldPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; +static const char * k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId"; static const char * k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; static const char * k_pch_Power_Section = "power"; static const char * k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; @@ -271,21 +293,22 @@ static const char * k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositor static const char * k_pch_Dashboard_Section = "dashboard"; static const char * k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; static const char * k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; -static const char * k_pch_Dashboard_UseWebDashboard = "useWebDashboard"; +static const char * k_pch_Dashboard_UseWebKeyboard = "useWebKeyboard"; static const char * k_pch_Dashboard_UseWebSettings = "useWebSettings"; -static const char * k_pch_Dashboard_UseWebIPD = "useWebIPD"; -static const char * k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu"; +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"; static const char * k_pch_WebInterface_Section = "WebInterface"; -static const char * k_pch_WebInterface_WebEnable_Bool = "WebEnable"; -static const char * k_pch_WebInterface_WebPort_String = "WebPort"; static const char * k_pch_VRWebHelper_Section = "VRWebHelper"; static const char * k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled"; static const char * k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort"; static const char * k_pch_TrackingOverride_Section = "TrackingOverrides"; static const char * k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; static const char * k_pch_App_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"; @@ -293,6 +316,11 @@ static const char * k_pch_LastKnown_Section = "LastKnown"; static const char * k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; static const char * k_pch_LastKnown_HMDModel_String = "HMDModel"; static const char * k_pch_DismissedWarnings_Section = "DismissedWarnings"; +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"; @@ -300,11 +328,12 @@ static const unsigned int k_unMaxActionNameLength = 64; static const unsigned int k_unMaxActionSetNameLength = 64; static const unsigned int k_unMaxActionOriginCount = 16; static const unsigned int k_unMaxBoneNameLength = 32; -static const char * IVRInput_Version = "IVRInput_005"; +static const char * IVRInput_Version = "IVRInput_007"; static const unsigned long k_ulInvalidIOBufferHandle = 0; static const char * IVRIOBuffer_Version = "IVRIOBuffer_002"; static const unsigned int k_ulInvalidSpatialAnchorHandle = 0; static const char * IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; +static const char * IVRDebug_Version = "IVRDebug_001"; // OpenVR Enums @@ -361,7 +390,8 @@ typedef enum ETrackedControllerRole ETrackedControllerRole_TrackedControllerRole_RightHand = 2, ETrackedControllerRole_TrackedControllerRole_OptOut = 3, ETrackedControllerRole_TrackedControllerRole_Treadmill = 4, - ETrackedControllerRole_TrackedControllerRole_Max = 4, + ETrackedControllerRole_TrackedControllerRole_Stylus = 5, + ETrackedControllerRole_TrackedControllerRole_Max = 5, } ETrackedControllerRole; typedef enum ETrackingUniverseOrigin @@ -429,6 +459,11 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_BootloaderVersion_Uint64 = 1044, 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, @@ -501,6 +536,22 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_CameraDistortionFunction_Int32_Array = 2072, ETrackedDeviceProperty_Prop_CameraDistortionCoefficients_Float_Array = 2073, ETrackedDeviceProperty_Prop_ExpectedControllerType_String = 2074, + ETrackedDeviceProperty_Prop_HmdTrackingStyle_Int32 = 2075, + ETrackedDeviceProperty_Prop_DriverProvidedChaperoneVisibility_Bool = 2076, + 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, + ETrackedDeviceProperty_Prop_IpdUIRangeMaxMeters_Float = 2101, ETrackedDeviceProperty_Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, @@ -510,6 +561,9 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206, ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, + ETrackedDeviceProperty_Prop_Audio_DefaultPlaybackDeviceId_String = 2300, + ETrackedDeviceProperty_Prop_Audio_DefaultRecordingDeviceId_String = 2301, + ETrackedDeviceProperty_Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000, ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001, ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002, @@ -536,9 +590,11 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_NamedIconPathDeviceNotReady_String = 5006, ETrackedDeviceProperty_Prop_NamedIconPathDeviceStandby_String = 5007, ETrackedDeviceProperty_Prop_NamedIconPathDeviceAlertLow_String = 5008, + ETrackedDeviceProperty_Prop_NamedIconPathDeviceStandbyAlert_String = 5009, ETrackedDeviceProperty_Prop_DisplayHiddenArea_Binary_Start = 5100, ETrackedDeviceProperty_Prop_DisplayHiddenArea_Binary_End = 5150, ETrackedDeviceProperty_Prop_ParentContainer = 5151, + ETrackedDeviceProperty_Prop_OverrideContainer_Uint64 = 5152, ETrackedDeviceProperty_Prop_UserConfigPath_String = 6000, ETrackedDeviceProperty_Prop_InstallPath_String = 6001, ETrackedDeviceProperty_Prop_HasDisplayComponent_Bool = 6002, @@ -548,7 +604,6 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_HasVirtualDisplayComponent_Bool = 6006, ETrackedDeviceProperty_Prop_HasSpatialAnchorsSupport_Bool = 6007, ETrackedDeviceProperty_Prop_ControllerType_String = 7000, - ETrackedDeviceProperty_Prop_LegacyInputProfile_String = 7001, ETrackedDeviceProperty_Prop_ControllerHandSelectionPriority_Int32 = 7002, ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_Start = 10000, ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_End = 10999, @@ -571,8 +626,18 @@ 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 +{ + EHmdTrackingStyle_HmdTrackingStyle_Unknown = 0, + EHmdTrackingStyle_HmdTrackingStyle_Lighthouse = 1, + EHmdTrackingStyle_HmdTrackingStyle_OutsideInCameras = 2, + EHmdTrackingStyle_HmdTrackingStyle_InsideOutCameras = 3, +} EHmdTrackingStyle; + typedef enum EVRSubmitFlags { EVRSubmitFlags_Submit_Default = 0, @@ -637,16 +702,14 @@ typedef enum EVREventType EVREventType_VREvent_ScrollSmooth = 309, EVREventType_VREvent_InputFocusCaptured = 400, EVREventType_VREvent_InputFocusReleased = 401, - EVREventType_VREvent_SceneFocusLost = 402, - EVREventType_VREvent_SceneFocusGained = 403, EVREventType_VREvent_SceneApplicationChanged = 404, EVREventType_VREvent_SceneFocusChanged = 405, EVREventType_VREvent_InputFocusChanged = 406, - EVREventType_VREvent_SceneApplicationSecondaryRenderingStarted = 407, EVREventType_VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, EVREventType_VREvent_ActionBindingReloaded = 409, EVREventType_VREvent_HideRenderModels = 410, EVREventType_VREvent_ShowRenderModels = 411, + EVREventType_VREvent_SceneApplicationStateChanged = 412, EVREventType_VREvent_ConsoleOpened = 420, EVREventType_VREvent_ConsoleClosed = 421, EVREventType_VREvent_OverlayShown = 500, @@ -682,7 +745,6 @@ typedef enum EVREventType EVREventType_VREvent_Notification_Destroyed = 603, EVREventType_VREvent_Quit = 700, EVREventType_VREvent_ProcessQuit = 701, - EVREventType_VREvent_QuitAborted_UserPrompt = 702, EVREventType_VREvent_QuitAcknowledged = 703, EVREventType_VREvent_DriverRequestedQuit = 704, EVREventType_VREvent_RestartRequested = 705, @@ -692,6 +754,8 @@ typedef enum EVREventType EVREventType_VREvent_ChaperoneSettingsHaveChanged = 803, EVREventType_VREvent_SeatedZeroPoseReset = 804, EVREventType_VREvent_ChaperoneFlushCache = 805, + EVREventType_VREvent_ChaperoneRoomSetupStarting = 806, + EVREventType_VREvent_ChaperoneRoomSetupFinished = 807, EVREventType_VREvent_AudioSettingsHaveChanged = 820, EVREventType_VREvent_BackgroundSettingHasChanged = 850, EVREventType_VREvent_CameraSettingsHaveChanged = 851, @@ -712,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, @@ -720,16 +785,10 @@ typedef enum EVREventType EVREventType_VREvent_KeyboardClosed = 1200, EVREventType_VREvent_KeyboardCharInput = 1201, EVREventType_VREvent_KeyboardDone = 1202, - EVREventType_VREvent_ApplicationTransitionStarted = 1300, - EVREventType_VREvent_ApplicationTransitionAborted = 1301, - EVREventType_VREvent_ApplicationTransitionNewAppStarted = 1302, EVREventType_VREvent_ApplicationListUpdated = 1303, EVREventType_VREvent_ApplicationMimeTypeLoad = 1304, - EVREventType_VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, EVREventType_VREvent_ProcessConnected = 1306, EVREventType_VREvent_ProcessDisconnected = 1307, - EVREventType_VREvent_Compositor_MirrorWindowShown = 1400, - EVREventType_VREvent_Compositor_MirrorWindowHidden = 1401, EVREventType_VREvent_Compositor_ChaperoneBoundsShown = 1410, EVREventType_VREvent_Compositor_ChaperoneBoundsHidden = 1411, EVREventType_VREvent_Compositor_DisplayDisconnected = 1412, @@ -737,6 +796,9 @@ typedef enum EVREventType EVREventType_VREvent_Compositor_HDCPError = 1414, EVREventType_VREvent_Compositor_ApplicationNotResponding = 1415, 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, @@ -755,11 +817,14 @@ 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, EVREventType_VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, EVREventType_VREvent_SystemReport_Started = 1900, + EVREventType_VREvent_Monitor_ShowHeadsetView = 2000, + EVREventType_VREvent_Monitor_HideHeadsetView = 2001, EVREventType_VREvent_VendorSpecific_Reserved_Start = 10000, EVREventType_VREvent_VendorSpecific_Reserved_End = 19999, } EVREventType; @@ -771,6 +836,7 @@ typedef enum EDeviceActivityLevel EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction = 1, EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction_Timeout = 2, EDeviceActivityLevel_k_EDeviceActivityLevel_Standby = 3, + EDeviceActivityLevel_k_EDeviceActivityLevel_Idle_Timeout = 4, } EDeviceActivityLevel; typedef enum EVRButtonId @@ -792,9 +858,9 @@ typedef enum EVRButtonId EVRButtonId_k_EButton_SteamVR_Touchpad = 32, EVRButtonId_k_EButton_SteamVR_Trigger = 33, EVRButtonId_k_EButton_Dashboard_Back = 2, - EVRButtonId_k_EButton_Knuckles_A = 2, - EVRButtonId_k_EButton_Knuckles_B = 1, - EVRButtonId_k_EButton_Knuckles_JoyStick = 35, + EVRButtonId_k_EButton_IndexController_A = 2, + EVRButtonId_k_EButton_IndexController_B = 1, + EVRButtonId_k_EButton_IndexController_JoyStick = 35, EVRButtonId_k_EButton_Max = 64, } EVRButtonId; @@ -815,9 +881,10 @@ typedef enum EShowUIType { EShowUIType_ShowUI_ControllerBinding = 0, EShowUIType_ShowUI_ManageTrackers = 1, - EShowUIType_ShowUI_QuickStart = 2, EShowUIType_ShowUI_Pairing = 3, EShowUIType_ShowUI_Settings = 4, + EShowUIType_ShowUI_DebugCommands = 5, + EShowUIType_ShowUI_FullControllerBinding = 6, } EShowUIType; typedef enum EHDCPError @@ -1022,6 +1089,9 @@ typedef enum EVRInitError EVRInitError_VRInitError_Init_VRWebHelperStartupFailed = 141, EVRInitError_VRInitError_Init_TrackerManagerInitFailed = 142, EVRInitError_VRInitError_Init_AlreadyRunning = 143, + EVRInitError_VRInitError_Init_FailedForVrMonitor = 144, + EVRInitError_VRInitError_Init_PropertyManagerInitFailed = 145, + EVRInitError_VRInitError_Init_WebServerFailed = 146, EVRInitError_VRInitError_Driver_Failed = 200, EVRInitError_VRInitError_Driver_Unknown = 201, EVRInitError_VRInitError_Driver_HmdUnknown = 202, @@ -1034,6 +1104,7 @@ typedef enum EVRInitError EVRInitError_VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, EVRInitError_VRInitError_Driver_HmdDriverIdOutOfBounds = 211, EVRInitError_VRInitError_Driver_HmdDisplayMirrored = 212, + EVRInitError_VRInitError_Driver_HmdDisplayNotFoundLaptop = 213, EVRInitError_VRInitError_IPC_ServerInitFailed = 300, EVRInitError_VRInitError_IPC_ConnectFailed = 301, EVRInitError_VRInitError_IPC_SharedStateInitFailed = 302, @@ -1043,6 +1114,8 @@ typedef enum EVRInitError EVRInitError_VRInitError_IPC_CompositorConnectFailed = 306, EVRInitError_VRInitError_IPC_CompositorInvalidConnectResponse = 307, EVRInitError_VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + EVRInitError_VRInitError_IPC_ConnectFailedAfterTargetExited = 309, + EVRInitError_VRInitError_IPC_NamespaceUnavailable = 310, EVRInitError_VRInitError_Compositor_Failed = 400, EVRInitError_VRInitError_Compositor_D3D11HardwareRequired = 401, EVRInitError_VRInitError_Compositor_FirmwareRequiresUpdate = 402, @@ -1128,6 +1201,9 @@ typedef enum EVRInitError EVRInitError_VRInitError_Compositor_CreateTextIndexBuffer = 482, EVRInitError_VRInitError_Compositor_CreateMirrorTextures = 483, EVRInitError_VRInitError_Compositor_CreateLastFrameRenderTexture = 484, + EVRInitError_VRInitError_Compositor_CreateMirrorOverlay = 485, + EVRInitError_VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486, + EVRInitError_VRInitError_Compositor_DisplayModeNotSupported = 487, EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, EVRInitError_VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, @@ -1143,6 +1219,7 @@ typedef enum EVRInitError EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + EVRInitError_VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, EVRInitError_VRInitError_Steam_SteamInstallationNotFound = 2000, EVRInitError_VRInitError_LastError = 2001, } EVRInitError; @@ -1274,16 +1351,18 @@ typedef enum EVRApplicationProperty EVRApplicationProperty_VRApplicationProperty_IsInstanced_Bool = 62, EVRApplicationProperty_VRApplicationProperty_IsInternal_Bool = 63, EVRApplicationProperty_VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64, + EVRApplicationProperty_VRApplicationProperty_IsHidden_Bool = 65, EVRApplicationProperty_VRApplicationProperty_LastLaunchTime_Uint64 = 70, } EVRApplicationProperty; -typedef enum EVRApplicationTransitionState +typedef enum EVRSceneApplicationState { - EVRApplicationTransitionState_VRApplicationTransition_None = 0, - EVRApplicationTransitionState_VRApplicationTransition_OldAppQuitSent = 10, - EVRApplicationTransitionState_VRApplicationTransition_WaitingForExternalLaunch = 11, - EVRApplicationTransitionState_VRApplicationTransition_NewAppLaunched = 20, -} EVRApplicationTransitionState; + EVRSceneApplicationState_None = 0, + EVRSceneApplicationState_Starting = 1, + EVRSceneApplicationState_Quitting = 2, + EVRSceneApplicationState_Running = 3, + EVRSceneApplicationState_Waiting = 4, +} EVRSceneApplicationState; typedef enum ChaperoneCalibrationState { @@ -1324,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 @@ -1342,32 +1422,33 @@ 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 { - VROverlayFlags_None = 0, - VROverlayFlags_Curved = 1, - VROverlayFlags_RGSS4X = 2, - VROverlayFlags_NoDashboardTab = 3, - VROverlayFlags_AcceptsGamepadEvents = 4, - VROverlayFlags_ShowGamepadFocus = 5, - VROverlayFlags_SendVRDiscreteScrollEvents = 6, - VROverlayFlags_SendVRTouchpadEvents = 7, - VROverlayFlags_ShowTouchPadScrollWheel = 8, - VROverlayFlags_TransferOwnershipToInternalProcess = 9, - VROverlayFlags_SideBySide_Parallel = 10, - VROverlayFlags_SideBySide_Crossed = 11, - VROverlayFlags_Panorama = 12, - VROverlayFlags_StereoPanorama = 13, - VROverlayFlags_SortWithNonSceneOverlays = 14, - VROverlayFlags_VisibleInDashboard = 15, - VROverlayFlags_MakeOverlaysInteractiveIfVisible = 16, - VROverlayFlags_SendVRSmoothScrollEvents = 17, + VROverlayFlags_NoDashboardTab = 8, + VROverlayFlags_SendVRDiscreteScrollEvents = 64, + VROverlayFlags_SendVRTouchpadEvents = 128, + VROverlayFlags_ShowTouchPadScrollWheel = 256, + VROverlayFlags_TransferOwnershipToInternalProcess = 512, + VROverlayFlags_SideBySide_Parallel = 1024, + VROverlayFlags_SideBySide_Crossed = 2048, + VROverlayFlags_Panorama = 4096, + VROverlayFlags_StereoPanorama = 8192, + VROverlayFlags_SortWithNonSceneOverlays = 16384, + VROverlayFlags_VisibleInDashboard = 32768, + VROverlayFlags_MakeOverlaysInteractiveIfVisible = 65536, + VROverlayFlags_SendVRSmoothScrollEvents = 131072, + VROverlayFlags_ProtectedContent = 262144, + VROverlayFlags_HideLaserIntersection = 524288, } VROverlayFlags; typedef enum VRMessageOverlayResponse @@ -1394,15 +1475,6 @@ typedef enum EGamepadTextInputLineMode EGamepadTextInputLineMode_k_EGamepadTextInputLineModeMultipleLines = 1, } EGamepadTextInputLineMode; -typedef enum EOverlayDirection -{ - EOverlayDirection_OverlayDirection_Up = 0, - EOverlayDirection_OverlayDirection_Down = 1, - EOverlayDirection_OverlayDirection_Left = 2, - EOverlayDirection_OverlayDirection_Right = 3, - EOverlayDirection_OverlayDirection_Count = 4, -} EOverlayDirection; - typedef enum EVROverlayIntersectionMaskPrimitiveType { EVROverlayIntersectionMaskPrimitiveType_OverlayIntersectionPrimitiveType_Rectangle = 0, @@ -1504,6 +1576,12 @@ typedef enum EVRFingerSplay EVRFingerSplay_VRFingerSplay_Count = 4, } EVRFingerSplay; +typedef enum EVRSummaryType +{ + EVRSummaryType_VRSummaryType_FromAnimation = 0, + EVRSummaryType_VRSummaryType_FromDevice = 1, +} EVRSummaryType; + typedef enum EVRInputFilterCancelType { EVRInputFilterCancelType_VRInputFilterCancel_Timers = 0, @@ -1536,6 +1614,12 @@ typedef enum EIOBufferMode EIOBufferMode_IOBufferMode_Create = 512, } EIOBufferMode; +typedef enum EVRDebugError +{ + EVRDebugError_VRDebugError_Success = 0, + EVRDebugError_VRDebugError_BadParameter = 1, +} EVRDebugError; + // OpenVR typedefs @@ -1565,6 +1649,7 @@ typedef uint32_t VRComponentProperties; typedef int32_t TextureID_t; typedef uint32_t VRNotificationId; typedef uint64_t IOBufferHandle_t; +typedef uint64_t VrProfilerEventHandle_t; typedef EVRInitError HmdError; typedef EVREye Hmd_Eye; typedef EColorSpace ColorSpace; @@ -1974,33 +2059,10 @@ typedef struct CameraVideoStreamFrameHeader_t uint32_t nHeight; uint32_t nBytesPerPixel; uint32_t nFrameSequence; - struct TrackedDevicePose_t standingTrackedDevicePose; + struct TrackedDevicePose_t trackedDevicePose; uint64_t ulFrameExposureTime; } CameraVideoStreamFrameHeader_t; -typedef struct DriverDirectMode_FrameTiming -{ - uint32_t m_nSize; - uint32_t m_nNumFramePresents; - uint32_t m_nNumMisPresented; - uint32_t m_nNumDroppedFrames; - uint32_t m_nReprojectionFlags; -} DriverDirectMode_FrameTiming; - -typedef struct ImuSample_t -{ - double fSampleTime; - struct HmdVector3d_t vAccel; - struct HmdVector3d_t vGyro; - uint32_t unOffScaleFlags; -} ImuSample_t; - -typedef struct AppOverrideKeys_t -{ - char * pchKey; // const char * - char * pchValue; // const char * -} AppOverrideKeys_t; - typedef struct Compositor_FrameTiming { uint32_t m_nSize; @@ -2031,6 +2093,29 @@ typedef struct Compositor_FrameTiming uint32_t m_nNumVSyncsToFirstView; } Compositor_FrameTiming; +typedef struct DriverDirectMode_FrameTiming +{ + uint32_t m_nSize; + uint32_t m_nNumFramePresents; + uint32_t m_nNumMisPresented; + uint32_t m_nNumDroppedFrames; + uint32_t m_nReprojectionFlags; +} DriverDirectMode_FrameTiming; + +typedef struct ImuSample_t +{ + double fSampleTime; + struct HmdVector3d_t vAccel; + struct HmdVector3d_t vGyro; + uint32_t unOffScaleFlags; +} ImuSample_t; + +typedef struct AppOverrideKeys_t +{ + char * pchKey; // const char * + char * pchValue; // const char * +} AppOverrideKeys_t; + typedef struct Compositor_CumulativeStats { uint32_t m_nPid; @@ -2050,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; @@ -2182,6 +2279,14 @@ typedef struct InputOriginInfo_t char rchRenderModelComponentName[128]; //char[128] } InputOriginInfo_t; +typedef struct InputBindingInfo_t +{ + char rchDevicePathName[128]; //char[128] + char rchInputPathName[128]; //char[128] + char rchModeName[128]; //char[128] + char rchSlotName[128]; //char[128] +} InputBindingInfo_t; + typedef struct VRActiveActionSet_t { VRActionSetHandle_t ulActionSet; @@ -2220,6 +2325,7 @@ typedef struct COpenVRContext intptr_t m_pVRInput; // class vr::IVRInput * intptr_t m_pVRIOBuffer; // class vr::IVRIOBuffer * intptr_t m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors * + intptr_t m_pVRDebug; // class vr::IVRDebug * intptr_t m_pVRNotifications; // class vr::IVRNotifications * } COpenVRContext; @@ -2335,10 +2441,10 @@ struct VR_IVRSystem_FnTable bool (OPENVR_FNTABLE_CALLTYPE *IsSteamVRDrawingControllers)(); bool (OPENVR_FNTABLE_CALLTYPE *ShouldApplicationPause)(); bool (OPENVR_FNTABLE_CALLTYPE *ShouldApplicationReduceRenderingWork)(); - uint32_t (OPENVR_FNTABLE_CALLTYPE *DriverDebugRequest)(TrackedDeviceIndex_t unDeviceIndex, char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize); EVRFirmwareError (OPENVR_FNTABLE_CALLTYPE *PerformFirmwareUpdate)(TrackedDeviceIndex_t unDeviceIndex); void (OPENVR_FNTABLE_CALLTYPE *AcknowledgeQuit_Exiting)(); - void (OPENVR_FNTABLE_CALLTYPE *AcknowledgeQuit_UserPrompt)(); + uint32_t (OPENVR_FNTABLE_CALLTYPE *GetAppContainerFilePaths)(char * pchBuffer, uint32_t unBufferSize); + char * (OPENVR_FNTABLE_CALLTYPE *GetRuntimeVersion)(); }; struct VR_IVRExtendedDisplay_FnTable @@ -2362,6 +2468,8 @@ struct VR_IVRTrackedCamera_FnTable EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamTextureD3D11)(TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize); EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamTextureGL)(TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, glUInt_t * pglTextureId, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize); EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *ReleaseVideoStreamTextureGL)(TrackedCameraHandle_t hTrackedCamera, glUInt_t glTextureId); + void (OPENVR_FNTABLE_CALLTYPE *SetCameraTrackingSpace)(ETrackingUniverseOrigin eUniverse); + ETrackingUniverseOrigin (OPENVR_FNTABLE_CALLTYPE *GetCameraTrackingSpace)(); }; struct VR_IVRApplications_FnTable @@ -2391,10 +2499,9 @@ struct VR_IVRApplications_FnTable uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationsThatSupportMimeType)(char * pchMimeType, char * pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationLaunchArguments)(uint32_t unHandle, char * pchArgs, uint32_t unArgs); EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetStartingApplication)(char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen); - EVRApplicationTransitionState (OPENVR_FNTABLE_CALLTYPE *GetTransitionState)(); + EVRSceneApplicationState (OPENVR_FNTABLE_CALLTYPE *GetSceneApplicationState)(); EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *PerformApplicationPrelaunchCheck)(char * pchAppKey); - char * (OPENVR_FNTABLE_CALLTYPE *GetApplicationsTransitionStateNameFromEnum)(EVRApplicationTransitionState state); - bool (OPENVR_FNTABLE_CALLTYPE *IsQuitUserPromptRequested)(); + char * (OPENVR_FNTABLE_CALLTYPE *GetSceneApplicationStateNameFromEnum)(EVRSceneApplicationState state); EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchInternalProcess)(char * pchBinaryPath, char * pchArguments, char * pchWorkingDirectory); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetCurrentSceneProcessId)(); }; @@ -2432,6 +2539,7 @@ struct VR_IVRChaperoneSetup_FnTable bool (OPENVR_FNTABLE_CALLTYPE *ImportFromBufferToWorking)(char * pBuffer, uint32_t nImportFlags); void (OPENVR_FNTABLE_CALLTYPE *ShowWorkingSetPreview)(); void (OPENVR_FNTABLE_CALLTYPE *HideWorkingSetPreview)(); + void (OPENVR_FNTABLE_CALLTYPE *RoomSetupStarting)(); }; struct VR_IVRCompositor_FnTable @@ -2480,6 +2588,10 @@ struct VR_IVRCompositor_FnTable void (OPENVR_FNTABLE_CALLTYPE *SetExplicitTimingMode)(EVRCompositorTimingMode eTimingMode); EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SubmitExplicitTimingData)(); 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 @@ -2487,8 +2599,6 @@ struct VR_IVROverlay_FnTable EVROverlayError (OPENVR_FNTABLE_CALLTYPE *FindOverlay)(char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateOverlay)(char * pchOverlayKey, char * pchOverlayName, VROverlayHandle_t * pOverlayHandle); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *DestroyOverlay)(VROverlayHandle_t ulOverlayHandle); - EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetHighQualityOverlay)(VROverlayHandle_t ulOverlayHandle); - VROverlayHandle_t (OPENVR_FNTABLE_CALLTYPE *GetHighQualityOverlay)(); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayKey)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayName)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayName)(VROverlayHandle_t ulOverlayHandle, char * pchName); @@ -2498,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); @@ -2508,8 +2619,8 @@ struct VR_IVROverlay_FnTable EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float fWidthInMeters); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters); - EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayAutoCurveDistanceRangeInMeters)(VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters); - EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayAutoCurveDistanceRangeInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayCurvature)(VROverlayHandle_t ulOverlayHandle, float fCurvature); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayCurvature)(VROverlayHandle_t ulOverlayHandle, float * pfCurvature); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, struct VRTextureBounds_t * pOverlayTextureBounds); @@ -2525,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); @@ -2536,15 +2649,16 @@ struct VR_IVROverlay_FnTable EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvecMouseScale); bool (OPENVR_FNTABLE_CALLTYPE *ComputeOverlayIntersection)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionParams_t * pParams, struct VROverlayIntersectionResults_t * pResults); bool (OPENVR_FNTABLE_CALLTYPE *IsHoverTargetOverlay)(VROverlayHandle_t ulOverlayHandle); - VROverlayHandle_t (OPENVR_FNTABLE_CALLTYPE *GetGamepadFocusOverlay)(); - EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetGamepadFocusOverlay)(VROverlayHandle_t ulNewFocusOverlay); - EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayNeighbor)(EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo); - EVROverlayError (OPENVR_FNTABLE_CALLTYPE *MoveGamepadFocusToNeighbor)(EOverlayDirection eDirection, VROverlayHandle_t ulFrom); 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); @@ -2562,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)(); }; @@ -2600,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); @@ -2635,6 +2746,7 @@ struct VR_IVRDriverManager_FnTable uint32_t (OPENVR_FNTABLE_CALLTYPE *GetDriverCount)(); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetDriverName)(DriverId_t nDriver, char * pchValue, uint32_t unBufferSize); DriverHandle_t (OPENVR_FNTABLE_CALLTYPE *GetDriverHandle)(char * pchDriverName); + bool (OPENVR_FNTABLE_CALLTYPE *IsEnabled)(DriverId_t nDriver); }; struct VR_IVRInput_FnTable @@ -2646,7 +2758,8 @@ struct VR_IVRInput_FnTable EVRInputError (OPENVR_FNTABLE_CALLTYPE *UpdateActionState)(struct VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetDigitalActionData)(VRActionHandle_t action, struct InputDigitalActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetAnalogActionData)(VRActionHandle_t action, struct InputAnalogActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); - EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetPoseActionData)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, struct InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetPoseActionDataRelativeToNow)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, struct InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetPoseActionDataForNextFrame)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, struct InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalActionData)(VRActionHandle_t action, struct InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneCount)(VRActionHandle_t action, uint32_t * pBoneCount); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneHierarchy)(VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount); @@ -2654,16 +2767,18 @@ struct VR_IVRInput_FnTable EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalReferenceTransforms)(VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, struct VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalTrackingLevel)(VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalBoneData)(VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, struct VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); - EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalSummaryData)(VRActionHandle_t action, struct VRSkeletalSummaryData_t * pSkeletalSummaryData); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalSummaryData)(VRActionHandle_t action, EVRSummaryType eSummaryType, struct VRSkeletalSummaryData_t * pSkeletalSummaryData); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalBoneDataCompressed)(VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize); EVRInputError (OPENVR_FNTABLE_CALLTYPE *DecompressSkeletalBoneData)(void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, struct VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); EVRInputError (OPENVR_FNTABLE_CALLTYPE *TriggerHapticVibrationAction)(VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetOriginLocalizedName)(VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetOriginTrackedDeviceInfo)(VRInputValueHandle_t origin, struct InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetActionBindingInfo)(VRActionHandle_t action, struct InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount); EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle); EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowBindingsForActionSet)(struct VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight); bool (OPENVR_FNTABLE_CALLTYPE *IsUsingLegacyInput)(); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *OpenBindingUI)(char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop); }; struct VR_IVRIOBuffer_FnTable @@ -2684,6 +2799,14 @@ struct VR_IVRSpatialAnchors_FnTable EVRSpatialAnchorError (OPENVR_FNTABLE_CALLTYPE *GetSpatialAnchorDescriptor)(SpatialAnchorHandle_t unHandle, char * pchDescriptorOut, uint32_t * punDescriptorBufferLenInOut); }; +struct VR_IVRDebug_FnTable +{ + EVRDebugError (OPENVR_FNTABLE_CALLTYPE *EmitVrProfilerEvent)(char * pchMessage); + EVRDebugError (OPENVR_FNTABLE_CALLTYPE *BeginVrProfilerEvent)(VrProfilerEventHandle_t * pHandleOut); + EVRDebugError (OPENVR_FNTABLE_CALLTYPE *FinishVrProfilerEvent)(VrProfilerEventHandle_t hHandle, char * pchMessage); + uint32_t (OPENVR_FNTABLE_CALLTYPE *DriverDebugRequest)(TrackedDeviceIndex_t unDeviceIndex, char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize); +}; + #if 0 // Global entry points diff --git a/OpenVR/headers/openvr_driver.h b/OpenVR/headers/openvr_driver.h index 8a48bc5..4d9fe6a 100644 --- a/OpenVR/headers/openvr_driver.h +++ b/OpenVR/headers/openvr_driver.h @@ -15,8 +15,8 @@ namespace vr { static const uint32_t k_nSteamVRVersionMajor = 1; - static const uint32_t k_nSteamVRVersionMinor = 3; - static const uint32_t k_nSteamVRVersionBuild = 20; + static const uint32_t k_nSteamVRVersionMinor = 9; + static const uint32_t k_nSteamVRVersionBuild = 16; } // namespace vr // vrtypes.h @@ -207,7 +207,8 @@ 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_Max = 4 + 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; @@ -354,6 +356,11 @@ enum ETrackedDeviceProperty Prop_BootloaderVersion_Uint64 = 1044, 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, @@ -408,7 +415,7 @@ enum ETrackedDeviceProperty Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, // placeholder icon for "left" controller if not yet detected/loaded Prop_NamedIconPathControllerRightDeviceOff_String = 2052, // placeholder icon for "right" controller if not yet detected/loaded Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded - Prop_DoNotApplyPrediction_Bool = 2054, + Prop_DoNotApplyPrediction_Bool = 2054, // currently no effect. was used to disable HMD pose prediction on MR, which is now done by MR driver setting velocity=0 Prop_CameraToHeadTransforms_Matrix34_Array = 2055, Prop_DistortionMeshResolution_Int32 = 2056, // custom resolution of compositor calls to IVRSystem::ComputeDistortion Prop_DriverIsDrawingControllers_Bool = 2057, @@ -429,6 +436,24 @@ enum ETrackedDeviceProperty Prop_CameraDistortionFunction_Int32_Array = 2072, // Prop_NumCameras_Int32-sized array of vr::EVRDistortionFunctionType values (max size is vr::k_unMaxCameras) Prop_CameraDistortionCoefficients_Float_Array = 2073, // Prop_NumCameras_Int32-sized array of double[vr::k_unMaxDistortionFunctionParameters] (max size is vr::k_unMaxCameras) Prop_ExpectedControllerType_String = 2074, + Prop_HmdTrackingStyle_Int32 = 2075, // one of EHmdTrackingStyle + Prop_DriverProvidedChaperoneVisibility_Bool = 2076, + 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, + Prop_IpdUIRangeMinMeters_Float = 2100, + Prop_IpdUIRangeMaxMeters_Float = 2101, // Driver requested mura correction properties Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, @@ -441,6 +466,10 @@ enum ETrackedDeviceProperty Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, + Prop_Audio_DefaultPlaybackDeviceId_String = 2300, + Prop_Audio_DefaultRecordingDeviceId_String = 2301, + Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, + // Properties that are unique to TrackedDeviceClass_Controller Prop_AttachedDeviceId_String = 3000, Prop_SupportedButtons_Uint64 = 3001, @@ -472,11 +501,13 @@ enum ETrackedDeviceProperty Prop_NamedIconPathDeviceNotReady_String = 5006, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others Prop_NamedIconPathDeviceStandby_String = 5007, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others Prop_NamedIconPathDeviceAlertLow_String = 5008, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceStandbyAlert_String = 5009, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others // Properties that are used by helpers, but are opaque to applications Prop_DisplayHiddenArea_Binary_Start = 5100, Prop_DisplayHiddenArea_Binary_End = 5150, Prop_ParentContainer = 5151, + Prop_OverrideContainer_Uint64 = 5152, // Properties that are unique to drivers Prop_UserConfigPath_String = 6000, @@ -490,7 +521,7 @@ enum ETrackedDeviceProperty // Properties that are set internally based on other information provided by drivers Prop_ControllerType_String = 7000, - Prop_LegacyInputProfile_String = 7001, + //Prop_LegacyInputProfile_String = 7001, // This is no longer used. See "legacy_binding" in the input profile instead. Prop_ControllerHandSelectionPriority_Int32 = 7002, // Allows hand assignments to prefer some controllers over others. High numbers are selected over low numbers // Vendors are free to expose private debug data in this reserved region @@ -520,8 +551,19 @@ 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 */ +enum EHmdTrackingStyle +{ + HmdTrackingStyle_Unknown = 0, + + HmdTrackingStyle_Lighthouse = 1, // base stations and lasers + HmdTrackingStyle_OutsideInCameras = 2, // Cameras and LED, Rift 1 style + HmdTrackingStyle_InsideOutCameras = 3, // Cameras on HMD looking at the world +}; typedef uint64_t VRActionHandle_t; typedef uint64_t VRActionSetHandle_t; @@ -673,18 +715,20 @@ enum EVREventType VREvent_InputFocusCaptured = 400, // data is process DEPRECATED VREvent_InputFocusReleased = 401, // data is process DEPRECATED - VREvent_SceneFocusLost = 402, // data is process - VREvent_SceneFocusGained = 403, // data is process + // VREvent_SceneFocusLost = 402, // data is process + // VREvent_SceneFocusGained = 403, // data is process VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene VREvent_InputFocusChanged = 406, // data is process - VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + // VREvent_SceneApplicationSecondaryRenderingStarted = 407, VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, // data is process VREvent_ActionBindingReloaded = 409, // data is process - The App that action binds reloaded for VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + VREvent_SceneApplicationStateChanged = 412, // No data; but query VRApplications()->GetSceneApplicationState(); + VREvent_ConsoleOpened = 420, VREvent_ConsoleClosed = 421, @@ -729,17 +773,19 @@ enum EVREventType VREvent_Quit = 700, // data is process VREvent_ProcessQuit = 701, // data is process - VREvent_QuitAborted_UserPrompt = 702, // data is process + //VREvent_QuitAborted_UserPrompt = 702, // data is process VREvent_QuitAcknowledged = 703, // data is process VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down VREvent_RestartRequested = 705, // A driver or other component wants the user to restart SteamVR - VREvent_ChaperoneDataHasChanged = 800, // Sent when the process needs to call VRChaperone()->ReloadInfo() + VREvent_ChaperoneDataHasChanged = 800, // this will never happen with the new chaperone system VREvent_ChaperoneUniverseHasChanged = 801, - VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneTempDataHasChanged = 802, // this will never happen with the new chaperone system VREvent_ChaperoneSettingsHaveChanged = 803, VREvent_SeatedZeroPoseReset = 804, VREvent_ChaperoneFlushCache = 805, // Sent when the process needs to reload any cached data it retrieved from VRChaperone() + VREvent_ChaperoneRoomSetupStarting = 806, // Triggered by CVRChaperoneClient::RoomSetupStarting + VREvent_ChaperoneRoomSetupFinished = 807, // Triggered by CVRChaperoneClient::CommitWorkingCopy VREvent_AudioSettingsHaveChanged = 820, @@ -762,6 +808,7 @@ enum EVREventType VREvent_TrackersSectionSettingChanged = 866, VREvent_LastKnownSectionSettingChanged = 867, VREvent_DismissedWarningsSectionSettingChanged = 868, + VREvent_GpuSpeedSectionSettingChanged = 869, VREvent_StatusUpdate = 900, @@ -776,17 +823,17 @@ enum EVREventType VREvent_KeyboardCharInput = 1201, VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard - VREvent_ApplicationTransitionStarted = 1300, - VREvent_ApplicationTransitionAborted = 1301, - VREvent_ApplicationTransitionNewAppStarted = 1302, + //VREvent_ApplicationTransitionStarted = 1300, + //VREvent_ApplicationTransitionAborted = 1301, + //VREvent_ApplicationTransitionNewAppStarted = 1302, VREvent_ApplicationListUpdated = 1303, VREvent_ApplicationMimeTypeLoad = 1304, - VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, + // VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, VREvent_ProcessConnected = 1306, VREvent_ProcessDisconnected = 1307, - VREvent_Compositor_MirrorWindowShown = 1400, - VREvent_Compositor_MirrorWindowHidden = 1401, + //VREvent_Compositor_MirrorWindowShown = 1400, // DEPRECATED + //VREvent_Compositor_MirrorWindowHidden = 1401, // DEPRECATED VREvent_Compositor_ChaperoneBoundsShown = 1410, VREvent_Compositor_ChaperoneBoundsHidden = 1411, VREvent_Compositor_DisplayDisconnected = 1412, @@ -794,6 +841,9 @@ enum EVREventType VREvent_Compositor_HDCPError = 1414, // data is hdcpError VREvent_Compositor_ApplicationNotResponding = 1415, 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, @@ -816,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 @@ -824,6 +875,9 @@ enum EVREventType VREvent_SystemReport_Started = 1900, // user or system initiated generation of a system report. broadcast + VREvent_Monitor_ShowHeadsetView = 2000, // data is process + VREvent_Monitor_HideHeadsetView = 2001, // data is process + // Vendors are free to expose private events in this reserved region VREvent_VendorSpecific_Reserved_Start = 10000, VREvent_VendorSpecific_Reserved_End = 19999, @@ -842,6 +896,7 @@ enum EDeviceActivityLevel k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management) + k_EDeviceActivityLevel_Idle_Timeout = 4, }; @@ -871,9 +926,9 @@ enum EVRButtonId k_EButton_Dashboard_Back = k_EButton_Grip, - k_EButton_Knuckles_A = k_EButton_Grip, - k_EButton_Knuckles_B = k_EButton_ApplicationMenu, - k_EButton_Knuckles_JoyStick = k_EButton_Axis3, + k_EButton_IndexController_A = k_EButton_Grip, + k_EButton_IndexController_B = k_EButton_ApplicationMenu, + k_EButton_IndexController_JoyStick = k_EButton_Axis3, k_EButton_Max = 64 }; @@ -1099,9 +1154,11 @@ enum EShowUIType { ShowUI_ControllerBinding = 0, ShowUI_ManageTrackers = 1, - ShowUI_QuickStart = 2, + // ShowUI_QuickStart = 2, // Deprecated ShowUI_Pairing = 3, ShowUI_Settings = 4, + ShowUI_DebugCommands = 5, + ShowUI_FullControllerBinding = 6, }; struct VREvent_ShowUI_t @@ -1428,7 +1485,7 @@ enum EVRSkeletalTrackingLevel // body part location can be measured directly but with fewer degrees of freedom than the actual body // part. Certain body part positions may be unmeasured by the device and estimated from other input data. - // E.g. Knuckles, gloves that only measure finger curl + // E.g. Index Controllers, gloves that only measure finger curl VRSkeletalTracking_Partial, // Body part location can be measured directly throughout the entire range of motion of the body part. @@ -1505,6 +1562,9 @@ enum EVRInitError VRInitError_Init_VRWebHelperStartupFailed = 141, VRInitError_Init_TrackerManagerInitFailed = 142, VRInitError_Init_AlreadyRunning = 143, + VRInitError_Init_FailedForVrMonitor = 144, + VRInitError_Init_PropertyManagerInitFailed = 145, + VRInitError_Init_WebServerFailed = 146, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1519,6 +1579,8 @@ enum EVRInitError // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons VRInitError_Driver_HmdDriverIdOutOfBounds = 211, VRInitError_Driver_HmdDisplayMirrored = 212, + VRInitError_Driver_HmdDisplayNotFoundLaptop = 213, + // Never make error 259 because we return it from main and it would conflict with STILL_ACTIVE VRInitError_IPC_ServerInitFailed = 300, VRInitError_IPC_ConnectFailed = 301, @@ -1529,6 +1591,8 @@ enum EVRInitError VRInitError_IPC_CompositorConnectFailed = 306, VRInitError_IPC_CompositorInvalidConnectResponse = 307, VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + VRInitError_IPC_ConnectFailedAfterTargetExited = 309, + VRInitError_IPC_NamespaceUnavailable = 310, VRInitError_Compositor_Failed = 400, VRInitError_Compositor_D3D11HardwareRequired = 401, @@ -1615,6 +1679,9 @@ enum EVRInitError VRInitError_Compositor_CreateTextIndexBuffer = 482, VRInitError_Compositor_CreateMirrorTextures = 483, VRInitError_Compositor_CreateLastFrameRenderTexture = 484, + VRInitError_Compositor_CreateMirrorOverlay = 485, + VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486, + VRInitError_Compositor_DisplayModeNotSupported = 487, VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, @@ -1632,6 +1699,7 @@ enum EVRInitError VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, VRInitError_Steam_SteamInstallationNotFound = 2000, @@ -1715,7 +1783,7 @@ struct CameraVideoStreamFrameHeader_t uint32_t nFrameSequence; - TrackedDevicePose_t standingTrackedDevicePose; + TrackedDevicePose_t trackedDevicePose; uint64_t ulFrameExposureTime; // mid-point of the exposure of the image in host system ticks }; @@ -1725,6 +1793,75 @@ typedef uint32_t ScreenshotHandle_t; static const uint32_t k_unScreenshotHandleInvalid = 0; +/** Compositor frame timing reprojection flags. */ +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +const uint32_t VRCompositor_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame + +const uint32_t VRCompositor_PredictionMask = 0x30; // The runtime may predict more than one frame (up to four) ahead if + // it detects the application is taking too long to render. These two + // bits will contain the count of additional frames (normally zero). + // Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from + // the latest frame timing entry. + +const uint32_t VRCompositor_ThrottleMask = 0xC0; // Number of frames the compositor is throttling the application. + // Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from + // the latest frame timing entry. + +#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 ) +#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 6 ) + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + + uint32_t m_nNumVSyncsReadyForUse; + uint32_t m_nNumVSyncsToFirstView; +}; + /** Frame timing data provided by direct mode drivers. */ struct DriverDirectMode_FrameTiming { @@ -1850,29 +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_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 @@ -1919,7 +2057,7 @@ VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t double m_flSyncMarkerError; - TrackedDevicePose_t m_StandingTrackedDevicePose; // Supplied by HMD layer when used as a tracked camera + TrackedDevicePose_t m_RawTrackedDevicePose; // Raw-and-uncalibrated pose, supplied by HMD layer when used as a tracked camera uint64_t m_pImageData; }; @@ -1952,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; @@ -1972,7 +2107,7 @@ namespace vr }; //----------------------------------------------------------------------------- - static const char * const IVRSettings_Version = "IVRSettings_002"; + static const char * const IVRSettings_Version = "IVRSettings_003"; class CVRSettingHelper { @@ -1988,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 ); @@ -2075,21 +2204,28 @@ namespace vr static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; - static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; + static const char * const k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement"; + static const char * const k_pch_SteamVR_ShowBaseStationPowerManagementTip_Int32 = "ShowBaseStationPowerManagementTip"; static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; static const char * const k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; static const char * const k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; + static const char * const k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; - static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_ShowLegacyMirrorView_Bool = "showLegacyMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewVisibility_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewDisplayMode_Int32 = "mirrorViewDisplayMode"; + 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"; @@ -2104,15 +2240,20 @@ 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_InputBindingUIBlock = "inputBindingUI"; + static const char * const k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; static const char * const k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; static const char * const k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; static const char * const k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; static const char * const k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; static const char * const k_pch_SteamVR_LastVersionNotice = "lastVersionNotice"; static const char * const k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB"; + static const char * const k_pch_SteamVR_CustomIconStyle_String = "customIconStyle"; + static const char * const k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle"; + static const char * const k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate"; //----------------------------------------------------------------------------- // direct mode keys @@ -2134,8 +2275,8 @@ namespace vr static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; static const char * const k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; + static const char * const k_pch_Lighthouse_InactivityTimeoutForBaseStations_Int32 = "InactivityTimeoutForBaseStations"; static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; - static const char * const k_pch_Lighthouse_NewPairing_Bool = "newPairing"; //----------------------------------------------------------------------------- // null keys @@ -2183,7 +2324,7 @@ namespace vr static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; static const char * const k_pch_Perf_TestData_Float = "perfTestData"; - static const char * const k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling"; + static const char * const k_pch_Perf_GPUProfiling_Bool = "GPUProfiling"; //----------------------------------------------------------------------------- // collision bounds keys @@ -2197,6 +2338,7 @@ namespace vr static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + static const char * const k_pch_CollisionBounds_EnableDriverImport = "enableDriverBoundsImport"; //----------------------------------------------------------------------------- // camera keys @@ -2215,11 +2357,19 @@ namespace vr //----------------------------------------------------------------------------- // audio keys static const char * const k_pch_audio_Section = "audio"; - static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; - static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; - static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; - static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; - static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_SetOsDefaultPlaybackDevice_Bool = "setOsDefaultPlaybackDevice"; + static const char * const k_pch_audio_EnablePlaybackDeviceOverride_Bool = "enablePlaybackDeviceOverride"; + static const char * const k_pch_audio_PlaybackDeviceOverride_String = "playbackDeviceOverride"; + static const char * const k_pch_audio_PlaybackDeviceOverrideName_String = "playbackDeviceOverrideName"; + static const char * const k_pch_audio_SetOsDefaultRecordingDevice_Bool = "setOsDefaultRecordingDevice"; + static const char * const k_pch_audio_EnableRecordingDeviceOverride_Bool = "enableRecordingDeviceOverride"; + static const char * const k_pch_audio_RecordingDeviceOverride_String = "recordingDeviceOverride"; + static const char * const k_pch_audio_RecordingDeviceOverrideName_String = "recordingDeviceOverrideName"; + static const char * const k_pch_audio_EnablePlaybackMirror_Bool = "enablePlaybackMirror"; + static const char * const k_pch_audio_PlaybackMirrorDevice_String = "playbackMirrorDevice"; + static const char * const k_pch_audio_PlaybackMirrorDeviceName_String = "playbackMirrorDeviceName"; + static const char * const k_pch_audio_OldPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId"; static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; //----------------------------------------------------------------------------- @@ -2237,10 +2387,11 @@ namespace vr static const char * const k_pch_Dashboard_Section = "dashboard"; static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; - static const char * const k_pch_Dashboard_UseWebDashboard = "useWebDashboard"; + 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_UseWebIPD = "useWebIPD"; - static const char * const k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu"; + 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 @@ -2249,12 +2400,11 @@ namespace vr //----------------------------------------------------------------------------- // driver keys - These could be checked in any driver_ section static const char * const k_pch_Driver_Enable_Bool = "enable"; + static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority"; //----------------------------------------------------------------------------- // web interface keys static const char* const k_pch_WebInterface_Section = "WebInterface"; - static const char* const k_pch_WebInterface_WebEnable_Bool = "WebEnable"; - static const char* const k_pch_WebInterface_WebPort_String = "WebPort"; //----------------------------------------------------------------------------- // vrwebhelper keys @@ -2271,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"; //----------------------------------------------------------------------------- @@ -2291,6 +2442,17 @@ namespace vr // Dismissed warnings static const char * const k_pch_DismissedWarnings_Section = "DismissedWarnings"; + //----------------------------------------------------------------------------- + // Input Settings + static const char * const k_pch_Input_Section = "input"; + static const char* const k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation"; + 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 // iservertrackeddevicedriver.h @@ -2685,6 +2847,11 @@ static const char *IVRCompositorPluginProvider_Version = "IVRCompositorPluginPro namespace vr { + /** This container is automatically created before a display redirect device is activated. + * Any properties in this container will be returned when that property is read from the HMD's + * property container. */ + static const PropertyContainerHandle_t k_ulDisplayRedirectContainer = 0x600000003; + enum EPropertyWriteType { PropertyWrite_Set = 0, @@ -2745,6 +2912,9 @@ class CVRPropertyHelpers float GetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); int32_t GetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); uint64_t GetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + HmdVector2_t GetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + HmdVector3_t GetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + HmdVector4_t GetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); /** Returns a single typed property. If the device index is not valid or the property is not a string type this function will * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing @@ -2770,6 +2940,9 @@ class CVRPropertyHelpers ETrackedPropertyError SetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, float fNewValue ); ETrackedPropertyError SetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, int32_t nNewValue ); ETrackedPropertyError SetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, uint64_t ulNewValue ); + ETrackedPropertyError SetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector2_t & vNewValue ); + ETrackedPropertyError SetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector3_t & vNewValue ); + ETrackedPropertyError SetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector4_t & vNewValue ); /** Sets a string property. The new value will be returned on any subsequent call to get this property in any process. */ ETrackedPropertyError SetStringProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const char *pchNewValue ); @@ -2947,7 +3120,6 @@ inline bool CVRPropertyHelpers::GetBoolProperty( PropertyContainerHandle_t ulCon return GetPropertyHelper( ulContainerHandle, prop, pError, false, k_unBoolPropertyTag ); } - inline float CVRPropertyHelpers::GetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) { return GetPropertyHelper( ulContainerHandle, prop, pError, 0.f, k_unFloatPropertyTag ); @@ -2963,6 +3135,24 @@ inline uint64_t CVRPropertyHelpers::GetUint64Property( PropertyContainerHandle_t return GetPropertyHelper( ulContainerHandle, prop, pError, 0, k_unUint64PropertyTag ); } +inline HmdVector2_t CVRPropertyHelpers::GetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + HmdVector2_t defaultval = { 0 }; + return GetPropertyHelper( ulContainerHandle, prop, pError, defaultval, k_unHmdVector2PropertyTag ); +} + +inline HmdVector3_t CVRPropertyHelpers::GetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + HmdVector3_t defaultval = { 0 }; + return GetPropertyHelper( ulContainerHandle, prop, pError, defaultval, k_unHmdVector3PropertyTag ); +} + +inline HmdVector4_t CVRPropertyHelpers::GetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + HmdVector4_t defaultval = { 0 }; + return GetPropertyHelper( ulContainerHandle, prop, pError, defaultval, k_unHmdVector4PropertyTag ); +} + inline ETrackedPropertyError CVRPropertyHelpers::SetBoolProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, bool bNewValue ) { return SetProperty( ulContainerHandle, prop, &bNewValue, sizeof( bNewValue ), k_unBoolPropertyTag ); @@ -2983,6 +3173,21 @@ inline ETrackedPropertyError CVRPropertyHelpers::SetUint64Property( PropertyCont return SetProperty( ulContainerHandle, prop, &ulNewValue, sizeof( ulNewValue ), k_unUint64PropertyTag ); } +inline ETrackedPropertyError CVRPropertyHelpers::SetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector2_t & vNewValue ) +{ + return SetProperty( ulContainerHandle, prop, ( void * ) &vNewValue, sizeof( HmdVector2_t ), k_unHmdVector2PropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector3_t & vNewValue ) +{ + return SetProperty( ulContainerHandle, prop, ( void * ) &vNewValue, sizeof( HmdVector3_t ), k_unHmdVector3PropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector4_t & vNewValue ) +{ + return SetProperty( ulContainerHandle, prop, ( void * ) &vNewValue, sizeof( HmdVector4_t ), k_unHmdVector4PropertyTag ); +} + /** Sets the error return value for a property. This value will be returned on all subsequent requests to get the property */ inline ETrackedPropertyError CVRPropertyHelpers::SetPropertyError( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError eError ) { @@ -3183,6 +3388,10 @@ class IVRServerDriverHost /** Requests that SteamVR be restarted. The provided reason will be displayed to the user and should be in the current locale. */ virtual void RequestRestart( const char *pchLocalizedReason, const char *pchExecutableToStart, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + + /** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame. + * Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */ + virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; }; static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_005"; @@ -3270,10 +3479,10 @@ class IVRWatchdogHost public: /** Client drivers in watchdog mode should call this when they have received a signal from hardware that should * cause SteamVR to start */ - virtual void WatchdogWakeUp() = 0; + virtual void WatchdogWakeUp( vr::ETrackedDeviceClass eDeviceClass ) = 0; }; -static const char *IVRWatchdogHost_Version = "IVRWatchdogHost_001"; +static const char *IVRWatchdogHost_Version = "IVRWatchdogHost_002"; }; @@ -3403,6 +3612,8 @@ class IVRDriverManager virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0; + + virtual bool IsEnabled( vr::DriverId_t nDriver ) const = 0; }; static const char * const IVRDriverManager_Version = "IVRDriverManager_001"; diff --git a/OpenVR/samples/driver_sample/driver_sample.cpp b/OpenVR/samples/driver_sample/driver_sample.cpp index 27dc83b..be8359b 100644 --- a/OpenVR/samples/driver_sample/driver_sample.cpp +++ b/OpenVR/samples/driver_sample/driver_sample.cpp @@ -211,43 +211,6 @@ class CSampleDeviceDriver : public vr::ITrackedDeviceServerDriver, public vr::IV DriverLog( "driver_null: Display Frequency: %f\n", m_flDisplayFrequency ); DriverLog( "driver_null: IPD: %f\n", m_flIPD );*/ - CRegKey key; - TCHAR libPath[MAX_PATH]; - - LONG status = key.Open(HKEY_CURRENT_USER, _T("Software\\TrueOpenVR")); - if (status == ERROR_SUCCESS) - { - ULONG libPathSize = sizeof(libPath); - - #ifdef _WIN64 - status = key.QueryStringValue(_T("Library64"), libPath, &libPathSize); - #else - status = key.QueryStringValue(_T("Library"), libPath, &libPathSize); - #endif - - if (status == ERROR_SUCCESS) - { - - hDll = LoadLibrary(libPath); - GetHMDData = (_GetHMDData)GetProcAddress(hDll, "GetHMDData"); - GetControllersData = (_GetControllersData)GetProcAddress(hDll, "GetControllersData"); - SetControllerData = (_SetControllerData)GetProcAddress(hDll, "SetControllerData"); - SetCentering = (_SetCentering)GetProcAddress(hDll, "SetCentering"); - - if (GetHMDData != NULL && GetHMDData(&MyHMD) == TOVR_SUCCESS) - HMDConnected = true; - - if (GetControllersData != NULL && SetControllerData !=NULL && GetControllersData(&MyCtrl, &MyCtrl2) == TOVR_SUCCESS) - ctrlsConnected = true; - - if (SetCentering == NULL) { - HMDConnected = false; - ctrlsConnected = false; - } - } - } - - key.Close(); } virtual ~CSampleDeviceDriver() @@ -540,92 +503,68 @@ class CSampleControllerDriver : public vr::ITrackedDeviceServerDriver virtual EVRInitError Activate( vr::TrackedDeviceIndex_t unObjectId ) { + switch (ControllerIndex) { case 1: Ctrl1Index_t = unObjectId; - Ctrl1Index_t = vr::VRProperties()->TrackedDeviceToPropertyContainer(Ctrl1Index_t); + m_ulPropertyContainer = vr::VRProperties()->TrackedDeviceToPropertyContainer(Ctrl1Index_t); + vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, Prop_SerialNumber_String, "CTRL1Serial"); + vr::VRProperties()->SetInt32Property(m_ulPropertyContainer, Prop_ControllerRoleHint_Int32, TrackedControllerRole_LeftHand); break; case 2: Ctrl2Index_t = unObjectId; - Ctrl2Index_t = vr::VRProperties()->TrackedDeviceToPropertyContainer(Ctrl2Index_t); + m_ulPropertyContainer = vr::VRProperties()->TrackedDeviceToPropertyContainer(Ctrl2Index_t); + vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, Prop_SerialNumber_String, "CTRL2Serial"); + vr::VRProperties()->SetInt32Property(m_ulPropertyContainer, Prop_ControllerRoleHint_Int32, TrackedControllerRole_RightHand); break; } vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_ControllerType_String, "vive_controller"); - vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_LegacyInputProfile_String, "vive_controller"); vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_ModelNumber_String, "ViveMV"); vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_ManufacturerName_String, "HTC"); vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_RenderModelName_String, "vr_controller_vive_1_5"); vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, Prop_TrackingSystemName_String, "VR Controller"); - vr::VRProperties()->SetInt32Property(m_ulPropertyContainer, Prop_DeviceClass_Int32, TrackedDeviceClass_Controller); - switch (ControllerIndex) - { - case 1: - vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, Prop_SerialNumber_String, "CTRL1Serial"); - break; - case 2: - vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, Prop_SerialNumber_String, "CTRL2Serial"); - break; - } - - uint64_t supportedButtons = 0xFFFFFFFFFFFFFFFFULL; + uint64_t supportedButtons = 0xA4; vr::VRProperties()->SetUint64Property(m_ulPropertyContainer, vr::Prop_SupportedButtons_Uint64, supportedButtons); - // return a constant that's not 0 (invalid) or 1 (reserved for Oculus) - //vr::VRProperties()->SetUint64Property( m_ulPropertyContainer, Prop_CurrentUniverseId_Uint64, 2 ); - // avoid "not fullscreen" warnings from vrmonitor - //vr::VRProperties()->SetBoolProperty( m_ulPropertyContainer, Prop_IsOnDesktop_Bool, false ); - - // our sample device isn't actually tracked, so set this property to avoid having the icon blink in the status window - //vr::VRProperties()->SetBoolProperty( m_ulPropertyContainer, Prop_NeverTracked_Bool, false ); + vr::VRProperties()->SetBoolProperty(m_ulPropertyContainer, Prop_IsOnDesktop_Bool, false); - // even though we won't ever track we want to pretend to be the right hand so binding will work as expected + vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, Prop_InputProfilePath_String, "{tovr}/input/controller_profile.json"); - switch (ControllerIndex) + /*bool bSetupIconUsingExternalResourceFile = false; + if (!bSetupIconUsingExternalResourceFile) { - case 1: - vr::VRProperties()->SetInt32Property(m_ulPropertyContainer, Prop_ControllerRoleHint_Int32, TrackedControllerRole_LeftHand); - break; - case 2: - vr::VRProperties()->SetInt32Property(m_ulPropertyContainer, Prop_ControllerRoleHint_Int32, TrackedControllerRole_RightHand); - break; - } - + // Setup properties directly in code. + // Path values are of the form {drivername}\icons\some_icon_filename.png + vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceOff_String, "{tovr}/icons/barebones_status_off.png"); + vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceReady_String, "{tovr}/icons/barebones_status_ready.png"); + vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceReadyAlert_String, "{tovr}/icons/barebones_status_ready_alert.png"); + vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceNotReady_String, "{tovr}/icons/barebones_status_error.png"); + vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceStandby_String, "{tovr}/icons/barebones_status_standby.png"); + vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceAlertLow_String, "{tovr}/icons/barebones_status_ready_low.png"); + }*/ - // this file tells the UI what to show the user for binding this controller as well as what default bindings should - // be for legacy or other apps - vr::VRProperties()->SetStringProperty( m_ulPropertyContainer, Prop_InputProfilePath_String, "{tovr}/input/mycontroller_profile.json" ); + vr::VRDriverInput()->CreateScalarComponent( m_ulPropertyContainer, "/input/trackpad/x", &HAnalog[0], vr::VRScalarType_Absolute, vr::VRScalarUnits_NormalizedTwoSided); + vr::VRDriverInput()->CreateScalarComponent(m_ulPropertyContainer, "/input/trackpad/y", &HAnalog[1], vr::VRScalarType_Absolute, vr::VRScalarUnits_NormalizedTwoSided); + vr::VRDriverInput()->CreateScalarComponent(m_ulPropertyContainer, "/input/trigger/value", &HAnalog[2], vr::EVRScalarType::VRScalarType_Absolute, vr::EVRScalarUnits::VRScalarUnits_NormalizedOneSided); // Buttons handles vr::VRDriverInput()->CreateBooleanComponent(m_ulPropertyContainer, "/input/application_menu/click", &HButtons[0]); - vr::VRDriverInput()->CreateBooleanComponent(m_ulPropertyContainer, "/input/grip/click", &HButtons[1]); vr::VRDriverInput()->CreateBooleanComponent(m_ulPropertyContainer, "/input/system/click", &HButtons[2]); + + vr::VRDriverInput()->CreateBooleanComponent(m_ulPropertyContainer, "/input/grip/click", &HButtons[1]); + vr::VRDriverInput()->CreateBooleanComponent(m_ulPropertyContainer, "/input/trigger/click", &HButtons[5]); + vr::VRDriverInput()->CreateBooleanComponent(m_ulPropertyContainer, "/input/trackpad/click", &HButtons[3]); vr::VRDriverInput()->CreateBooleanComponent(m_ulPropertyContainer, "/input/trackpad/touch", &HButtons[4]); - // Analog handles - vr::VRDriverInput()->CreateScalarComponent( - m_ulPropertyContainer, "/input/trackpad/x", &HAnalog[0], - vr::VRScalarType_Absolute, vr::VRScalarUnits_NormalizedTwoSided - ); - vr::VRDriverInput()->CreateScalarComponent( - m_ulPropertyContainer, "/input/trackpad/y", &HAnalog[1], - vr::VRScalarType_Absolute, vr::VRScalarUnits_NormalizedTwoSided - ); - vr::VRDriverInput()->CreateScalarComponent( - m_ulPropertyContainer, "/input/trigger/value", &HAnalog[2], - vr::EVRScalarType::VRScalarType_Absolute, vr::EVRScalarUnits::VRScalarUnits_NormalizedOneSided - ); - - vr::VRProperties()->SetInt32Property(m_ulPropertyContainer, vr::Prop_Axis0Type_Int32, vr::k_eControllerAxis_TrackPad); - // create our haptic component - vr::VRDriverInput()->CreateHapticComponent( m_ulPropertyContainer, "/output/haptic", &m_compHaptic); + vr::VRDriverInput()->CreateHapticComponent(m_ulPropertyContainer, "/output/haptic", &m_compHaptic); return VRInitError_None; } @@ -707,7 +646,22 @@ class CSampleControllerDriver : public vr::ITrackedDeviceServerDriver void RunFrame() { - #if defined( _WINDOWS ) + switch (ControllerIndex) + { + case 1: + if (Ctrl1Index_t != vr::k_unTrackedDeviceIndexInvalid) + { + vr::VRServerDriverHost()->TrackedDevicePoseUpdated(Ctrl1Index_t, GetPose(), sizeof(DriverPose_t)); + } + break; + case 2: + if (Ctrl2Index_t != vr::k_unTrackedDeviceIndexInvalid) + { + vr::VRServerDriverHost()->TrackedDevicePoseUpdated(Ctrl2Index_t, GetPose(), sizeof(DriverPose_t)); + } + break; + } + // Your driver would read whatever hardware state is associated with its input components and pass that // in to UpdateBooleanComponent. This could happen in RunFrame or on a thread of your own that's reading USB // state. There's no need to update input state unless it changes, but it doesn't do any harm to do so. @@ -758,25 +712,6 @@ class CSampleControllerDriver : public vr::ITrackedDeviceServerDriver SetCentering(2); } - if (ControllerIndex == 1) { - - if (Ctrl1Index_t != vr::k_unTrackedDeviceIndexInvalid) - { - vr::VRServerDriverHost()->TrackedDevicePoseUpdated(Ctrl1Index_t, GetPose(), sizeof(DriverPose_t)); - } - - } - - if (ControllerIndex == 2) { - - if (Ctrl2Index_t != vr::k_unTrackedDeviceIndexInvalid) - { - vr::VRServerDriverHost()->TrackedDevicePoseUpdated(Ctrl2Index_t, GetPose(), sizeof(DriverPose_t)); - } - - } - -#endif } void ProcessEvent( const vr::VREvent_t & vrEvent ) @@ -818,7 +753,7 @@ class CSampleControllerDriver : public vr::ITrackedDeviceServerDriver //vr::VRInputComponentHandle_t m_compC; vr::VRInputComponentHandle_t m_compHaptic; - vr::VRInputComponentHandle_t HButtons[5], HAnalog[3]; + vr::VRInputComponentHandle_t HButtons[6], HAnalog[3]; //std::string m_sSerialNumber; //std::string m_sModelNumber; }; @@ -851,11 +786,49 @@ EVRInitError CServerDriver_Sample::Init( vr::IVRDriverContext *pDriverContext ) VR_INIT_SERVER_DRIVER_CONTEXT( pDriverContext ); //InitDriverLog( vr::VRDriverLog() ); - //if (HMDConnected) - //{ + CRegKey key; + TCHAR libPath[MAX_PATH]; + + LONG status = key.Open(HKEY_CURRENT_USER, _T("Software\\TrueOpenVR")); + if (status == ERROR_SUCCESS) + { + ULONG libPathSize = sizeof(libPath); + +#ifdef _WIN64 + status = key.QueryStringValue(_T("Library64"), libPath, &libPathSize); +#else + status = key.QueryStringValue(_T("Library"), libPath, &libPathSize); +#endif + + if (status == ERROR_SUCCESS) + { + + hDll = LoadLibrary(libPath); + GetHMDData = (_GetHMDData)GetProcAddress(hDll, "GetHMDData"); + GetControllersData = (_GetControllersData)GetProcAddress(hDll, "GetControllersData"); + SetControllerData = (_SetControllerData)GetProcAddress(hDll, "SetControllerData"); + SetCentering = (_SetCentering)GetProcAddress(hDll, "SetCentering"); + + if (GetHMDData != NULL && GetHMDData(&MyHMD) == TOVR_SUCCESS) + HMDConnected = true; + + if (GetControllersData != NULL && SetControllerData != NULL && GetControllersData(&MyCtrl, &MyCtrl2) == TOVR_SUCCESS) + ctrlsConnected = true; + + if (SetCentering == NULL) { + HMDConnected = false; + ctrlsConnected = false; + } + } + } + + key.Close(); + + if (HMDConnected) + { m_pNullHmdLatest = new CSampleDeviceDriver(); vr::VRServerDriverHost()->TrackedDeviceAdded(m_pNullHmdLatest->GetSerialNumber().c_str(), vr::TrackedDeviceClass_HMD, m_pNullHmdLatest); - //} + } if (ctrlsConnected) { m_pController = new CSampleControllerDriver(); @@ -874,10 +847,10 @@ EVRInitError CServerDriver_Sample::Init( vr::IVRDriverContext *pDriverContext ) void CServerDriver_Sample::Cleanup() { //CleanupDriverLog(); - //if (HMDConnected) { + if (HMDConnected) { delete m_pNullHmdLatest; m_pNullHmdLatest = NULL; - //} + } if (ctrlsConnected) { delete m_pController; diff --git a/TrueOpenVR SteamVR/OpenVR/default.vrsettings b/TrueOpenVR SteamVR/OpenVR/default.vrsettings new file mode 100644 index 0000000..3aa5c36 --- /dev/null +++ b/TrueOpenVR SteamVR/OpenVR/default.vrsettings @@ -0,0 +1,21 @@ +{ + "tovr" : { + "secondsFromVsyncToPhotons" : 0.004999999888241291, + "serialNumber" : "1000", + "renderWidth" : , + "renderHeight" : , + "windowWidth" : , + "windowHeight" : , + "windowX" : , + "windowY" : , + "displayFrequency" : 60, + "ipd" : , + "DistortionK1" : , + "DistortionK2" : , + "ZoomWidth" : 0.8, + "ZoomHeight" : 0.8, + "DistanceBetweenEyes" : 0, + "ScreenOffsetX" : 0, + "DebugMode" : + } +} \ No newline at end of file diff --git a/TrueOpenVR SteamVR/OpenVR/steamvr.vrsettings b/TrueOpenVR SteamVR/OpenVR/steamvr.vrsettings index c97a6ed..4d215a6 100644 --- a/TrueOpenVR SteamVR/OpenVR/steamvr.vrsettings +++ b/TrueOpenVR SteamVR/OpenVR/steamvr.vrsettings @@ -8,24 +8,5 @@ "directMode" : false, "enableHomeApp" : false, "startMonitorFromAppLaunch" : false - }, - "tovr" : { - "secondsFromVsyncToPhotons" : 0.004999999888241291, - "serialNumber" : "1000", - "renderWidth" : , - "renderHeight" : , - "windowWidth" : , - "windowHeight" : , - "windowX" : , - "windowY" : , - "displayFrequency" : 60, - "ipd" : , - "DistortionK1" : , - "DistortionK2" : , - "ZoomWidth" : 0.8, - "ZoomHeight" : 0.8, - "DistanceBetweenEyes" : 0, - "ScreenOffsetX" : 0, - "DebugMode" : } } diff --git a/TrueOpenVR SteamVR/Unit1.pas b/TrueOpenVR SteamVR/Unit1.pas index 2b9b9d5..7552968 100644 --- a/TrueOpenVR SteamVR/Unit1.pas +++ b/TrueOpenVR SteamVR/Unit1.pas @@ -103,13 +103,18 @@ procedure TMain.InstallBtnClick(Sender: TObject); if DirectoryExists(SteamPath) then begin - if FileExists(SteamPath + '\config\steamvr.vrsettings') then - CopyFile(PChar(SteamPath + '\config\steamvr.vrsettings'), PChar(SteamPath + '\config\steamvr.vrsettings.bak'), false); + if FileExists(ExtractFilePath(ParamStr(0)) + 'OpenVR\default.vrsettings') then begin - if FileExists(ExtractFilePath(ParamStr(0)) + 'OpenVR\steamvr.vrsettings') then begin + CreateDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr'); + CreateDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin'); + CreateDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin\win32'); + CreateDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin\win64'); + CreateDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\resources'); + CreateDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\resources\settings'); Config:=TStringList.Create; - Config.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'OpenVR\steamvr.vrsettings'); + Config.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'OpenVR\default.vrsettings'); + Config.Text:=StringReplace(Config.Text, '', IntToStr(RenderWidth), [rfReplaceAll]); Config.Text:=StringReplace(Config.Text, '', IntToStr(RenderHeight), [rfReplaceAll]); @@ -129,23 +134,18 @@ procedure TMain.InstallBtnClick(Sender: TObject); else Config.Text:=StringReplace(Config.Text, '', 'false', [rfReplaceAll]); - Config.SaveToFile(SteamPath + '\config\steamvr.vrsettings'); - + Config.SaveToFile(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\resources\settings\default.vrsettings'); Config.Free; - CreateDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr'); - CreateDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin'); - CreateDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin\win32'); - CreateDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin\win64'); - end else begin - Application.MessageBox('File "steamvr.vrsettings" not found.', PChar(Caption), MB_ICONERROR); + Application.MessageBox('File "default.vrsettings" not found.', PChar(Caption), MB_ICONERROR); Error:=true; end; if not ((CopyFile(PChar(ExtractFilePath(ParamStr(0)) + 'OpenVR\driver.vrdrivermanifest'), PChar(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\driver.vrdrivermanifest'), false)) and (CopyFile(PChar(ExtractFilePath(ParamStr(0)) + 'OpenVR\bin\win32\driver_tovr.dll'), PChar(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin\win32\driver_tovr.dll'), false)) and - (CopyFile(PChar(ExtractFilePath(ParamStr(0)) + 'OpenVR\bin\win64\driver_tovr.dll'), PChar(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin\win64\driver_tovr.dll'), false))) then begin + (CopyFile(PChar(ExtractFilePath(ParamStr(0)) + 'OpenVR\bin\win64\driver_tovr.dll'), PChar(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin\win64\driver_tovr.dll'), false))) + then begin Application.MessageBox('Error copy driver files. Please close Steam and SteamVR.', PChar(Caption), MB_ICONERROR); Error:=true; end; @@ -168,17 +168,17 @@ procedure TMain.CancelBtnClick(Sender: TObject); procedure TMain.UninstallBtnClick(Sender: TObject); begin if DirectoryExists(SteamPath) then begin - if FileExists(SteamPath + '\config\steamvr.vrsettings') then - if FileExists(SteamPath + '\config\steamvr.vrsettings.bak') then begin - CopyFile(PChar(SteamPath + '\config\steamvr.vrsettings.bak'), PChar(SteamPath + '\config\steamvr.vrsettings'), false); - DeleteFile(SteamPath + '\config\steamvr.vrsettings.bak'); - end; DeleteFile(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\driver.vrdrivermanifest'); DeleteFile(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin\win32\driver_tovr.dll'); DeleteFile(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin\win64\driver_tovr.dll'); RemoveDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin\win32'); RemoveDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin\win64'); RemoveDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\bin'); + + DeleteFile(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\resources\settings\default.vrsettings'); + RemoveDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\resources\settings'); + RemoveDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr\resources'); + RemoveDir(SteamPath + '\steamapps\common\SteamVR\drivers\tovr'); Application.MessageBox('Uninstalled', PChar(Caption), MB_ICONINFORMATION); end else