diff --git a/CMakeLists.txt b/CMakeLists.txt index 406a0085..d372198f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,23 @@ cmake_minimum_required(VERSION 2.8) # Set project name. project(OpenVRSDK) +# Fetch the version from the headers +set(VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/headers/openvr.h") + +set(VERSION_MAJOR_REGEX "\tstatic const uint32_t k_nSteamVRVersionMajor = (.+);") +set(VERSION_MINOR_REGEX "\tstatic const uint32_t k_nSteamVRVersionMinor = (.+);") +set(VERSION_BUILD_REGEX "\tstatic const uint32_t k_nSteamVRVersionBuild = (.+);") + +file(STRINGS "${VERSION_FILE}" VERSION_MAJOR_STRING REGEX "${VERSION_MAJOR_REGEX}") +file(STRINGS "${VERSION_FILE}" VERSION_MINOR_STRING REGEX "${VERSION_MINOR_REGEX}") +file(STRINGS "${VERSION_FILE}" VERSION_BUILD_STRING REGEX "${VERSION_BUILD_REGEX}") + +string(REGEX REPLACE "${VERSION_MAJOR_REGEX}" "\\1" VERSION_MAJOR ${VERSION_MAJOR_STRING}) +string(REGEX REPLACE "${VERSION_MINOR_REGEX}" "\\1" VERSION_MINOR ${VERSION_MINOR_STRING}) +string(REGEX REPLACE "${VERSION_BUILD_REGEX}" "\\1" VERSION_BUILD ${VERSION_BUILD_STRING}) + +set(OPENVR_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}") + # Setup some options. option(BUILD_SHARED "Builds the library as shared library" OFF) option(BUILD_FRAMEWORK "Builds the library as an apple Framework" OFF) diff --git a/bin/linux32/libopenvr_api.so b/bin/linux32/libopenvr_api.so index 3c0d73cf..0f92d86f 100755 Binary files a/bin/linux32/libopenvr_api.so and b/bin/linux32/libopenvr_api.so differ diff --git a/bin/linux32/libopenvr_api.so.dbg b/bin/linux32/libopenvr_api.so.dbg index 530371e7..9cac557e 100755 Binary files a/bin/linux32/libopenvr_api.so.dbg and b/bin/linux32/libopenvr_api.so.dbg differ diff --git a/bin/linux64/libopenvr_api.so b/bin/linux64/libopenvr_api.so index 46dac9e7..7ac901f1 100755 Binary files a/bin/linux64/libopenvr_api.so and b/bin/linux64/libopenvr_api.so differ diff --git a/bin/linux64/libopenvr_api.so.dbg b/bin/linux64/libopenvr_api.so.dbg index e9407f19..f265398f 100755 Binary files a/bin/linux64/libopenvr_api.so.dbg and b/bin/linux64/libopenvr_api.so.dbg differ diff --git a/bin/osx32/libopenvr_api.dylib b/bin/osx32/libopenvr_api.dylib index 2e59051c..2f4195f3 100755 Binary files a/bin/osx32/libopenvr_api.dylib and b/bin/osx32/libopenvr_api.dylib differ diff --git a/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib b/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib index 98a45034..33d0864d 100644 Binary files a/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib and b/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib differ diff --git a/bin/win32/openvr_api.dll b/bin/win32/openvr_api.dll index c440068c..d854bc8e 100644 Binary files a/bin/win32/openvr_api.dll and b/bin/win32/openvr_api.dll differ diff --git a/bin/win32/openvr_api.pdb b/bin/win32/openvr_api.pdb index 6edb41db..0193083d 100644 Binary files a/bin/win32/openvr_api.pdb and b/bin/win32/openvr_api.pdb differ diff --git a/bin/win64/openvr_api.dll b/bin/win64/openvr_api.dll index f4ddebdf..6851259c 100644 Binary files a/bin/win64/openvr_api.dll and b/bin/win64/openvr_api.dll differ diff --git a/bin/win64/openvr_api.pdb b/bin/win64/openvr_api.pdb index 168480c2..e63f7de8 100644 Binary files a/bin/win64/openvr_api.pdb and b/bin/win64/openvr_api.pdb differ diff --git a/headers/openvr.h b/headers/openvr.h index c5ffe729..1b1bb962 100644 --- a/headers/openvr.h +++ b/headers/openvr.h @@ -15,8 +15,8 @@ namespace vr { static const uint32_t k_nSteamVRVersionMajor = 1; - static const uint32_t k_nSteamVRVersionMinor = 1; - static const uint32_t k_nSteamVRVersionBuild = 3; + static const uint32_t k_nSteamVRVersionMinor = 2; + static const uint32_t k_nSteamVRVersionBuild = 10; } // namespace vr // vrtypes.h @@ -249,6 +249,14 @@ enum ETrackingUniverseOrigin TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. }; +enum EAdditionalRadioFeatures +{ + AdditionalRadioFeatures_None = 0x00000000, + AdditionalRadioFeatures_HTCLinkBox = 0x00000001, + AdditionalRadioFeatures_InternalDongle = 0x00000002, + AdditionalRadioFeatures_ExternalDongle = 0x00000004, +}; + typedef uint64_t WebConsoleHandle_t; #define INVALID_WEB_CONSOLE_HANDLE ((vr::WebConsoleHandle_t)0) @@ -286,6 +294,7 @@ static const PropertyTypeTag_t k_unSkeletonPropertyTag = 36; static const PropertyTypeTag_t k_unSpatialAnchorPosePropertyTag = 40; static const PropertyTypeTag_t k_unJsonPropertyTag = 41; +static const PropertyTypeTag_t k_unActiveActionSetPropertyTag = 42; static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; @@ -342,6 +351,7 @@ enum ETrackedDeviceProperty Prop_CameraStreamFormat_Int32 = 1041, // ECameraVideoStreamFormat value Prop_AdditionalDeviceSettingsPath_String = 1042, // driver-relative path to additional device and global configuration settings Prop_Identifiable_Bool = 1043, // Whether device supports being identified from vrmonitor (e.g. blink LED, vibrate haptics, etc) + Prop_BootloaderVersion_Uint64 = 1044, // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -412,6 +422,11 @@ enum ETrackedDeviceProperty Prop_ImuFactoryAccelerometerScale_Vector3 = 2067, // reserved 2068 Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069, + Prop_AdditionalRadioFeatures_Uint64 = 2070, + Prop_CameraWhiteBalance_Vector4_Array = 2071, // Prop_NumCameras_Int32-sized array of float[4] RGBG white balance calibration data (max size is vr::k_unMaxCameras) + 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, // Driver requested mura correction properties Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, @@ -646,10 +661,11 @@ enum EVREventType VREvent_MouseButtonUp = 302, // data is mouse VREvent_FocusEnter = 303, // data is overlay VREvent_FocusLeave = 304, // data is overlay - VREvent_Scroll = 305, // data is mouse + VREvent_ScrollDiscrete = 305, // data is scroll VREvent_TouchPadMove = 306, // data is mouse VREvent_OverlayFocusChanged = 307, // data is overlay, global event VREvent_ReloadOverlays = 308, + VREvent_ScrollSmooth = 309, // data is scroll VREvent_InputFocusCaptured = 400, // data is process DEPRECATED VREvent_InputFocusReleased = 401, // data is process DEPRECATED @@ -721,24 +737,25 @@ enum EVREventType VREvent_AudioSettingsHaveChanged = 820, - VREvent_BackgroundSettingHasChanged = 850, - VREvent_CameraSettingsHaveChanged = 851, - VREvent_ReprojectionSettingHasChanged = 852, - VREvent_ModelSkinSettingsHaveChanged = 853, - VREvent_EnvironmentSettingsHaveChanged = 854, - VREvent_PowerSettingsHaveChanged = 855, - VREvent_EnableHomeAppSettingsHaveChanged = 856, - VREvent_SteamVRSectionSettingChanged = 857, - VREvent_LighthouseSectionSettingChanged = 858, - VREvent_NullSectionSettingChanged = 859, - VREvent_UserInterfaceSectionSettingChanged = 860, - VREvent_NotificationsSectionSettingChanged = 861, - VREvent_KeyboardSectionSettingChanged = 862, - VREvent_PerfSectionSettingChanged = 863, - VREvent_DashboardSectionSettingChanged = 864, - VREvent_WebInterfaceSectionSettingChanged = 865, - VREvent_TrackersSectionSettingChanged = 866, - VREvent_LastKnownSectionSettingChanged = 867, + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + VREvent_EnableHomeAppSettingsHaveChanged = 856, + VREvent_SteamVRSectionSettingChanged = 857, + VREvent_LighthouseSectionSettingChanged = 858, + VREvent_NullSectionSettingChanged = 859, + VREvent_UserInterfaceSectionSettingChanged = 860, + VREvent_NotificationsSectionSettingChanged = 861, + VREvent_KeyboardSectionSettingChanged = 862, + VREvent_PerfSectionSettingChanged = 863, + VREvent_DashboardSectionSettingChanged = 864, + VREvent_WebInterfaceSectionSettingChanged = 865, + VREvent_TrackersSectionSettingChanged = 866, + VREvent_LastKnownSectionSettingChanged = 867, + VREvent_DismissedWarningsSectionSettingChanged = 868, VREvent_StatusUpdate = 900, @@ -787,6 +804,7 @@ enum EVREventType VREvent_Input_ActionManifestLoadFailed = 1704, // data is actionManifest VREvent_Input_ProgressUpdate = 1705, // data is progressUpdate VREvent_Input_TrackerActivated = 1706, + VREvent_Input_BindingsUpdated = 1707, VREvent_SpatialAnchors_PoseUpdated = 1800, // data is spatialAnchor. broadcast VREvent_SpatialAnchors_DescriptorUpdated = 1801, // data is spatialAnchor. broadcast @@ -913,6 +931,8 @@ struct VREvent_Process_t uint32_t pid; uint32_t oldPid; bool bForced; + // If the associated event was triggered by a connection loss + bool bConnectionLost; }; @@ -1066,6 +1086,7 @@ enum EShowUIType ShowUI_ControllerBinding = 0, ShowUI_ManageTrackers = 1, ShowUI_QuickStart = 2, + ShowUI_Pairing = 3, }; struct VREvent_ShowUI_t @@ -1472,12 +1493,91 @@ enum EVRInitError VRInitError_IPC_CompositorInvalidConnectResponse = 307, VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, - VRInitError_Compositor_Failed = 400, - VRInitError_Compositor_D3D11HardwareRequired = 401, - VRInitError_Compositor_FirmwareRequiresUpdate = 402, - VRInitError_Compositor_OverlayInitFailed = 403, - VRInitError_Compositor_ScreenshotsInitFailed = 404, - VRInitError_Compositor_UnableToCreateDevice = 405, + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + VRInitError_Compositor_UnableToCreateDevice = 405, + VRInitError_Compositor_SharedStateIsNull = 406, + VRInitError_Compositor_NotificationManagerIsNull = 407, + VRInitError_Compositor_ResourceManagerClientIsNull = 408, + VRInitError_Compositor_MessageOverlaySharedStateInitFailure = 409, + VRInitError_Compositor_PropertiesInterfaceIsNull = 410, + VRInitError_Compositor_CreateFullscreenWindowFailed = 411, + VRInitError_Compositor_SettingsInterfaceIsNull = 412, + VRInitError_Compositor_FailedToShowWindow = 413, + VRInitError_Compositor_DistortInterfaceIsNull = 414, + VRInitError_Compositor_DisplayFrequencyFailure = 415, + VRInitError_Compositor_RendererInitializationFailed = 416, + VRInitError_Compositor_DXGIFactoryInterfaceIsNull = 417, + VRInitError_Compositor_DXGIFactoryCreateFailed = 418, + VRInitError_Compositor_DXGIFactoryQueryFailed = 419, + VRInitError_Compositor_InvalidAdapterDesktop = 420, + VRInitError_Compositor_InvalidHmdAttachment = 421, + VRInitError_Compositor_InvalidOutputDesktop = 422, + VRInitError_Compositor_InvalidDeviceProvided = 423, + VRInitError_Compositor_D3D11RendererInitializationFailed = 424, + VRInitError_Compositor_FailedToFindDisplayMode = 425, + VRInitError_Compositor_FailedToCreateSwapChain = 426, + VRInitError_Compositor_FailedToGetBackBuffer = 427, + VRInitError_Compositor_FailedToCreateRenderTarget = 428, + VRInitError_Compositor_FailedToCreateDXGI2SwapChain = 429, + VRInitError_Compositor_FailedtoGetDXGI2BackBuffer = 430, + VRInitError_Compositor_FailedToCreateDXGI2RenderTarget = 431, + VRInitError_Compositor_FailedToGetDXGIDeviceInterface = 432, + VRInitError_Compositor_SelectDisplayMode = 433, + VRInitError_Compositor_FailedToCreateNvAPIRenderTargets = 434, + VRInitError_Compositor_NvAPISetDisplayMode = 435, + VRInitError_Compositor_FailedToCreateDirectModeDisplay = 436, + VRInitError_Compositor_InvalidHmdPropertyContainer = 437, + VRInitError_Compositor_UpdateDisplayFrequency = 438, + VRInitError_Compositor_CreateRasterizerState = 439, + VRInitError_Compositor_CreateWireframeRasterizerState = 440, + VRInitError_Compositor_CreateSamplerState = 441, + VRInitError_Compositor_CreateClampToBorderSamplerState = 442, + VRInitError_Compositor_CreateAnisoSamplerState = 443, + VRInitError_Compositor_CreateOverlaySamplerState = 444, + VRInitError_Compositor_CreatePanoramaSamplerState = 445, + VRInitError_Compositor_CreateFontSamplerState = 446, + VRInitError_Compositor_CreateNoBlendState = 447, + VRInitError_Compositor_CreateBlendState = 448, + VRInitError_Compositor_CreateAlphaBlendState = 449, + VRInitError_Compositor_CreateBlendStateMaskR = 450, + VRInitError_Compositor_CreateBlendStateMaskG = 451, + VRInitError_Compositor_CreateBlendStateMaskB = 452, + VRInitError_Compositor_CreateDepthStencilState = 453, + VRInitError_Compositor_CreateDepthStencilStateNoWrite = 454, + VRInitError_Compositor_CreateDepthStencilStateNoDepth = 455, + VRInitError_Compositor_CreateFlushTexture = 456, + VRInitError_Compositor_CreateDistortionSurfaces = 457, + VRInitError_Compositor_CreateConstantBuffer = 458, + VRInitError_Compositor_CreateHmdPoseConstantBuffer = 459, + VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer = 460, + VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer = 461, + VRInitError_Compositor_CreateOverlayConstantBuffer = 462, + VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer = 463, + VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer = 464, + VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer = 465, + VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer = 466, + VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer = 467, + VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer = 468, + VRInitError_Compositor_CreateGeomConstantBuffer = 469, + VRInitError_Compositor_CreatePanelMaskConstantBuffer = 470, + VRInitError_Compositor_CreatePixelSimUBO = 471, + VRInitError_Compositor_CreateMSAARenderTextures = 472, + VRInitError_Compositor_CreateResolveRenderTextures = 473, + VRInitError_Compositor_CreateComputeResolveRenderTextures = 474, + VRInitError_Compositor_CreateDriverDirectModeResolveTextures = 475, + VRInitError_Compositor_OpenDriverDirectModeResolveTextures = 476, + VRInitError_Compositor_CreateFallbackSyncTexture = 477, + VRInitError_Compositor_ShareFallbackSyncTexture = 478, + VRInitError_Compositor_CreateOverlayIndexBuffer = 479, + VRInitError_Compositor_CreateOverlayVertextBuffer = 480, + VRInitError_Compositor_CreateTextVertexBuffer = 481, + VRInitError_Compositor_CreateTextIndexBuffer = 482, + VRInitError_Compositor_CreateMirrorTextures = 483, + VRInitError_Compositor_CreateLastFrameRenderTexture = 484, VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, @@ -1556,7 +1656,7 @@ enum EVRDistortionFunctionType { VRDistortionFunctionType_None, VRDistortionFunctionType_FTheta, - VRDistortionFucntionType_Extended_FTheta, + VRDistortionFunctionType_Extended_FTheta, MAX_DISTORTION_FUNCTION_TYPES, }; @@ -2378,13 +2478,14 @@ namespace vr 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_LegacyInputRebinding = "legacyInputRebinding"; 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_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"; //----------------------------------------------------------------------------- // direct mode keys @@ -2542,7 +2643,6 @@ namespace vr 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_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; - static const char* const k_pch_App_ActionManifestURL_String = "ActionManifestURL"; //----------------------------------------------------------------------------- // configuration for trackers @@ -2558,6 +2658,10 @@ namespace vr static const char* const k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; static const char* const k_pch_LastKnown_HMDModel_String = "HMDModel"; + //----------------------------------------------------------------------------- + // Dismissed warnings + static const char * const k_pch_DismissedWarnings_Section = "DismissedWarnings"; + } // namespace vr // ivrchaperone.h @@ -2873,8 +2977,8 @@ class IVRCompositor * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) * - DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app) */ - virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, - VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; /** Get the last set of poses returned by WaitGetPoses. */ virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, @@ -2919,7 +3023,7 @@ class IVRCompositor /** 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; + virtual uint32_t GetFrameTimings( VR_ARRAY_COUNT( nFrames ) Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ @@ -3199,8 +3303,11 @@ namespace vr // Indicates that the overlay should dim/brighten to show gamepad focus VROverlayFlags_ShowGamepadFocus = 5, - // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t - VROverlayFlags_SendVRScrollEvents = 6, + // When this is set the overlay will receive VREvent_ScrollDiscrete events like a mouse wheel. + // Requires mouse input mode. + VROverlayFlags_SendVRDiscreteScrollEvents = 6, + + // Indicates that the overlay would like to receive VROverlayFlags_SendVRTouchpadEvents = 7, // If set this will render a vertical scroll wheel on the primary controller, @@ -3228,6 +3335,10 @@ namespace vr // 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, + + // If this is set the overlay will receive smooth VREvent_ScrollSmooth that emulate trackpad scrolling. + // Requires mouse input mode. + VROverlayFlags_SendVRSmoothScrollEvents = 17, }; enum VRMessageOverlayResponse @@ -4403,9 +4514,12 @@ static const uint64_t k_ulInvalidIOBufferHandle = 0; /** retrieves the property container of an buffer. */ virtual vr::PropertyContainerHandle_t PropertyContainer( vr::IOBufferHandle_t ulBuffer ) = 0; + + /** inexpensively checks for readers to allow writers to fast-fail potentially expensive copies and writes. */ + virtual bool HasReaders( vr::IOBufferHandle_t ulBuffer ) = 0; }; - static const char *IVRIOBuffer_Version = "IVRIOBuffer_001"; + static const char *IVRIOBuffer_Version = "IVRIOBuffer_002"; } // ivrspatialanchors.h diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs index 37ee80a2..840edfd1 100644 --- a/headers/openvr_api.cs +++ b/headers/openvr_api.cs @@ -691,7 +691,7 @@ public struct IVRCompositor internal _GetFrameTiming GetFrameTiming; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetFrameTimings(ref Compositor_FrameTiming pTiming, uint nFrames); + internal delegate uint _GetFrameTimings([In, Out] Compositor_FrameTiming[] pTiming, uint nFrames); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetFrameTimings GetFrameTimings; @@ -1690,6 +1690,11 @@ public struct IVRIOBuffer [MarshalAs(UnmanagedType.FunctionPtr)] internal _PropertyContainer PropertyContainer; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate bool _HasReaders(ulong ulBuffer); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _HasReaders HasReaders; + } [StructLayout(LayoutKind.Sequential)] @@ -2518,9 +2523,9 @@ public bool GetFrameTiming(ref Compositor_FrameTiming pTiming,uint unFramesAgo) bool result = FnTable.GetFrameTiming(ref pTiming,unFramesAgo); return result; } - public uint GetFrameTimings(ref Compositor_FrameTiming pTiming,uint nFrames) + public uint GetFrameTimings(Compositor_FrameTiming [] pTiming) { - uint result = FnTable.GetFrameTimings(ref pTiming,nFrames); + uint result = FnTable.GetFrameTimings(pTiming,(uint) pTiming.Length); return result; } public float GetFrameTimeRemaining() @@ -3621,6 +3626,11 @@ public ulong PropertyContainer(ulong ulBuffer) ulong result = FnTable.PropertyContainer(ulBuffer); return result; } + public bool HasReaders(ulong ulBuffer) + { + bool result = FnTable.HasReaders(ulBuffer); + return result; + } } @@ -3738,6 +3748,13 @@ public enum ETrackingUniverseOrigin TrackingUniverseStanding = 1, TrackingUniverseRawAndUncalibrated = 2, } +public enum EAdditionalRadioFeatures +{ + None = 0, + HTCLinkBox = 1, + InternalDongle = 2, + ExternalDongle = 4, +} public enum ETrackedDeviceProperty { Prop_Invalid = 0, @@ -3785,6 +3802,7 @@ public enum ETrackedDeviceProperty Prop_CameraStreamFormat_Int32 = 1041, Prop_AdditionalDeviceSettingsPath_String = 1042, Prop_Identifiable_Bool = 1043, + Prop_BootloaderVersion_Uint64 = 1044, Prop_ReportsTimeSinceVSync_Bool = 2000, Prop_SecondsFromVsyncToPhotons_Float = 2001, Prop_DisplayFrequency_Float = 2002, @@ -3852,6 +3870,11 @@ public enum ETrackedDeviceProperty Prop_ImuFactoryAccelerometerBias_Vector3 = 2066, Prop_ImuFactoryAccelerometerScale_Vector3 = 2067, Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069, + Prop_AdditionalRadioFeatures_Uint64 = 2070, + Prop_CameraWhiteBalance_Vector4_Array = 2071, + Prop_CameraDistortionFunction_Int32_Array = 2072, + Prop_CameraDistortionCoefficients_Float_Array = 2073, + Prop_ExpectedControllerType_String = 2074, Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, @@ -3975,10 +3998,11 @@ public enum EVREventType VREvent_MouseButtonUp = 302, VREvent_FocusEnter = 303, VREvent_FocusLeave = 304, - VREvent_Scroll = 305, + VREvent_ScrollDiscrete = 305, VREvent_TouchPadMove = 306, VREvent_OverlayFocusChanged = 307, VREvent_ReloadOverlays = 308, + VREvent_ScrollSmooth = 309, VREvent_InputFocusCaptured = 400, VREvent_InputFocusReleased = 401, VREvent_SceneFocusLost = 402, @@ -4054,6 +4078,7 @@ public enum EVREventType VREvent_WebInterfaceSectionSettingChanged = 865, VREvent_TrackersSectionSettingChanged = 866, VREvent_LastKnownSectionSettingChanged = 867, + VREvent_DismissedWarningsSectionSettingChanged = 868, VREvent_StatusUpdate = 900, VREvent_WebInterface_InstallDriverCompleted = 950, VREvent_MCImageUpdated = 1000, @@ -4091,6 +4116,7 @@ public enum EVREventType VREvent_Input_ActionManifestLoadFailed = 1704, VREvent_Input_ProgressUpdate = 1705, VREvent_Input_TrackerActivated = 1706, + VREvent_Input_BindingsUpdated = 1707, VREvent_SpatialAnchors_PoseUpdated = 1800, VREvent_SpatialAnchors_DescriptorUpdated = 1801, VREvent_SpatialAnchors_RequestPoseUpdate = 1802, @@ -4146,6 +4172,7 @@ public enum EShowUIType ShowUI_ControllerBinding = 0, ShowUI_ManageTrackers = 1, ShowUI_QuickStart = 2, + ShowUI_Pairing = 3, } public enum EVRInputError { @@ -4354,6 +4381,85 @@ public enum EVRInitError Compositor_OverlayInitFailed = 403, Compositor_ScreenshotsInitFailed = 404, Compositor_UnableToCreateDevice = 405, + Compositor_SharedStateIsNull = 406, + Compositor_NotificationManagerIsNull = 407, + Compositor_ResourceManagerClientIsNull = 408, + Compositor_MessageOverlaySharedStateInitFailure = 409, + Compositor_PropertiesInterfaceIsNull = 410, + Compositor_CreateFullscreenWindowFailed = 411, + Compositor_SettingsInterfaceIsNull = 412, + Compositor_FailedToShowWindow = 413, + Compositor_DistortInterfaceIsNull = 414, + Compositor_DisplayFrequencyFailure = 415, + Compositor_RendererInitializationFailed = 416, + Compositor_DXGIFactoryInterfaceIsNull = 417, + Compositor_DXGIFactoryCreateFailed = 418, + Compositor_DXGIFactoryQueryFailed = 419, + Compositor_InvalidAdapterDesktop = 420, + Compositor_InvalidHmdAttachment = 421, + Compositor_InvalidOutputDesktop = 422, + Compositor_InvalidDeviceProvided = 423, + Compositor_D3D11RendererInitializationFailed = 424, + Compositor_FailedToFindDisplayMode = 425, + Compositor_FailedToCreateSwapChain = 426, + Compositor_FailedToGetBackBuffer = 427, + Compositor_FailedToCreateRenderTarget = 428, + Compositor_FailedToCreateDXGI2SwapChain = 429, + Compositor_FailedtoGetDXGI2BackBuffer = 430, + Compositor_FailedToCreateDXGI2RenderTarget = 431, + Compositor_FailedToGetDXGIDeviceInterface = 432, + Compositor_SelectDisplayMode = 433, + Compositor_FailedToCreateNvAPIRenderTargets = 434, + Compositor_NvAPISetDisplayMode = 435, + Compositor_FailedToCreateDirectModeDisplay = 436, + Compositor_InvalidHmdPropertyContainer = 437, + Compositor_UpdateDisplayFrequency = 438, + Compositor_CreateRasterizerState = 439, + Compositor_CreateWireframeRasterizerState = 440, + Compositor_CreateSamplerState = 441, + Compositor_CreateClampToBorderSamplerState = 442, + Compositor_CreateAnisoSamplerState = 443, + Compositor_CreateOverlaySamplerState = 444, + Compositor_CreatePanoramaSamplerState = 445, + Compositor_CreateFontSamplerState = 446, + Compositor_CreateNoBlendState = 447, + Compositor_CreateBlendState = 448, + Compositor_CreateAlphaBlendState = 449, + Compositor_CreateBlendStateMaskR = 450, + Compositor_CreateBlendStateMaskG = 451, + Compositor_CreateBlendStateMaskB = 452, + Compositor_CreateDepthStencilState = 453, + Compositor_CreateDepthStencilStateNoWrite = 454, + Compositor_CreateDepthStencilStateNoDepth = 455, + Compositor_CreateFlushTexture = 456, + Compositor_CreateDistortionSurfaces = 457, + Compositor_CreateConstantBuffer = 458, + Compositor_CreateHmdPoseConstantBuffer = 459, + Compositor_CreateHmdPoseStagingConstantBuffer = 460, + Compositor_CreateSharedFrameInfoConstantBuffer = 461, + Compositor_CreateOverlayConstantBuffer = 462, + Compositor_CreateSceneTextureIndexConstantBuffer = 463, + Compositor_CreateReadableSceneTextureIndexConstantBuffer = 464, + Compositor_CreateLayerGraphicsTextureIndexConstantBuffer = 465, + Compositor_CreateLayerComputeTextureIndexConstantBuffer = 466, + Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer = 467, + Compositor_CreateComputeHmdPoseConstantBuffer = 468, + Compositor_CreateGeomConstantBuffer = 469, + Compositor_CreatePanelMaskConstantBuffer = 470, + Compositor_CreatePixelSimUBO = 471, + Compositor_CreateMSAARenderTextures = 472, + Compositor_CreateResolveRenderTextures = 473, + Compositor_CreateComputeResolveRenderTextures = 474, + Compositor_CreateDriverDirectModeResolveTextures = 475, + Compositor_OpenDriverDirectModeResolveTextures = 476, + Compositor_CreateFallbackSyncTexture = 477, + Compositor_ShareFallbackSyncTexture = 478, + Compositor_CreateOverlayIndexBuffer = 479, + Compositor_CreateOverlayVertextBuffer = 480, + Compositor_CreateTextVertexBuffer = 481, + Compositor_CreateTextIndexBuffer = 482, + Compositor_CreateMirrorTextures = 483, + Compositor_CreateLastFrameRenderTexture = 484, VendorSpecific_UnableToConnectToOculusRuntime = 1000, VendorSpecific_WindowsNotInDevMode = 1001, VendorSpecific_HmdFound_CantOpenDevice = 1101, @@ -4423,7 +4529,7 @@ public enum EVRDistortionFunctionType { None = 0, FTheta = 1, - VRDistortionFucntionType_Extended_FTheta = 2, + Extended_FTheta = 2, MAX_DISTORTION_FUNCTION_TYPES = 3, } public enum EVSync @@ -4561,7 +4667,7 @@ public enum VROverlayFlags NoDashboardTab = 3, AcceptsGamepadEvents = 4, ShowGamepadFocus = 5, - SendVRScrollEvents = 6, + SendVRDiscreteScrollEvents = 6, SendVRTouchpadEvents = 7, ShowTouchPadScrollWheel = 8, TransferOwnershipToInternalProcess = 9, @@ -4572,6 +4678,7 @@ public enum VROverlayFlags SortWithNonSceneOverlays = 14, VisibleInDashboard = 15, MakeOverlaysInteractiveIfVisible = 16, + SendVRSmoothScrollEvents = 17, } public enum VRMessageOverlayResponse { @@ -4970,6 +5077,8 @@ public enum EIOBufferMode public uint oldPid; [MarshalAs(UnmanagedType.I1)] public bool bForced; + [MarshalAs(UnmanagedType.I1)] + public bool bConnectionLost; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Overlay_t { @@ -5715,6 +5824,7 @@ public static uint GetInitToken() public const uint k_unSkeletonPropertyTag = 36; public const uint k_unSpatialAnchorPosePropertyTag = 40; public const uint k_unJsonPropertyTag = 41; + public const uint k_unActiveActionSetPropertyTag = 42; public const uint k_unOpenVRInternalReserved_Start = 1000; public const uint k_unOpenVRInternalReserved_End = 10000; public const uint k_unMaxPropertyStringSize = 32768; @@ -5797,13 +5907,14 @@ public static uint GetInitToken() 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_LegacyInputRebinding = "legacyInputRebinding"; public const string k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; public const string k_pch_SteamVR_InputBindingUIBlock = "inputBindingUI"; 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_DirectMode_Section = "direct_mode"; public const string k_pch_DirectMode_Enable_Bool = "enable"; public const string k_pch_DirectMode_Count_Int32 = "count"; @@ -5906,12 +6017,12 @@ public static uint GetInitToken() public const string k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; public const string k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL"; public const string k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; - public const string k_pch_App_ActionManifestURL_String = "ActionManifestURL"; public const string k_pch_Trackers_Section = "trackers"; public const string k_pch_DesktopUI_Section = "DesktopUI"; public const string k_pch_LastKnown_Section = "LastKnown"; 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 IVRScreenshots_Version = "IVRScreenshots_001"; public const string IVRResources_Version = "IVRResources_001"; public const string IVRDriverManager_Version = "IVRDriverManager_001"; @@ -5921,7 +6032,7 @@ public static uint GetInitToken() public const uint k_unMaxBoneNameLength = 32; public const string IVRInput_Version = "IVRInput_005"; public const ulong k_ulInvalidIOBufferHandle = 0; - public const string IVRIOBuffer_Version = "IVRIOBuffer_001"; + public const string IVRIOBuffer_Version = "IVRIOBuffer_002"; public const uint k_ulInvalidSpatialAnchorHandle = 0; public const string IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; diff --git a/headers/openvr_api.json b/headers/openvr_api.json index fab82e8b..7bff8554 100644 --- a/headers/openvr_api.json +++ b/headers/openvr_api.json @@ -89,6 +89,12 @@ ,{"name": "TrackingUniverseStanding","value": "1"} ,{"name": "TrackingUniverseRawAndUncalibrated","value": "2"} ]} +, {"enumname": "vr::EAdditionalRadioFeatures","values": [ + {"name": "AdditionalRadioFeatures_None","value": "0"} + ,{"name": "AdditionalRadioFeatures_HTCLinkBox","value": "1"} + ,{"name": "AdditionalRadioFeatures_InternalDongle","value": "2"} + ,{"name": "AdditionalRadioFeatures_ExternalDongle","value": "4"} +]} , {"enumname": "vr::ETrackedDeviceProperty","values": [ {"name": "Prop_Invalid","value": "0"} ,{"name": "Prop_TrackingSystemName_String","value": "1000"} @@ -135,6 +141,7 @@ ,{"name": "Prop_CameraStreamFormat_Int32","value": "1041"} ,{"name": "Prop_AdditionalDeviceSettingsPath_String","value": "1042"} ,{"name": "Prop_Identifiable_Bool","value": "1043"} + ,{"name": "Prop_BootloaderVersion_Uint64","value": "1044"} ,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"} ,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"} ,{"name": "Prop_DisplayFrequency_Float","value": "2002"} @@ -202,6 +209,11 @@ ,{"name": "Prop_ImuFactoryAccelerometerBias_Vector3","value": "2066"} ,{"name": "Prop_ImuFactoryAccelerometerScale_Vector3","value": "2067"} ,{"name": "Prop_ConfigurationIncludesLighthouse20Features_Bool","value": "2069"} + ,{"name": "Prop_AdditionalRadioFeatures_Uint64","value": "2070"} + ,{"name": "Prop_CameraWhiteBalance_Vector4_Array","value": "2071"} + ,{"name": "Prop_CameraDistortionFunction_Int32_Array","value": "2072"} + ,{"name": "Prop_CameraDistortionCoefficients_Float_Array","value": "2073"} + ,{"name": "Prop_ExpectedControllerType_String","value": "2074"} ,{"name": "Prop_DriverRequestedMuraCorrectionMode_Int32","value": "2200"} ,{"name": "Prop_DriverRequestedMuraFeather_InnerLeft_Int32","value": "2201"} ,{"name": "Prop_DriverRequestedMuraFeather_InnerRight_Int32","value": "2202"} @@ -321,10 +333,11 @@ ,{"name": "VREvent_MouseButtonUp","value": "302"} ,{"name": "VREvent_FocusEnter","value": "303"} ,{"name": "VREvent_FocusLeave","value": "304"} - ,{"name": "VREvent_Scroll","value": "305"} + ,{"name": "VREvent_ScrollDiscrete","value": "305"} ,{"name": "VREvent_TouchPadMove","value": "306"} ,{"name": "VREvent_OverlayFocusChanged","value": "307"} ,{"name": "VREvent_ReloadOverlays","value": "308"} + ,{"name": "VREvent_ScrollSmooth","value": "309"} ,{"name": "VREvent_InputFocusCaptured","value": "400"} ,{"name": "VREvent_InputFocusReleased","value": "401"} ,{"name": "VREvent_SceneFocusLost","value": "402"} @@ -400,6 +413,7 @@ ,{"name": "VREvent_WebInterfaceSectionSettingChanged","value": "865"} ,{"name": "VREvent_TrackersSectionSettingChanged","value": "866"} ,{"name": "VREvent_LastKnownSectionSettingChanged","value": "867"} + ,{"name": "VREvent_DismissedWarningsSectionSettingChanged","value": "868"} ,{"name": "VREvent_StatusUpdate","value": "900"} ,{"name": "VREvent_WebInterface_InstallDriverCompleted","value": "950"} ,{"name": "VREvent_MCImageUpdated","value": "1000"} @@ -437,6 +451,7 @@ ,{"name": "VREvent_Input_ActionManifestLoadFailed","value": "1704"} ,{"name": "VREvent_Input_ProgressUpdate","value": "1705"} ,{"name": "VREvent_Input_TrackerActivated","value": "1706"} + ,{"name": "VREvent_Input_BindingsUpdated","value": "1707"} ,{"name": "VREvent_SpatialAnchors_PoseUpdated","value": "1800"} ,{"name": "VREvent_SpatialAnchors_DescriptorUpdated","value": "1801"} ,{"name": "VREvent_SpatialAnchors_RequestPoseUpdate","value": "1802"} @@ -487,6 +502,7 @@ {"name": "ShowUI_ControllerBinding","value": "0"} ,{"name": "ShowUI_ManageTrackers","value": "1"} ,{"name": "ShowUI_QuickStart","value": "2"} + ,{"name": "ShowUI_Pairing","value": "3"} ]} , {"enumname": "vr::EVRInputError","values": [ {"name": "VRInputError_None","value": "0"} @@ -682,6 +698,85 @@ ,{"name": "VRInitError_Compositor_OverlayInitFailed","value": "403"} ,{"name": "VRInitError_Compositor_ScreenshotsInitFailed","value": "404"} ,{"name": "VRInitError_Compositor_UnableToCreateDevice","value": "405"} + ,{"name": "VRInitError_Compositor_SharedStateIsNull","value": "406"} + ,{"name": "VRInitError_Compositor_NotificationManagerIsNull","value": "407"} + ,{"name": "VRInitError_Compositor_ResourceManagerClientIsNull","value": "408"} + ,{"name": "VRInitError_Compositor_MessageOverlaySharedStateInitFailure","value": "409"} + ,{"name": "VRInitError_Compositor_PropertiesInterfaceIsNull","value": "410"} + ,{"name": "VRInitError_Compositor_CreateFullscreenWindowFailed","value": "411"} + ,{"name": "VRInitError_Compositor_SettingsInterfaceIsNull","value": "412"} + ,{"name": "VRInitError_Compositor_FailedToShowWindow","value": "413"} + ,{"name": "VRInitError_Compositor_DistortInterfaceIsNull","value": "414"} + ,{"name": "VRInitError_Compositor_DisplayFrequencyFailure","value": "415"} + ,{"name": "VRInitError_Compositor_RendererInitializationFailed","value": "416"} + ,{"name": "VRInitError_Compositor_DXGIFactoryInterfaceIsNull","value": "417"} + ,{"name": "VRInitError_Compositor_DXGIFactoryCreateFailed","value": "418"} + ,{"name": "VRInitError_Compositor_DXGIFactoryQueryFailed","value": "419"} + ,{"name": "VRInitError_Compositor_InvalidAdapterDesktop","value": "420"} + ,{"name": "VRInitError_Compositor_InvalidHmdAttachment","value": "421"} + ,{"name": "VRInitError_Compositor_InvalidOutputDesktop","value": "422"} + ,{"name": "VRInitError_Compositor_InvalidDeviceProvided","value": "423"} + ,{"name": "VRInitError_Compositor_D3D11RendererInitializationFailed","value": "424"} + ,{"name": "VRInitError_Compositor_FailedToFindDisplayMode","value": "425"} + ,{"name": "VRInitError_Compositor_FailedToCreateSwapChain","value": "426"} + ,{"name": "VRInitError_Compositor_FailedToGetBackBuffer","value": "427"} + ,{"name": "VRInitError_Compositor_FailedToCreateRenderTarget","value": "428"} + ,{"name": "VRInitError_Compositor_FailedToCreateDXGI2SwapChain","value": "429"} + ,{"name": "VRInitError_Compositor_FailedtoGetDXGI2BackBuffer","value": "430"} + ,{"name": "VRInitError_Compositor_FailedToCreateDXGI2RenderTarget","value": "431"} + ,{"name": "VRInitError_Compositor_FailedToGetDXGIDeviceInterface","value": "432"} + ,{"name": "VRInitError_Compositor_SelectDisplayMode","value": "433"} + ,{"name": "VRInitError_Compositor_FailedToCreateNvAPIRenderTargets","value": "434"} + ,{"name": "VRInitError_Compositor_NvAPISetDisplayMode","value": "435"} + ,{"name": "VRInitError_Compositor_FailedToCreateDirectModeDisplay","value": "436"} + ,{"name": "VRInitError_Compositor_InvalidHmdPropertyContainer","value": "437"} + ,{"name": "VRInitError_Compositor_UpdateDisplayFrequency","value": "438"} + ,{"name": "VRInitError_Compositor_CreateRasterizerState","value": "439"} + ,{"name": "VRInitError_Compositor_CreateWireframeRasterizerState","value": "440"} + ,{"name": "VRInitError_Compositor_CreateSamplerState","value": "441"} + ,{"name": "VRInitError_Compositor_CreateClampToBorderSamplerState","value": "442"} + ,{"name": "VRInitError_Compositor_CreateAnisoSamplerState","value": "443"} + ,{"name": "VRInitError_Compositor_CreateOverlaySamplerState","value": "444"} + ,{"name": "VRInitError_Compositor_CreatePanoramaSamplerState","value": "445"} + ,{"name": "VRInitError_Compositor_CreateFontSamplerState","value": "446"} + ,{"name": "VRInitError_Compositor_CreateNoBlendState","value": "447"} + ,{"name": "VRInitError_Compositor_CreateBlendState","value": "448"} + ,{"name": "VRInitError_Compositor_CreateAlphaBlendState","value": "449"} + ,{"name": "VRInitError_Compositor_CreateBlendStateMaskR","value": "450"} + ,{"name": "VRInitError_Compositor_CreateBlendStateMaskG","value": "451"} + ,{"name": "VRInitError_Compositor_CreateBlendStateMaskB","value": "452"} + ,{"name": "VRInitError_Compositor_CreateDepthStencilState","value": "453"} + ,{"name": "VRInitError_Compositor_CreateDepthStencilStateNoWrite","value": "454"} + ,{"name": "VRInitError_Compositor_CreateDepthStencilStateNoDepth","value": "455"} + ,{"name": "VRInitError_Compositor_CreateFlushTexture","value": "456"} + ,{"name": "VRInitError_Compositor_CreateDistortionSurfaces","value": "457"} + ,{"name": "VRInitError_Compositor_CreateConstantBuffer","value": "458"} + ,{"name": "VRInitError_Compositor_CreateHmdPoseConstantBuffer","value": "459"} + ,{"name": "VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer","value": "460"} + ,{"name": "VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer","value": "461"} + ,{"name": "VRInitError_Compositor_CreateOverlayConstantBuffer","value": "462"} + ,{"name": "VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer","value": "463"} + ,{"name": "VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer","value": "464"} + ,{"name": "VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer","value": "465"} + ,{"name": "VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer","value": "466"} + ,{"name": "VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer","value": "467"} + ,{"name": "VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer","value": "468"} + ,{"name": "VRInitError_Compositor_CreateGeomConstantBuffer","value": "469"} + ,{"name": "VRInitError_Compositor_CreatePanelMaskConstantBuffer","value": "470"} + ,{"name": "VRInitError_Compositor_CreatePixelSimUBO","value": "471"} + ,{"name": "VRInitError_Compositor_CreateMSAARenderTextures","value": "472"} + ,{"name": "VRInitError_Compositor_CreateResolveRenderTextures","value": "473"} + ,{"name": "VRInitError_Compositor_CreateComputeResolveRenderTextures","value": "474"} + ,{"name": "VRInitError_Compositor_CreateDriverDirectModeResolveTextures","value": "475"} + ,{"name": "VRInitError_Compositor_OpenDriverDirectModeResolveTextures","value": "476"} + ,{"name": "VRInitError_Compositor_CreateFallbackSyncTexture","value": "477"} + ,{"name": "VRInitError_Compositor_ShareFallbackSyncTexture","value": "478"} + ,{"name": "VRInitError_Compositor_CreateOverlayIndexBuffer","value": "479"} + ,{"name": "VRInitError_Compositor_CreateOverlayVertextBuffer","value": "480"} + ,{"name": "VRInitError_Compositor_CreateTextVertexBuffer","value": "481"} + ,{"name": "VRInitError_Compositor_CreateTextIndexBuffer","value": "482"} + ,{"name": "VRInitError_Compositor_CreateMirrorTextures","value": "483"} + ,{"name": "VRInitError_Compositor_CreateLastFrameRenderTexture","value": "484"} ,{"name": "VRInitError_VendorSpecific_UnableToConnectToOculusRuntime","value": "1000"} ,{"name": "VRInitError_VendorSpecific_WindowsNotInDevMode","value": "1001"} ,{"name": "VRInitError_VendorSpecific_HmdFound_CantOpenDevice","value": "1101"} @@ -745,7 +840,7 @@ , {"enumname": "vr::EVRDistortionFunctionType","values": [ {"name": "VRDistortionFunctionType_None","value": "0"} ,{"name": "VRDistortionFunctionType_FTheta","value": "1"} - ,{"name": "VRDistortionFucntionType_Extended_FTheta","value": "2"} + ,{"name": "VRDistortionFunctionType_Extended_FTheta","value": "2"} ,{"name": "MAX_DISTORTION_FUNCTION_TYPES","value": "3"} ]} , {"enumname": "vr::EVSync","values": [ @@ -869,7 +964,7 @@ ,{"name": "VROverlayFlags_NoDashboardTab","value": "3"} ,{"name": "VROverlayFlags_AcceptsGamepadEvents","value": "4"} ,{"name": "VROverlayFlags_ShowGamepadFocus","value": "5"} - ,{"name": "VROverlayFlags_SendVRScrollEvents","value": "6"} + ,{"name": "VROverlayFlags_SendVRDiscreteScrollEvents","value": "6"} ,{"name": "VROverlayFlags_SendVRTouchpadEvents","value": "7"} ,{"name": "VROverlayFlags_ShowTouchPadScrollWheel","value": "8"} ,{"name": "VROverlayFlags_TransferOwnershipToInternalProcess","value": "9"} @@ -880,6 +975,7 @@ ,{"name": "VROverlayFlags_SortWithNonSceneOverlays","value": "14"} ,{"name": "VROverlayFlags_VisibleInDashboard","value": "15"} ,{"name": "VROverlayFlags_MakeOverlaysInteractiveIfVisible","value": "16"} + ,{"name": "VROverlayFlags_SendVRSmoothScrollEvents","value": "17"} ]} , {"enumname": "vr::VRMessageOverlayResponse","values": [ {"name": "VRMessageOverlayResponse_ButtonPress_0","value": "0"} @@ -1068,6 +1164,8 @@ "constname": "k_unSpatialAnchorPosePropertyTag","consttype": "const PropertyTypeTag_t", "constval": "40"} ,{ "constname": "k_unJsonPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "41"} +,{ + "constname": "k_unActiveActionSetPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "42"} ,{ "constname": "k_unOpenVRInternalReserved_Start","consttype": "const PropertyTypeTag_t", "constval": "1000"} ,{ @@ -1232,8 +1330,6 @@ "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_LegacyInputRebinding","consttype": "const char *const", "constval": "legacyInputRebinding"} ,{ "constname": "k_pch_SteamVR_DebugInputBinding","consttype": "const char *const", "constval": "debugInputBinding"} ,{ @@ -1246,6 +1342,10 @@ "constname": "k_pch_SteamVR_EnableSafeMode","consttype": "const char *const", "constval": "enableSafeMode"} ,{ "constname": "k_pch_SteamVR_PreferredRefreshRate","consttype": "const char *const", "constval": "preferredRefreshRate"} +,{ + "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_DirectMode_Section","consttype": "const char *const", "constval": "direct_mode"} ,{ @@ -1450,8 +1550,6 @@ "constname": "k_pch_App_BindingCurrentURLSuffix_String","consttype": "const char *const", "constval": "CurrentURL"} ,{ "constname": "k_pch_App_NeedToUpdateAutosaveSuffix_Bool","consttype": "const char *const", "constval": "NeedToUpdateAutosave"} -,{ - "constname": "k_pch_App_ActionManifestURL_String","consttype": "const char *const", "constval": "ActionManifestURL"} ,{ "constname": "k_pch_Trackers_Section","consttype": "const char *const", "constval": "trackers"} ,{ @@ -1462,6 +1560,8 @@ "constname": "k_pch_LastKnown_HMDManufacturer_String","consttype": "const char *const", "constval": "HMDManufacturer"} ,{ "constname": "k_pch_LastKnown_HMDModel_String","consttype": "const char *const", "constval": "HMDModel"} +,{ + "constname": "k_pch_DismissedWarnings_Section","consttype": "const char *const", "constval": "DismissedWarnings"} ,{ "constname": "IVRScreenshots_Version","consttype": "const char *const", "constval": "IVRScreenshots_001"} ,{ @@ -1481,7 +1581,7 @@ ,{ "constname": "k_ulInvalidIOBufferHandle","consttype": "const uint64_t", "constval": "0"} ,{ - "constname": "IVRIOBuffer_Version","consttype": "const char *", "constval": "IVRIOBuffer_001"} + "constname": "IVRIOBuffer_Version","consttype": "const char *", "constval": "IVRIOBuffer_002"} ,{ "constname": "k_ulInvalidSpatialAnchorHandle","consttype": "const SpatialAnchorHandle_t", "constval": "0"} ,{ @@ -1589,7 +1689,8 @@ ,{"struct": "vr::VREvent_Process_t","fields": [ { "fieldname": "pid", "fieldtype": "uint32_t"}, { "fieldname": "oldPid", "fieldtype": "uint32_t"}, -{ "fieldname": "bForced", "fieldtype": "_Bool"}]} +{ "fieldname": "bForced", "fieldtype": "_Bool"}, +{ "fieldname": "bConnectionLost", "fieldtype": "_Bool"}]} ,{"struct": "vr::VREvent_Overlay_t","fields": [ { "fieldname": "overlayHandle", "fieldtype": "uint64_t"}, { "fieldname": "devicePath", "fieldtype": "uint64_t"}]} @@ -3018,7 +3119,7 @@ "methodname": "GetFrameTimings", "returntype": "uint32_t", "params": [ -{ "paramname": "pTiming" ,"paramtype": "struct vr::Compositor_FrameTiming *"}, +{ "paramname": "pTiming" ,"array_count": "nFrames" ,"paramtype": "struct vr::Compositor_FrameTiming *"}, { "paramname": "nFrames" ,"paramtype": "uint32_t"} ] } @@ -4763,6 +4864,14 @@ { "paramname": "ulBuffer" ,"paramtype": "vr::IOBufferHandle_t"} ] } +,{ + "classname": "vr::IVRIOBuffer", + "methodname": "HasReaders", + "returntype": "bool", + "params": [ +{ "paramname": "ulBuffer" ,"paramtype": "vr::IOBufferHandle_t"} + ] +} ,{ "classname": "vr::IVRSpatialAnchors", "methodname": "CreateSpatialAnchorFromDescriptor", diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h index ac420978..01597fde 100644 --- a/headers/openvr_capi.h +++ b/headers/openvr_capi.h @@ -92,6 +92,7 @@ static const unsigned int k_unHapticVibrationPropertyTag = 35; static const unsigned int k_unSkeletonPropertyTag = 36; static const unsigned int k_unSpatialAnchorPosePropertyTag = 40; static const unsigned int k_unJsonPropertyTag = 41; +static const unsigned int k_unActiveActionSetPropertyTag = 42; static const unsigned int k_unOpenVRInternalReserved_Start = 1000; static const unsigned int k_unOpenVRInternalReserved_End = 10000; static const unsigned int k_unMaxPropertyStringSize = 32768; @@ -174,13 +175,14 @@ static const char * k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLoc 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_LegacyInputRebinding = "legacyInputRebinding"; static const char * k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; static const char * k_pch_SteamVR_InputBindingUIBlock = "inputBindingUI"; 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_DirectMode_Section = "direct_mode"; static const char * k_pch_DirectMode_Enable_Bool = "enable"; static const char * k_pch_DirectMode_Count_Int32 = "count"; @@ -283,12 +285,12 @@ 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_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; -static const char * k_pch_App_ActionManifestURL_String = "ActionManifestURL"; static const char * k_pch_Trackers_Section = "trackers"; static const char * k_pch_DesktopUI_Section = "DesktopUI"; 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 * IVRScreenshots_Version = "IVRScreenshots_001"; static const char * IVRResources_Version = "IVRResources_001"; static const char * IVRDriverManager_Version = "IVRDriverManager_001"; @@ -298,7 +300,7 @@ static const unsigned int k_unMaxActionOriginCount = 16; static const unsigned int k_unMaxBoneNameLength = 32; static const char * IVRInput_Version = "IVRInput_005"; static const unsigned long k_ulInvalidIOBufferHandle = 0; -static const char * IVRIOBuffer_Version = "IVRIOBuffer_001"; +static const char * IVRIOBuffer_Version = "IVRIOBuffer_002"; static const unsigned int k_ulInvalidSpatialAnchorHandle = 0; static const char * IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; @@ -367,6 +369,14 @@ typedef enum ETrackingUniverseOrigin ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated = 2, } ETrackingUniverseOrigin; +typedef enum EAdditionalRadioFeatures +{ + EAdditionalRadioFeatures_AdditionalRadioFeatures_None = 0, + EAdditionalRadioFeatures_AdditionalRadioFeatures_HTCLinkBox = 1, + EAdditionalRadioFeatures_AdditionalRadioFeatures_InternalDongle = 2, + EAdditionalRadioFeatures_AdditionalRadioFeatures_ExternalDongle = 4, +} EAdditionalRadioFeatures; + typedef enum ETrackedDeviceProperty { ETrackedDeviceProperty_Prop_Invalid = 0, @@ -414,6 +424,7 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_CameraStreamFormat_Int32 = 1041, ETrackedDeviceProperty_Prop_AdditionalDeviceSettingsPath_String = 1042, ETrackedDeviceProperty_Prop_Identifiable_Bool = 1043, + ETrackedDeviceProperty_Prop_BootloaderVersion_Uint64 = 1044, ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000, ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001, ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002, @@ -481,6 +492,11 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_ImuFactoryAccelerometerBias_Vector3 = 2066, ETrackedDeviceProperty_Prop_ImuFactoryAccelerometerScale_Vector3 = 2067, ETrackedDeviceProperty_Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069, + ETrackedDeviceProperty_Prop_AdditionalRadioFeatures_Uint64 = 2070, + ETrackedDeviceProperty_Prop_CameraWhiteBalance_Vector4_Array = 2071, + ETrackedDeviceProperty_Prop_CameraDistortionFunction_Int32_Array = 2072, + ETrackedDeviceProperty_Prop_CameraDistortionCoefficients_Float_Array = 2073, + ETrackedDeviceProperty_Prop_ExpectedControllerType_String = 2074, ETrackedDeviceProperty_Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, @@ -608,10 +624,11 @@ typedef enum EVREventType EVREventType_VREvent_MouseButtonUp = 302, EVREventType_VREvent_FocusEnter = 303, EVREventType_VREvent_FocusLeave = 304, - EVREventType_VREvent_Scroll = 305, + EVREventType_VREvent_ScrollDiscrete = 305, EVREventType_VREvent_TouchPadMove = 306, EVREventType_VREvent_OverlayFocusChanged = 307, EVREventType_VREvent_ReloadOverlays = 308, + EVREventType_VREvent_ScrollSmooth = 309, EVREventType_VREvent_InputFocusCaptured = 400, EVREventType_VREvent_InputFocusReleased = 401, EVREventType_VREvent_SceneFocusLost = 402, @@ -687,6 +704,7 @@ typedef enum EVREventType EVREventType_VREvent_WebInterfaceSectionSettingChanged = 865, EVREventType_VREvent_TrackersSectionSettingChanged = 866, EVREventType_VREvent_LastKnownSectionSettingChanged = 867, + EVREventType_VREvent_DismissedWarningsSectionSettingChanged = 868, EVREventType_VREvent_StatusUpdate = 900, EVREventType_VREvent_WebInterface_InstallDriverCompleted = 950, EVREventType_VREvent_MCImageUpdated = 1000, @@ -724,6 +742,7 @@ typedef enum EVREventType EVREventType_VREvent_Input_ActionManifestLoadFailed = 1704, EVREventType_VREvent_Input_ProgressUpdate = 1705, EVREventType_VREvent_Input_TrackerActivated = 1706, + EVREventType_VREvent_Input_BindingsUpdated = 1707, EVREventType_VREvent_SpatialAnchors_PoseUpdated = 1800, EVREventType_VREvent_SpatialAnchors_DescriptorUpdated = 1801, EVREventType_VREvent_SpatialAnchors_RequestPoseUpdate = 1802, @@ -784,6 +803,7 @@ typedef enum EShowUIType EShowUIType_ShowUI_ControllerBinding = 0, EShowUIType_ShowUI_ManageTrackers = 1, EShowUIType_ShowUI_QuickStart = 2, + EShowUIType_ShowUI_Pairing = 3, } EShowUIType; typedef enum EVRInputError @@ -1005,6 +1025,85 @@ typedef enum EVRInitError EVRInitError_VRInitError_Compositor_OverlayInitFailed = 403, EVRInitError_VRInitError_Compositor_ScreenshotsInitFailed = 404, EVRInitError_VRInitError_Compositor_UnableToCreateDevice = 405, + EVRInitError_VRInitError_Compositor_SharedStateIsNull = 406, + EVRInitError_VRInitError_Compositor_NotificationManagerIsNull = 407, + EVRInitError_VRInitError_Compositor_ResourceManagerClientIsNull = 408, + EVRInitError_VRInitError_Compositor_MessageOverlaySharedStateInitFailure = 409, + EVRInitError_VRInitError_Compositor_PropertiesInterfaceIsNull = 410, + EVRInitError_VRInitError_Compositor_CreateFullscreenWindowFailed = 411, + EVRInitError_VRInitError_Compositor_SettingsInterfaceIsNull = 412, + EVRInitError_VRInitError_Compositor_FailedToShowWindow = 413, + EVRInitError_VRInitError_Compositor_DistortInterfaceIsNull = 414, + EVRInitError_VRInitError_Compositor_DisplayFrequencyFailure = 415, + EVRInitError_VRInitError_Compositor_RendererInitializationFailed = 416, + EVRInitError_VRInitError_Compositor_DXGIFactoryInterfaceIsNull = 417, + EVRInitError_VRInitError_Compositor_DXGIFactoryCreateFailed = 418, + EVRInitError_VRInitError_Compositor_DXGIFactoryQueryFailed = 419, + EVRInitError_VRInitError_Compositor_InvalidAdapterDesktop = 420, + EVRInitError_VRInitError_Compositor_InvalidHmdAttachment = 421, + EVRInitError_VRInitError_Compositor_InvalidOutputDesktop = 422, + EVRInitError_VRInitError_Compositor_InvalidDeviceProvided = 423, + EVRInitError_VRInitError_Compositor_D3D11RendererInitializationFailed = 424, + EVRInitError_VRInitError_Compositor_FailedToFindDisplayMode = 425, + EVRInitError_VRInitError_Compositor_FailedToCreateSwapChain = 426, + EVRInitError_VRInitError_Compositor_FailedToGetBackBuffer = 427, + EVRInitError_VRInitError_Compositor_FailedToCreateRenderTarget = 428, + EVRInitError_VRInitError_Compositor_FailedToCreateDXGI2SwapChain = 429, + EVRInitError_VRInitError_Compositor_FailedtoGetDXGI2BackBuffer = 430, + EVRInitError_VRInitError_Compositor_FailedToCreateDXGI2RenderTarget = 431, + EVRInitError_VRInitError_Compositor_FailedToGetDXGIDeviceInterface = 432, + EVRInitError_VRInitError_Compositor_SelectDisplayMode = 433, + EVRInitError_VRInitError_Compositor_FailedToCreateNvAPIRenderTargets = 434, + EVRInitError_VRInitError_Compositor_NvAPISetDisplayMode = 435, + EVRInitError_VRInitError_Compositor_FailedToCreateDirectModeDisplay = 436, + EVRInitError_VRInitError_Compositor_InvalidHmdPropertyContainer = 437, + EVRInitError_VRInitError_Compositor_UpdateDisplayFrequency = 438, + EVRInitError_VRInitError_Compositor_CreateRasterizerState = 439, + EVRInitError_VRInitError_Compositor_CreateWireframeRasterizerState = 440, + EVRInitError_VRInitError_Compositor_CreateSamplerState = 441, + EVRInitError_VRInitError_Compositor_CreateClampToBorderSamplerState = 442, + EVRInitError_VRInitError_Compositor_CreateAnisoSamplerState = 443, + EVRInitError_VRInitError_Compositor_CreateOverlaySamplerState = 444, + EVRInitError_VRInitError_Compositor_CreatePanoramaSamplerState = 445, + EVRInitError_VRInitError_Compositor_CreateFontSamplerState = 446, + EVRInitError_VRInitError_Compositor_CreateNoBlendState = 447, + EVRInitError_VRInitError_Compositor_CreateBlendState = 448, + EVRInitError_VRInitError_Compositor_CreateAlphaBlendState = 449, + EVRInitError_VRInitError_Compositor_CreateBlendStateMaskR = 450, + EVRInitError_VRInitError_Compositor_CreateBlendStateMaskG = 451, + EVRInitError_VRInitError_Compositor_CreateBlendStateMaskB = 452, + EVRInitError_VRInitError_Compositor_CreateDepthStencilState = 453, + EVRInitError_VRInitError_Compositor_CreateDepthStencilStateNoWrite = 454, + EVRInitError_VRInitError_Compositor_CreateDepthStencilStateNoDepth = 455, + EVRInitError_VRInitError_Compositor_CreateFlushTexture = 456, + EVRInitError_VRInitError_Compositor_CreateDistortionSurfaces = 457, + EVRInitError_VRInitError_Compositor_CreateConstantBuffer = 458, + EVRInitError_VRInitError_Compositor_CreateHmdPoseConstantBuffer = 459, + EVRInitError_VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer = 460, + EVRInitError_VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer = 461, + EVRInitError_VRInitError_Compositor_CreateOverlayConstantBuffer = 462, + EVRInitError_VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer = 463, + EVRInitError_VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer = 464, + EVRInitError_VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer = 465, + EVRInitError_VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer = 466, + EVRInitError_VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer = 467, + EVRInitError_VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer = 468, + EVRInitError_VRInitError_Compositor_CreateGeomConstantBuffer = 469, + EVRInitError_VRInitError_Compositor_CreatePanelMaskConstantBuffer = 470, + EVRInitError_VRInitError_Compositor_CreatePixelSimUBO = 471, + EVRInitError_VRInitError_Compositor_CreateMSAARenderTextures = 472, + EVRInitError_VRInitError_Compositor_CreateResolveRenderTextures = 473, + EVRInitError_VRInitError_Compositor_CreateComputeResolveRenderTextures = 474, + EVRInitError_VRInitError_Compositor_CreateDriverDirectModeResolveTextures = 475, + EVRInitError_VRInitError_Compositor_OpenDriverDirectModeResolveTextures = 476, + EVRInitError_VRInitError_Compositor_CreateFallbackSyncTexture = 477, + EVRInitError_VRInitError_Compositor_ShareFallbackSyncTexture = 478, + EVRInitError_VRInitError_Compositor_CreateOverlayIndexBuffer = 479, + EVRInitError_VRInitError_Compositor_CreateOverlayVertextBuffer = 480, + EVRInitError_VRInitError_Compositor_CreateTextVertexBuffer = 481, + EVRInitError_VRInitError_Compositor_CreateTextIndexBuffer = 482, + EVRInitError_VRInitError_Compositor_CreateMirrorTextures = 483, + EVRInitError_VRInitError_Compositor_CreateLastFrameRenderTexture = 484, EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, EVRInitError_VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, @@ -1080,7 +1179,7 @@ typedef enum EVRDistortionFunctionType { EVRDistortionFunctionType_VRDistortionFunctionType_None = 0, EVRDistortionFunctionType_VRDistortionFunctionType_FTheta = 1, - EVRDistortionFunctionType_VRDistortionFucntionType_Extended_FTheta = 2, + EVRDistortionFunctionType_VRDistortionFunctionType_Extended_FTheta = 2, EVRDistortionFunctionType_MAX_DISTORTION_FUNCTION_TYPES = 3, } EVRDistortionFunctionType; @@ -1232,7 +1331,7 @@ typedef enum VROverlayFlags VROverlayFlags_NoDashboardTab = 3, VROverlayFlags_AcceptsGamepadEvents = 4, VROverlayFlags_ShowGamepadFocus = 5, - VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRDiscreteScrollEvents = 6, VROverlayFlags_SendVRTouchpadEvents = 7, VROverlayFlags_ShowTouchPadScrollWheel = 8, VROverlayFlags_TransferOwnershipToInternalProcess = 9, @@ -1243,6 +1342,7 @@ typedef enum VROverlayFlags VROverlayFlags_SortWithNonSceneOverlays = 14, VROverlayFlags_VisibleInDashboard = 15, VROverlayFlags_MakeOverlaysInteractiveIfVisible = 16, + VROverlayFlags_SendVRSmoothScrollEvents = 17, } VROverlayFlags; typedef enum VRMessageOverlayResponse @@ -1643,6 +1743,7 @@ typedef struct VREvent_Process_t uint32_t pid; uint32_t oldPid; bool bForced; + bool bConnectionLost; } VREvent_Process_t; typedef struct VREvent_Overlay_t @@ -2534,6 +2635,7 @@ struct VR_IVRIOBuffer_FnTable EIOBufferError (OPENVR_FNTABLE_CALLTYPE *Read)(IOBufferHandle_t ulBuffer, void * pDst, uint32_t unBytes, uint32_t * punRead); EIOBufferError (OPENVR_FNTABLE_CALLTYPE *Write)(IOBufferHandle_t ulBuffer, void * pSrc, uint32_t unBytes); PropertyContainerHandle_t (OPENVR_FNTABLE_CALLTYPE *PropertyContainer)(IOBufferHandle_t ulBuffer); + bool (OPENVR_FNTABLE_CALLTYPE *HasReaders)(IOBufferHandle_t ulBuffer); }; struct VR_IVRSpatialAnchors_FnTable diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h index b8c69529..f46dc74d 100644 --- a/headers/openvr_driver.h +++ b/headers/openvr_driver.h @@ -15,8 +15,8 @@ namespace vr { static const uint32_t k_nSteamVRVersionMajor = 1; - static const uint32_t k_nSteamVRVersionMinor = 1; - static const uint32_t k_nSteamVRVersionBuild = 3; + static const uint32_t k_nSteamVRVersionMinor = 2; + static const uint32_t k_nSteamVRVersionBuild = 10; } // namespace vr // vrtypes.h @@ -249,6 +249,14 @@ enum ETrackingUniverseOrigin TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. }; +enum EAdditionalRadioFeatures +{ + AdditionalRadioFeatures_None = 0x00000000, + AdditionalRadioFeatures_HTCLinkBox = 0x00000001, + AdditionalRadioFeatures_InternalDongle = 0x00000002, + AdditionalRadioFeatures_ExternalDongle = 0x00000004, +}; + typedef uint64_t WebConsoleHandle_t; #define INVALID_WEB_CONSOLE_HANDLE ((vr::WebConsoleHandle_t)0) @@ -286,6 +294,7 @@ static const PropertyTypeTag_t k_unSkeletonPropertyTag = 36; static const PropertyTypeTag_t k_unSpatialAnchorPosePropertyTag = 40; static const PropertyTypeTag_t k_unJsonPropertyTag = 41; +static const PropertyTypeTag_t k_unActiveActionSetPropertyTag = 42; static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; @@ -342,6 +351,7 @@ enum ETrackedDeviceProperty Prop_CameraStreamFormat_Int32 = 1041, // ECameraVideoStreamFormat value Prop_AdditionalDeviceSettingsPath_String = 1042, // driver-relative path to additional device and global configuration settings Prop_Identifiable_Bool = 1043, // Whether device supports being identified from vrmonitor (e.g. blink LED, vibrate haptics, etc) + Prop_BootloaderVersion_Uint64 = 1044, // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -412,6 +422,11 @@ enum ETrackedDeviceProperty Prop_ImuFactoryAccelerometerScale_Vector3 = 2067, // reserved 2068 Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069, + Prop_AdditionalRadioFeatures_Uint64 = 2070, + Prop_CameraWhiteBalance_Vector4_Array = 2071, // Prop_NumCameras_Int32-sized array of float[4] RGBG white balance calibration data (max size is vr::k_unMaxCameras) + 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, // Driver requested mura correction properties Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, @@ -646,10 +661,11 @@ enum EVREventType VREvent_MouseButtonUp = 302, // data is mouse VREvent_FocusEnter = 303, // data is overlay VREvent_FocusLeave = 304, // data is overlay - VREvent_Scroll = 305, // data is mouse + VREvent_ScrollDiscrete = 305, // data is scroll VREvent_TouchPadMove = 306, // data is mouse VREvent_OverlayFocusChanged = 307, // data is overlay, global event VREvent_ReloadOverlays = 308, + VREvent_ScrollSmooth = 309, // data is scroll VREvent_InputFocusCaptured = 400, // data is process DEPRECATED VREvent_InputFocusReleased = 401, // data is process DEPRECATED @@ -721,24 +737,25 @@ enum EVREventType VREvent_AudioSettingsHaveChanged = 820, - VREvent_BackgroundSettingHasChanged = 850, - VREvent_CameraSettingsHaveChanged = 851, - VREvent_ReprojectionSettingHasChanged = 852, - VREvent_ModelSkinSettingsHaveChanged = 853, - VREvent_EnvironmentSettingsHaveChanged = 854, - VREvent_PowerSettingsHaveChanged = 855, - VREvent_EnableHomeAppSettingsHaveChanged = 856, - VREvent_SteamVRSectionSettingChanged = 857, - VREvent_LighthouseSectionSettingChanged = 858, - VREvent_NullSectionSettingChanged = 859, - VREvent_UserInterfaceSectionSettingChanged = 860, - VREvent_NotificationsSectionSettingChanged = 861, - VREvent_KeyboardSectionSettingChanged = 862, - VREvent_PerfSectionSettingChanged = 863, - VREvent_DashboardSectionSettingChanged = 864, - VREvent_WebInterfaceSectionSettingChanged = 865, - VREvent_TrackersSectionSettingChanged = 866, - VREvent_LastKnownSectionSettingChanged = 867, + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + VREvent_EnableHomeAppSettingsHaveChanged = 856, + VREvent_SteamVRSectionSettingChanged = 857, + VREvent_LighthouseSectionSettingChanged = 858, + VREvent_NullSectionSettingChanged = 859, + VREvent_UserInterfaceSectionSettingChanged = 860, + VREvent_NotificationsSectionSettingChanged = 861, + VREvent_KeyboardSectionSettingChanged = 862, + VREvent_PerfSectionSettingChanged = 863, + VREvent_DashboardSectionSettingChanged = 864, + VREvent_WebInterfaceSectionSettingChanged = 865, + VREvent_TrackersSectionSettingChanged = 866, + VREvent_LastKnownSectionSettingChanged = 867, + VREvent_DismissedWarningsSectionSettingChanged = 868, VREvent_StatusUpdate = 900, @@ -787,6 +804,7 @@ enum EVREventType VREvent_Input_ActionManifestLoadFailed = 1704, // data is actionManifest VREvent_Input_ProgressUpdate = 1705, // data is progressUpdate VREvent_Input_TrackerActivated = 1706, + VREvent_Input_BindingsUpdated = 1707, VREvent_SpatialAnchors_PoseUpdated = 1800, // data is spatialAnchor. broadcast VREvent_SpatialAnchors_DescriptorUpdated = 1801, // data is spatialAnchor. broadcast @@ -913,6 +931,8 @@ struct VREvent_Process_t uint32_t pid; uint32_t oldPid; bool bForced; + // If the associated event was triggered by a connection loss + bool bConnectionLost; }; @@ -1066,6 +1086,7 @@ enum EShowUIType ShowUI_ControllerBinding = 0, ShowUI_ManageTrackers = 1, ShowUI_QuickStart = 2, + ShowUI_Pairing = 3, }; struct VREvent_ShowUI_t @@ -1472,12 +1493,91 @@ enum EVRInitError VRInitError_IPC_CompositorInvalidConnectResponse = 307, VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, - VRInitError_Compositor_Failed = 400, - VRInitError_Compositor_D3D11HardwareRequired = 401, - VRInitError_Compositor_FirmwareRequiresUpdate = 402, - VRInitError_Compositor_OverlayInitFailed = 403, - VRInitError_Compositor_ScreenshotsInitFailed = 404, - VRInitError_Compositor_UnableToCreateDevice = 405, + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + VRInitError_Compositor_UnableToCreateDevice = 405, + VRInitError_Compositor_SharedStateIsNull = 406, + VRInitError_Compositor_NotificationManagerIsNull = 407, + VRInitError_Compositor_ResourceManagerClientIsNull = 408, + VRInitError_Compositor_MessageOverlaySharedStateInitFailure = 409, + VRInitError_Compositor_PropertiesInterfaceIsNull = 410, + VRInitError_Compositor_CreateFullscreenWindowFailed = 411, + VRInitError_Compositor_SettingsInterfaceIsNull = 412, + VRInitError_Compositor_FailedToShowWindow = 413, + VRInitError_Compositor_DistortInterfaceIsNull = 414, + VRInitError_Compositor_DisplayFrequencyFailure = 415, + VRInitError_Compositor_RendererInitializationFailed = 416, + VRInitError_Compositor_DXGIFactoryInterfaceIsNull = 417, + VRInitError_Compositor_DXGIFactoryCreateFailed = 418, + VRInitError_Compositor_DXGIFactoryQueryFailed = 419, + VRInitError_Compositor_InvalidAdapterDesktop = 420, + VRInitError_Compositor_InvalidHmdAttachment = 421, + VRInitError_Compositor_InvalidOutputDesktop = 422, + VRInitError_Compositor_InvalidDeviceProvided = 423, + VRInitError_Compositor_D3D11RendererInitializationFailed = 424, + VRInitError_Compositor_FailedToFindDisplayMode = 425, + VRInitError_Compositor_FailedToCreateSwapChain = 426, + VRInitError_Compositor_FailedToGetBackBuffer = 427, + VRInitError_Compositor_FailedToCreateRenderTarget = 428, + VRInitError_Compositor_FailedToCreateDXGI2SwapChain = 429, + VRInitError_Compositor_FailedtoGetDXGI2BackBuffer = 430, + VRInitError_Compositor_FailedToCreateDXGI2RenderTarget = 431, + VRInitError_Compositor_FailedToGetDXGIDeviceInterface = 432, + VRInitError_Compositor_SelectDisplayMode = 433, + VRInitError_Compositor_FailedToCreateNvAPIRenderTargets = 434, + VRInitError_Compositor_NvAPISetDisplayMode = 435, + VRInitError_Compositor_FailedToCreateDirectModeDisplay = 436, + VRInitError_Compositor_InvalidHmdPropertyContainer = 437, + VRInitError_Compositor_UpdateDisplayFrequency = 438, + VRInitError_Compositor_CreateRasterizerState = 439, + VRInitError_Compositor_CreateWireframeRasterizerState = 440, + VRInitError_Compositor_CreateSamplerState = 441, + VRInitError_Compositor_CreateClampToBorderSamplerState = 442, + VRInitError_Compositor_CreateAnisoSamplerState = 443, + VRInitError_Compositor_CreateOverlaySamplerState = 444, + VRInitError_Compositor_CreatePanoramaSamplerState = 445, + VRInitError_Compositor_CreateFontSamplerState = 446, + VRInitError_Compositor_CreateNoBlendState = 447, + VRInitError_Compositor_CreateBlendState = 448, + VRInitError_Compositor_CreateAlphaBlendState = 449, + VRInitError_Compositor_CreateBlendStateMaskR = 450, + VRInitError_Compositor_CreateBlendStateMaskG = 451, + VRInitError_Compositor_CreateBlendStateMaskB = 452, + VRInitError_Compositor_CreateDepthStencilState = 453, + VRInitError_Compositor_CreateDepthStencilStateNoWrite = 454, + VRInitError_Compositor_CreateDepthStencilStateNoDepth = 455, + VRInitError_Compositor_CreateFlushTexture = 456, + VRInitError_Compositor_CreateDistortionSurfaces = 457, + VRInitError_Compositor_CreateConstantBuffer = 458, + VRInitError_Compositor_CreateHmdPoseConstantBuffer = 459, + VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer = 460, + VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer = 461, + VRInitError_Compositor_CreateOverlayConstantBuffer = 462, + VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer = 463, + VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer = 464, + VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer = 465, + VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer = 466, + VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer = 467, + VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer = 468, + VRInitError_Compositor_CreateGeomConstantBuffer = 469, + VRInitError_Compositor_CreatePanelMaskConstantBuffer = 470, + VRInitError_Compositor_CreatePixelSimUBO = 471, + VRInitError_Compositor_CreateMSAARenderTextures = 472, + VRInitError_Compositor_CreateResolveRenderTextures = 473, + VRInitError_Compositor_CreateComputeResolveRenderTextures = 474, + VRInitError_Compositor_CreateDriverDirectModeResolveTextures = 475, + VRInitError_Compositor_OpenDriverDirectModeResolveTextures = 476, + VRInitError_Compositor_CreateFallbackSyncTexture = 477, + VRInitError_Compositor_ShareFallbackSyncTexture = 478, + VRInitError_Compositor_CreateOverlayIndexBuffer = 479, + VRInitError_Compositor_CreateOverlayVertextBuffer = 480, + VRInitError_Compositor_CreateTextVertexBuffer = 481, + VRInitError_Compositor_CreateTextIndexBuffer = 482, + VRInitError_Compositor_CreateMirrorTextures = 483, + VRInitError_Compositor_CreateLastFrameRenderTexture = 484, VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, @@ -1556,7 +1656,7 @@ enum EVRDistortionFunctionType { VRDistortionFunctionType_None, VRDistortionFunctionType_FTheta, - VRDistortionFucntionType_Extended_FTheta, + VRDistortionFunctionType_Extended_FTheta, MAX_DISTORTION_FUNCTION_TYPES, }; @@ -1699,6 +1799,7 @@ enum ECameraVideoStreamFormat CVS_FORMAT_NV12_2 = 4, // 12 bits per pixel, 2x height CVS_FORMAT_YUYV16 = 5, // 16 bits per pixel CVS_FORMAT_BAYER16BG = 6, // 16 bits per pixel, 10-bit BG-format Bayer, see https://docs.opencv.org/3.1.0/de/d25/imgproc_color_conversions.html + CVS_FORMAT_MJPEG = 7, // variable-sized MJPEG Open DML format, see https://www.loc.gov/preservation/digital/formats/fdd/fdd000063.shtml CVS_MAX_FORMATS }; @@ -1736,8 +1837,8 @@ enum ETrackedCameraRoomViewMode #define VR_CAMERA_DECL_ALIGN( x ) // #endif -#define MAX_CAMERAS 4 -#define MAX_CAMERA_FRAME_SHARED_HANDLES 4 +static const uint32_t k_unMaxCameras = 4; +static const uint32_t k_unMaxCameraFrameSharedHandles = 4; VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t { @@ -1960,13 +2061,14 @@ namespace vr 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_LegacyInputRebinding = "legacyInputRebinding"; 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_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"; //----------------------------------------------------------------------------- // direct mode keys @@ -2124,7 +2226,6 @@ namespace vr 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_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; - static const char* const k_pch_App_ActionManifestURL_String = "ActionManifestURL"; //----------------------------------------------------------------------------- // configuration for trackers @@ -2140,6 +2241,10 @@ namespace vr static const char* const k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; static const char* const k_pch_LastKnown_HMDModel_String = "HMDModel"; + //----------------------------------------------------------------------------- + // Dismissed warnings + static const char * const k_pch_DismissedWarnings_Section = "DismissedWarnings"; + } // namespace vr // iservertrackeddevicedriver.h @@ -3228,9 +3333,12 @@ static const uint64_t k_ulInvalidIOBufferHandle = 0; /** retrieves the property container of an buffer. */ virtual vr::PropertyContainerHandle_t PropertyContainer( vr::IOBufferHandle_t ulBuffer ) = 0; + + /** inexpensively checks for readers to allow writers to fast-fail potentially expensive copies and writes. */ + virtual bool HasReaders( vr::IOBufferHandle_t ulBuffer ) = 0; }; - static const char *IVRIOBuffer_Version = "IVRIOBuffer_001"; + static const char *IVRIOBuffer_Version = "IVRIOBuffer_002"; } // ivrdrivermanager.h diff --git a/lib/linux32/libopenvr_api.so b/lib/linux32/libopenvr_api.so index 552f31fc..a3cfe99f 100755 Binary files a/lib/linux32/libopenvr_api.so and b/lib/linux32/libopenvr_api.so differ diff --git a/lib/linux64/libopenvr_api.so b/lib/linux64/libopenvr_api.so index 55520749..c26673a5 100755 Binary files a/lib/linux64/libopenvr_api.so and b/lib/linux64/libopenvr_api.so differ diff --git a/samples/bin/linux64/libopenvr_api.so b/samples/bin/linux64/libopenvr_api.so index 46dac9e7..7ac901f1 100644 Binary files a/samples/bin/linux64/libopenvr_api.so and b/samples/bin/linux64/libopenvr_api.so differ diff --git a/samples/bin/osx32/libopenvr_api.dylib b/samples/bin/osx32/libopenvr_api.dylib index 2e59051c..2f4195f3 100644 Binary files a/samples/bin/osx32/libopenvr_api.dylib and b/samples/bin/osx32/libopenvr_api.dylib differ diff --git a/samples/bin/win32/openvr_api.dll b/samples/bin/win32/openvr_api.dll index c440068c..d854bc8e 100644 Binary files a/samples/bin/win32/openvr_api.dll and b/samples/bin/win32/openvr_api.dll differ diff --git a/samples/bin/win64/openvr_api.dll b/samples/bin/win64/openvr_api.dll index f4ddebdf..6851259c 100644 Binary files a/samples/bin/win64/openvr_api.dll and b/samples/bin/win64/openvr_api.dll differ diff --git a/samples/shared/lodepng.cpp b/samples/shared/lodepng.cpp index d57a9d94..2f005189 100644 --- a/samples/shared/lodepng.cpp +++ b/samples/shared/lodepng.cpp @@ -791,7 +791,7 @@ unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequen init_coins(prev_row, coinmem); /*first row, lowest denominator*/ - error = append_symbol_coins(coins, frequencies, numcodes, sum); + error = append_symbol_coins(coins, frequencies, (unsigned int)numcodes, sum); numcoins = numpresent; qsort(coins, numcoins, sizeof(Coin), coin_compare); if(!error) @@ -803,7 +803,7 @@ unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequen Coin* tempcoins; /*swap prev_row and coins, and their amounts*/ tempcoins = prev_row; prev_row = coins; coins = tempcoins; - tempnum = numprev; numprev = numcoins; numcoins = tempnum; + tempnum = numprev; numprev = (unsigned int)numcoins; numcoins = tempnum; cleanup_coins(coins, numcoins); init_coins(coins, numcoins); @@ -821,7 +821,7 @@ unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequen /*fill in all the original symbols again*/ if(j < maxbitlen) { - error = append_symbol_coins(coins + numcoins, frequencies, numcodes, sum); + error = append_symbol_coins(coins + numcoins, frequencies, (unsigned int)numcodes, sum); numcoins += numpresent; } qsort(coins, numcoins, sizeof(Coin), coin_compare); @@ -1429,11 +1429,11 @@ static void updateHashChain(Hash* hash, size_t wpos, unsigned hashval, unsigned { hash->val[wpos] = (int)hashval; if(hash->head[hashval] != -1) hash->chain[wpos] = hash->head[hashval]; - hash->head[hashval] = wpos; + hash->head[hashval] = (int)wpos; hash->zeros[wpos] = numzeros; if(hash->headz[numzeros] != -1) hash->chainz[wpos] = hash->headz[numzeros]; - hash->headz[numzeros] = wpos; + hash->headz[numzeros] = (int)wpos; } /* @@ -1505,7 +1505,7 @@ static unsigned encodeLZ77(uivector* out, Hash* hash, for(;;) { if(chainlength++ >= maxchainlength) break; - current_offset = hashpos <= wpos ? wpos - hashpos : wpos - hashpos + windowsize; + current_offset = hashpos <= wpos ? (unsigned int)wpos - hashpos : (unsigned int)wpos - hashpos + windowsize; if(current_offset < prev_offset) break; /*stop when went completely around the circular buffer*/ prev_offset = current_offset; @@ -3423,13 +3423,13 @@ unsigned lodepng_convert(unsigned char* out, const unsigned char* in, if(mode_out->colortype == LCT_PALETTE) { - size_t palsize = 1u << mode_out->bitdepth; + size_t palsize = (unsigned int)(1u << mode_out->bitdepth); if(mode_out->palettesize < palsize) palsize = mode_out->palettesize; color_tree_init(&tree); for(i = 0; i < palsize; i++) { unsigned char* p = &mode_out->palette[i * 4]; - color_tree_add(&tree, p[0], p[1], p[2], p[3], i); + color_tree_add(&tree, p[0], p[1], p[2], p[3], (unsigned int)i); } } @@ -4222,7 +4222,7 @@ static unsigned readChunk_tEXt(LodePNGInfo* info, const unsigned char* data, siz string2_begin = length + 1; /*skip keyword null terminator*/ - length = chunkLength < string2_begin ? 0 : chunkLength - string2_begin; + length = chunkLength < string2_begin ? 0 : (unsigned int)chunkLength - string2_begin; str = (char*)lodepng_malloc(length + 1); if(!str) CERROR_BREAK(error, 83); /*alloc fail*/ @@ -4270,7 +4270,7 @@ static unsigned readChunk_zTXt(LodePNGInfo* info, const LodePNGDecompressSetting string2_begin = length + 2; if(string2_begin > chunkLength) CERROR_BREAK(error, 75); /*no null termination, corrupt?*/ - length = chunkLength - string2_begin; + length = (unsigned int)chunkLength - string2_begin; /*will fail if zlib error, e.g. if length is too small*/ error = zlib_decompress(&decoded.data, &decoded.size, (unsigned char*)(&data[string2_begin]), @@ -4350,7 +4350,7 @@ static unsigned readChunk_iTXt(LodePNGInfo* info, const LodePNGDecompressSetting /*read the actual text*/ begin += length + 1; - length = chunkLength < begin ? 0 : chunkLength - begin; + length = chunkLength < begin ? 0 : (unsigned int)chunkLength - begin; if(compressed) { @@ -5271,7 +5271,7 @@ static unsigned filter(unsigned char* out, const unsigned char* in, unsigned w, { for(type = 0; type < 5; type++) { - unsigned testsize = attempt[type].size; + unsigned testsize = (unsigned)attempt[type].size; /*if(testsize > 8) testsize /= 8;*/ /*it already works good enough by testing a part of the row*/ filterScanline(attempt[type].data, &in[y * linebytes], prevline, linebytes, bytewidth, type); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8ac19f9b..29b69c5c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,6 +2,7 @@ project(openvr_api) set( LIBNAME "openvr_api" ) +set(OPENVR_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../headers) # Set some properies for specific files. if(APPLE) @@ -50,6 +51,12 @@ set(SOURCE_FILES ${VRCOMMON_FILES} ) +set(PUBLIC_HEADER_FILES + ${OPENVR_HEADER_DIR}/openvr_driver.h + ${OPENVR_HEADER_DIR}/openvr_capi.h + ${OPENVR_HEADER_DIR}/openvr.h +) + source_group("Src" FILES ${CORE_FILES} ) @@ -92,6 +99,18 @@ if(USE_CUSTOM_LIBCXX) endif() target_link_libraries(${LIBNAME} ${EXTRA_LIBS} ${CMAKE_DL_LIBS}) -target_include_directories(${LIBNAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../headers) +target_include_directories(${LIBNAME} PUBLIC ${OPENVR_HEADER_DIR}) install(TARGETS ${LIBNAME} DESTINATION lib) +install(FILES ${PUBLIC_HEADER_FILES} DESTINATION include/openvr) + +# Generate a .pc file for linux environments +if(PLATFORM_NAME MATCHES "linux") + set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files") + CONFIGURE_FILE("openvr.pc.in" "openvr.pc" @ONLY) + + set(OPENVR_PC ${CMAKE_CURRENT_BINARY_DIR}/openvr.pc) + if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) + install(FILES ${OPENVR_PC} DESTINATION "${INSTALL_PKGCONFIG_DIR}") + endif() +endif() diff --git a/src/openvr.pc.in b/src/openvr.pc.in new file mode 100644 index 00000000..3edba91c --- /dev/null +++ b/src/openvr.pc.in @@ -0,0 +1,11 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include/openvr + +Name: openvr +Description: OpenVR is an API and runtime that allos access to VR hardware. +Version: @OPENVR_VERSION@ + +Libs: -L${libdir} -lopenvr_api -ldl +Cflags: -I${includedir} diff --git a/src/vrcommon/hmderrors_public.cpp b/src/vrcommon/hmderrors_public.cpp index 6710f6d9..a3cddc37 100644 --- a/src/vrcommon/hmderrors_public.cpp +++ b/src/vrcommon/hmderrors_public.cpp @@ -196,6 +196,85 @@ const char *GetIDForVRInitError( vr::EVRInitError eError ) RETURN_ENUM_AS_STRING( VRInitError_Compositor_OverlayInitFailed ); RETURN_ENUM_AS_STRING( VRInitError_Compositor_ScreenshotsInitFailed ); RETURN_ENUM_AS_STRING( VRInitError_Compositor_UnableToCreateDevice ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_SharedStateIsNull ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_NotificationManagerIsNull ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_ResourceManagerClientIsNull ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_MessageOverlaySharedStateInitFailure ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_PropertiesInterfaceIsNull ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateFullscreenWindowFailed ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_SettingsInterfaceIsNull ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToShowWindow ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_DistortInterfaceIsNull ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_DisplayFrequencyFailure ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_RendererInitializationFailed ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_DXGIFactoryInterfaceIsNull ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_DXGIFactoryCreateFailed ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_DXGIFactoryQueryFailed ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_InvalidAdapterDesktop ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_InvalidHmdAttachment ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_InvalidOutputDesktop ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_InvalidDeviceProvided ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_D3D11RendererInitializationFailed ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToFindDisplayMode ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateSwapChain ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToGetBackBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateRenderTarget ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateDXGI2SwapChain ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedtoGetDXGI2BackBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateDXGI2RenderTarget ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToGetDXGIDeviceInterface ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_SelectDisplayMode ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateNvAPIRenderTargets ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_NvAPISetDisplayMode ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateDirectModeDisplay ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_InvalidHmdPropertyContainer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_UpdateDisplayFrequency ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateRasterizerState ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateWireframeRasterizerState ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateSamplerState ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateClampToBorderSamplerState ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateAnisoSamplerState ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlaySamplerState ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreatePanoramaSamplerState ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateFontSamplerState ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateNoBlendState ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateBlendState ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateAlphaBlendState ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateBlendStateMaskR ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateBlendStateMaskG ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateBlendStateMaskB ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateDepthStencilState ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateDepthStencilStateNoWrite ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateDepthStencilStateNoDepth ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateFlushTexture ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateDistortionSurfaces ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateHmdPoseConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateGeomConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreatePanelMaskConstantBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreatePixelSimUBO ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateMSAARenderTextures ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateResolveRenderTextures ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateComputeResolveRenderTextures ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateDriverDirectModeResolveTextures ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_OpenDriverDirectModeResolveTextures ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateFallbackSyncTexture ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_ShareFallbackSyncTexture ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayIndexBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayVertextBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateTextVertexBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateTextIndexBuffer ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateMirrorTextures ); + RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateLastFrameRenderTexture ); // Vendor-specific errors RETURN_ENUM_AS_STRING( VRInitError_VendorSpecific_UnableToConnectToOculusRuntime); diff --git a/src/vrcommon/pathtools_public.cpp b/src/vrcommon/pathtools_public.cpp index 7069c5e8..ab299d29 100644 --- a/src/vrcommon/pathtools_public.cpp +++ b/src/vrcommon/pathtools_public.cpp @@ -209,7 +209,7 @@ bool Path_IsAbsolute( const std::string & sPath ) std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath ) { if( Path_IsAbsolute( sRelativePath ) ) - return sRelativePath; + return Path_Compact( sRelativePath ); else { if( !Path_IsAbsolute( sBasePath ) ) diff --git a/src/vrcommon/vrpathregistry_public.cpp b/src/vrcommon/vrpathregistry_public.cpp index 79c73518..42de3e1e 100644 --- a/src/vrcommon/vrpathregistry_public.cpp +++ b/src/vrcommon/vrpathregistry_public.cpp @@ -402,7 +402,7 @@ bool CVRPathRegistry_Public::GetPaths( std::string *psRuntimePath, std::string * if ( nCountEnvironmentVariables == 3 ) { - // all three environment variables where set, so we don't need the physical file + // all three environment variables were set, so we don't need the physical file return true; }