OpenVR SDK 0.9.9: * Added events (VREvent_TrackedDeviceUserInteractionStarted and VREvent_TrackedDeviceUserInteractionEnded) and a new interface method (IVRSystem:: GetTrackedDeviceActivityLevel) to hint an application about whether a device is being held or worn by a user. * Added events (VREvent_FocusEnter and VREvent_FocusLeave). These are sent to overlays with automatic mouse processing when the cursor moves onto or off of an overlay. Use them to clean up hover states in your overlay UI. * Dashboard overlays will now be send pressed and unpressed events when they are the current overlay. * Added IVRSystem::GetRawZeroPoseToStandingAbsoluteTrackingPose(), which allows an application to transform between standing and the raw coordinate system. * Added method (IVRChaperone::SetSceneColor) to let the app provide a hint to the compositor about the scene color so it can pick reasonable bounds colors. * Added methods to (GetBoundsColor, AreBoundsVisible, ForceBoundsVisible) to let applications query the current state of the bounds. * IVRCompositor::Submit now takes a flag parameter that allows an application to submit images that have already been distorted. * Added methods (SetSkyboxOverride and ClearSkyboxOverride) to IVRCompositor to allow applications to control the skybox that will be visible when the compositor draws. This is useful for when an application knows it is not going to render for a while (because it is loading a level or doing some other blocking action.) [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 2961972]
diff --git a/bin/linux32/libopenvr_api.so b/bin/linux32/libopenvr_api.so index 3ded4f4..a4aafc3 100755 --- a/bin/linux32/libopenvr_api.so +++ b/bin/linux32/libopenvr_api.so Binary files differ
diff --git a/bin/linux32/libopenvr_api.so.dbg b/bin/linux32/libopenvr_api.so.dbg index fdab7d2..1c67453 100755 --- a/bin/linux32/libopenvr_api.so.dbg +++ b/bin/linux32/libopenvr_api.so.dbg Binary files differ
diff --git a/bin/linux64/libopenvr_api.so b/bin/linux64/libopenvr_api.so index 58a2ef6..ff8499d 100755 --- a/bin/linux64/libopenvr_api.so +++ b/bin/linux64/libopenvr_api.so Binary files differ
diff --git a/bin/linux64/libopenvr_api.so.dbg b/bin/linux64/libopenvr_api.so.dbg index 17a233f..86ce0f7 100755 --- a/bin/linux64/libopenvr_api.so.dbg +++ b/bin/linux64/libopenvr_api.so.dbg Binary files differ
diff --git a/bin/osx32/libopenvr_api.dylib b/bin/osx32/libopenvr_api.dylib index 73287c8..b1ce82f 100755 --- a/bin/osx32/libopenvr_api.dylib +++ b/bin/osx32/libopenvr_api.dylib Binary files 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 6feb279..3d9fc27 100644 --- 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 Binary files differ
diff --git a/bin/win32/openvr_api.dll b/bin/win32/openvr_api.dll index cd7ba5d..28adac3 100644 --- a/bin/win32/openvr_api.dll +++ b/bin/win32/openvr_api.dll Binary files differ
diff --git a/bin/win32/openvr_api.pdb b/bin/win32/openvr_api.pdb index 98985f6..7745057 100644 --- a/bin/win32/openvr_api.pdb +++ b/bin/win32/openvr_api.pdb Binary files differ
diff --git a/bin/win64/openvr_api.dll b/bin/win64/openvr_api.dll index e264d3d..1ede77d 100644 --- a/bin/win64/openvr_api.dll +++ b/bin/win64/openvr_api.dll Binary files differ
diff --git a/bin/win64/openvr_api.pdb b/bin/win64/openvr_api.pdb index 52b1591..5d47d21 100644 --- a/bin/win64/openvr_api.pdb +++ b/bin/win64/openvr_api.pdb Binary files differ
diff --git a/headers/openvr.h b/headers/openvr.h index 02489fb..0edfeaf 100644 --- a/headers/openvr.h +++ b/headers/openvr.h
@@ -48,6 +48,11 @@ float v[3]; }; +struct HmdVector4_t +{ + float v[4]; +}; + struct HmdVector3d_t { double v[3]; @@ -63,6 +68,11 @@ double w, x, y, z; }; +struct HmdColor_t +{ + float r, g, b, a; +}; + struct HmdQuad_t { HmdVector3_t vCorners[ 4 ]; @@ -147,47 +157,71 @@ enum TrackedDeviceProperty { // general properties that apply to all device classes - Prop_TrackingSystemName_String = 1000, - Prop_ModelNumber_String = 1001, - Prop_SerialNumber_String = 1002, - Prop_RenderModelName_String = 1003, - Prop_WillDriftInYaw_Bool = 1004, - Prop_ManufacturerName_String = 1005, - Prop_TrackingFirmwareVersion_String = 1006, - Prop_HardwareRevision_String = 1007, - Prop_AllWirelessDongleDescriptions_String= 1008, - Prop_ConnectedWirelessDongle_String = 1009, - Prop_DeviceIsWireless_Bool = 1010, - Prop_DeviceIsCharging_Bool = 1011, - Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full - Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + // Properties that are unique to TrackedDeviceClass_HMD - Prop_ReportsTimeSinceVSync_Bool = 2000, - Prop_SecondsFromVsyncToPhotons_Float = 2001, - Prop_DisplayFrequency_Float = 2002, - Prop_UserIpdMeters_Float = 2003, - Prop_CurrentUniverseId_Uint64 = 2004, - Prop_PreviousUniverseId_Uint64 = 2005, - Prop_DisplayFirmwareVersion_String = 2006, - Prop_IsOnDesktop_Bool = 2007, + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, // Properties that are unique to TrackedDeviceClass_Controller - Prop_AttachedDeviceId_String = 3000, - Prop_SupportedButtons_Uint64 = 3001, - Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType - Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType - Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType - Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType - Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType // Properties that are unique to TrackedDeviceClass_TrackingReference - Prop_FieldOfViewLeftDegrees_Float = 4000, - Prop_FieldOfViewRightDegrees_Float = 4001, - Prop_FieldOfViewTopDegrees_Float = 4002, - Prop_FieldOfViewBottomDegrees_Float = 4003, - Prop_TrackingRangeMinimumMeters_Float = 4004, - Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + + // Camera calibration parameters + Prop_TrackedCamera_IntrinsicsFX_Float = 5000, + Prop_TrackedCamera_IntrinsicsFY_Float = 5001, + Prop_TrackedCamera_IntrinsicsCX_Float = 5002, + Prop_TrackedCamera_IntrinsicsCY_Float = 5003, + Prop_TrackedCamera_IntrinsicsK1_Float = 5004, + Prop_TrackedCamera_IntrinsicsK2_Float = 5005, + Prop_TrackedCamera_IntrinsicsP1_Float = 5006, + Prop_TrackedCamera_IntrinsicsP2_Float = 5007, + Prop_TrackedCamera_IntrinsicsK3_Float = 5008, }; /** Used to pass device IDs to API calls */ @@ -247,6 +281,20 @@ float uMax, vMax; }; + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum VRSubmitFlags_t +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01 +}; + + /** Status of the overall system */ enum VRStatusState_t { @@ -266,6 +314,8 @@ VREvent_TrackedDeviceActivated = 100, VREvent_TrackedDeviceDeactivated = 101, VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, VREvent_ButtonPress = 200, // data is controller VREvent_ButtonUnpress = 201, // data is controller @@ -275,6 +325,8 @@ VREvent_MouseMove = 300, // data is mouse VREvent_MouseButtonDown = 301, // data is mouse VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay VREvent_InputFocusCaptured = 400, // data is process VREvent_InputFocusReleased = 401, // data is process @@ -301,8 +353,25 @@ VREvent_ChaperoneDataHasChanged = 800, VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, }; @@ -522,6 +591,16 @@ VRApplication_Overlay = 2, // Application only interacts with overlays }; + +/** error codes for firmware */ +enum VRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + /** error codes returned by Vr_Init */ // Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp @@ -548,6 +627,7 @@ HmdError_Init_Retry = 115, // Used internally to cause retries to vrserver HmdError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup HmdError_Init_AnotherAppLaunching = 117, + HmdError_Init_SettingsInitFailed = 118, HmdError_Driver_Failed = 200, HmdError_Driver_Unknown = 201, @@ -558,7 +638,7 @@ HmdError_Driver_NotCalibrated = 206, HmdError_Driver_CalibrationInvalid = 207, HmdError_Driver_HmdDisplayNotFound = 208, - + HmdError_IPC_ServerInitFailed = 300, HmdError_IPC_ConnectFailed = 301, HmdError_IPC_SharedStateInitFailed = 302, @@ -567,6 +647,14 @@ HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + HmdError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + HmdError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + HmdError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + HmdError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + HmdError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + HmdError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + HmdError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + HmdError_Steam_SteamInstallationNotFound = 2000, }; @@ -723,11 +811,17 @@ * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices * in the list, or the size of the array needed if not large enough. */ virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( TrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + /** Returns the level of activity on the HMD. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; // ------------------------------------ // Property methods @@ -842,9 +936,22 @@ * The size of the response including its terminating null is returned. */ virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::VRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + }; -static const char * const IVRSystem_Version = "IVRSystem_005"; +static const char * const IVRSystem_Version = "IVRSystem_006"; } @@ -972,6 +1079,101 @@ VR_INTERFACE vr::IVRApplications *VR_CALLTYPE VRApplications(); } // namespace vr +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + virtual void Sync( EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char *k_pch_SteamVR_Section = "steamvr"; + static const char *k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char *k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char *k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char *k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char *k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char *k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char *k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char *k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char *k_pch_SteamVR_IPD_Float = "ipd"; + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char *k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char *k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char *k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char *k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char *k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char *k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char *k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char *k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char *k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char *k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char *k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char *k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char *k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char *k_pch_Null_Section = "driver_null"; + static const char *k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char *k_pch_Null_Id_String = "id"; + static const char *k_pch_Null_SerialNumber_String = "serialNumber"; + static const char *k_pch_Null_ModelNumber_String = "modelNumber"; + static const char *k_pch_Null_WindowX_Int32 = "windowX"; + static const char *k_pch_Null_WindowY_Int32 = "windowY"; + static const char *k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char *k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char *k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char *k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char *k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char *k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // notification keys + static const char *k_pch_Notifications_Section = "notifications"; + static const char *k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + + //----------------------------------------------------------------------------- + + + static const char * const IVRSettings_Version = "IVRSettings_001"; + + /** Returns the current IVRSettings pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRSettings *VR_CALLTYPE VRSettings(); + +} // namespace vr // ivrchaperone.h namespace vr { @@ -1047,6 +1249,17 @@ /** Reload Chaperone data from the .vrchap file on disk. */ virtual void ReloadInfo( void ) = 0; + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce) = 0; }; static const char * const IVRChaperone_Version = "IVRChaperone_002"; @@ -1133,7 +1346,7 @@ * OpenGL dirty state: * glBindTexture */ - virtual VRCompositorError Submit( Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void* pTexture, const VRTextureBounds_t* pBounds ) = 0; + virtual VRCompositorError Submit( Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void* pTexture, const VRTextureBounds_t* pBounds, VRSubmitFlags_t nSubmitFlags = Submit_Default ) = 0; /** Clears the frame that was sent with the last call to Submit. This will cause the * compositor to show the grid until Submit is called again. */ @@ -1151,7 +1364,13 @@ /** Fading the Grid in or out in fSeconds */ virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; - /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough). */ + virtual void SetSkyboxOverride( GraphicsAPIConvention eTextureType, void *pFront, void *pBack, void *pLeft, void *pRight, void *pTop, void *pBottom ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD * and is obscuring the compositor window. */ virtual void CompositorBringToFront() = 0; @@ -1178,7 +1397,7 @@ virtual bool CanRenderScene() = 0; }; -static const char * const IVRCompositor_Version = "IVRCompositor_007"; +static const char * const IVRCompositor_Version = "IVRCompositor_008"; } // namespace vr @@ -1266,7 +1485,7 @@ virtual uint32_t GetErrorString( NotificationError_t error, VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; VR_METHOD_DESC( Create a new notification. ) - virtual NotificationError_t CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, char *strType, char *strText, char *strCategory, NotificationBitmap *photo, /* out */ vr::VRNotificationId *notificationId ) = 0; + virtual NotificationError_t CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, const char *strType, const char *strText, const char *strCategory, const NotificationBitmap *photo, /* out */ vr::VRNotificationId *notificationId ) = 0; VR_METHOD_DESC(Dismiss the notification) virtual NotificationError_t DismissNotification( vr::VRNotificationId notificationId ) = 0; @@ -1485,6 +1704,10 @@ * Return true if the controller is pointed at the overlay and an event was generated. */ virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + /** Returns true if the specified overlay has input focus. An overlay has input focus when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsFocusOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + // --------------------------------------------- // Overlay texture methods // --------------------------------------------- @@ -1534,7 +1757,7 @@ }; - static const char * const IVROverlay_Version = "IVROverlay_004"; + static const char * const IVROverlay_Version = "IVROverlay_005"; } // namespace vr // ivrrendermodels.h
diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs index 4fc3c4c..a920ca9 100644 --- a/headers/openvr_api.cs +++ b/headers/openvr_api.cs
@@ -45,8 +45,12 @@ internal static extern void VR_IVRSystem_ResetSeatedZeroPose(IntPtr instancePtr); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose")] internal static extern HmdMatrix34_t VR_IVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(IntPtr instancePtr); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose")] + internal static extern HmdMatrix34_t VR_IVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(IntPtr instancePtr); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetSortedTrackedDeviceIndicesOfClass")] internal static extern uint VR_IVRSystem_GetSortedTrackedDeviceIndicesOfClass(IntPtr instancePtr, TrackedDeviceClass eTrackedDeviceClass, [In, Out] uint[] punTrackedDeviceIndexArray, uint unTrackedDeviceIndexArrayCount, uint unRelativeToTrackedDeviceIndex); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetTrackedDeviceActivityLevel")] + internal static extern uint VR_IVRSystem_GetTrackedDeviceActivityLevel(IntPtr instancePtr, uint unDeviceId); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetTrackedDeviceClass")] internal static extern TrackedDeviceClass VR_IVRSystem_GetTrackedDeviceClass(IntPtr instancePtr, uint unDeviceIndex); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_IsTrackedDeviceConnected")] @@ -91,6 +95,8 @@ internal static extern bool VR_IVRSystem_IsInputFocusCapturedByAnotherProcess(IntPtr instancePtr); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_DriverDebugRequest")] internal static extern uint VR_IVRSystem_DriverDebugRequest(IntPtr instancePtr, uint unDeviceIndex, string pchRequest, string pchResponseBuffer, uint unResponseBufferSize); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_PerformFirmwareUpdate")] + internal static extern VRFirmwareError VR_IVRSystem_PerformFirmwareUpdate(IntPtr instancePtr, uint unDeviceIndex); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_AddApplicationManifest")] internal static extern uint VR_IVRApplications_AddApplicationManifest(IntPtr instancePtr, string pchApplicationManifestFullPath, bool bTemporary); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_RemoveApplicationManifest")] @@ -135,6 +141,14 @@ internal static extern bool VR_IVRChaperone_GetSeatedBoundsInfo(IntPtr instancePtr, ref ChaperoneSeatedBoundsInfo_t pInfo); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_ReloadInfo")] internal static extern void VR_IVRChaperone_ReloadInfo(IntPtr instancePtr); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_SetSceneColor")] + internal static extern void VR_IVRChaperone_SetSceneColor(IntPtr instancePtr, HmdColor_t color); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_GetBoundsColor")] + internal static extern void VR_IVRChaperone_GetBoundsColor(IntPtr instancePtr, ref HmdColor_t pOutputColorArray, int nNumOutputColors); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_AreBoundsVisible")] + internal static extern bool VR_IVRChaperone_AreBoundsVisible(IntPtr instancePtr); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_ForceBoundsVisible")] + internal static extern void VR_IVRChaperone_ForceBoundsVisible(IntPtr instancePtr, bool bForce); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_GetLastError")] internal static extern uint VR_IVRCompositor_GetLastError(IntPtr instancePtr, System.Text.StringBuilder pchBuffer, uint unBufferSize); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_SetVSync")] @@ -148,7 +162,7 @@ [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_WaitGetPoses")] internal static extern VRCompositorError VR_IVRCompositor_WaitGetPoses(IntPtr instancePtr, [In, Out] TrackedDevicePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevicePose_t[] pGamePoseArray, uint unGamePoseArrayCount); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_Submit")] - internal static extern VRCompositorError VR_IVRCompositor_Submit(IntPtr instancePtr, Hmd_Eye eEye, GraphicsAPIConvention eTextureType, IntPtr pTexture, ref VRTextureBounds_t pBounds); + internal static extern VRCompositorError VR_IVRCompositor_Submit(IntPtr instancePtr, Hmd_Eye eEye, GraphicsAPIConvention eTextureType, IntPtr pTexture, ref VRTextureBounds_t pBounds, VRSubmitFlags_t nSubmitFlags); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_ClearLastSubmittedFrame")] internal static extern void VR_IVRCompositor_ClearLastSubmittedFrame(IntPtr instancePtr); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_GetFrameTiming")] @@ -157,6 +171,10 @@ internal static extern void VR_IVRCompositor_FadeToColor(IntPtr instancePtr, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_FadeGrid")] internal static extern void VR_IVRCompositor_FadeGrid(IntPtr instancePtr, float fSeconds, bool bFadeIn); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_SetSkyboxOverride")] + internal static extern void VR_IVRCompositor_SetSkyboxOverride(IntPtr instancePtr, GraphicsAPIConvention eTextureType, IntPtr pFront, IntPtr pBack, IntPtr pLeft, IntPtr pRight, IntPtr pTop, IntPtr pBottom); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_ClearSkyboxOverride")] + internal static extern void VR_IVRCompositor_ClearSkyboxOverride(IntPtr instancePtr); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_CompositorBringToFront")] internal static extern void VR_IVRCompositor_CompositorBringToFront(IntPtr instancePtr); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_CompositorGoToBack")] @@ -249,6 +267,8 @@ internal static extern bool VR_IVROverlay_ComputeOverlayIntersection(IntPtr instancePtr, ulong ulOverlayHandle, ref VROverlayIntersectionParams_t pParams, ref VROverlayIntersectionResults_t pResults); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_HandleControllerOverlayInteractionAsMouse")] internal static extern bool VR_IVROverlay_HandleControllerOverlayInteractionAsMouse(IntPtr instancePtr, ulong ulOverlayHandle, uint unControllerDeviceIndex); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_IsFocusOverlay")] + internal static extern bool VR_IVROverlay_IsFocusOverlay(IntPtr instancePtr, ulong ulOverlayHandle); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayTexture")] internal static extern VROverlayError VR_IVROverlay_SetOverlayTexture(IntPtr instancePtr, ulong ulOverlayHandle, GraphicsAPIConvention eTextureType, IntPtr pTexture); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_ClearOverlayTexture")] @@ -309,6 +329,26 @@ internal static extern NotificationError_t VR_IVRNotifications_CreateNotification(IntPtr instancePtr, ulong ulOverlayHandle, ulong ulUserValue, string strType, string strText, string strCategory, ref NotificationBitmap photo, ref uint notificationId); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRNotifications_DismissNotification")] internal static extern NotificationError_t VR_IVRNotifications_DismissNotification(IntPtr instancePtr, uint notificationId); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_GetSettingsErrorNameFromEnum")] + internal static extern IntPtr VR_IVRSettings_GetSettingsErrorNameFromEnum(IntPtr instancePtr, uint eError); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_Sync")] + internal static extern void VR_IVRSettings_Sync(IntPtr instancePtr, ref uint peError); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_GetBool")] + internal static extern bool VR_IVRSettings_GetBool(IntPtr instancePtr, string pchSection, string pchSettingsKey, bool bDefaultValue, ref uint peError); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_SetBool")] + internal static extern void VR_IVRSettings_SetBool(IntPtr instancePtr, string pchSection, string pchSettingsKey, bool bValue, ref uint peError); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_GetInt32")] + internal static extern int VR_IVRSettings_GetInt32(IntPtr instancePtr, string pchSection, string pchSettingsKey, int nDefaultValue, ref uint peError); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_SetInt32")] + internal static extern void VR_IVRSettings_SetInt32(IntPtr instancePtr, string pchSection, string pchSettingsKey, int nValue, ref uint peError); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_GetFloat")] + internal static extern float VR_IVRSettings_GetFloat(IntPtr instancePtr, string pchSection, string pchSettingsKey, float flDefaultValue, ref uint peError); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_SetFloat")] + internal static extern void VR_IVRSettings_SetFloat(IntPtr instancePtr, string pchSection, string pchSettingsKey, float flValue, ref uint peError); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_GetString")] + internal static extern void VR_IVRSettings_GetString(IntPtr instancePtr, string pchSection, string pchSettingsKey, string pchValue, uint unValueLen, string pchDefaultValue, ref uint peError); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_SetString")] + internal static extern void VR_IVRSettings_SetString(IntPtr instancePtr, string pchSection, string pchSettingsKey, string pchValue, ref uint peError); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCameraAccess_GetCameraCount")] internal static extern uint VR_IVRCameraAccess_GetCameraCount(IntPtr instancePtr); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCameraAccess_GetCameraId")] @@ -320,7 +360,7 @@ [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCameraAccess_GetCameraImage")] internal static extern bool VR_IVRCameraAccess_GetCameraImage(IntPtr instancePtr, uint unCameraIndex, ref CameraImage_t pCameraImage); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_CommitWorkingCopy")] - internal static extern bool VR_IVRChaperoneSetup_CommitWorkingCopy(IntPtr instancePtr, string pchCalibrationName); + internal static extern bool VR_IVRChaperoneSetup_CommitWorkingCopy(IntPtr instancePtr, uint configFile); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_RevertWorkingCopy")] internal static extern void VR_IVRChaperoneSetup_RevertWorkingCopy(IntPtr instancePtr); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetWorkingSoftBoundsInfo")] @@ -354,7 +394,7 @@ [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_RemoveAllWorkingTagPoses")] internal static extern void VR_IVRChaperoneSetup_RemoveAllWorkingTagPoses(IntPtr instancePtr); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_ReloadFromDisk")] - internal static extern void VR_IVRChaperoneSetup_ReloadFromDisk(IntPtr instancePtr); + internal static extern void VR_IVRChaperoneSetup_ReloadFromDisk(IntPtr instancePtr, uint configFile); } @@ -380,7 +420,9 @@ public abstract void GetDeviceToAbsoluteTrackingPose(TrackingUniverseOrigin eOrigin,float fPredictedSecondsToPhotonsFromNow,TrackedDevicePose_t [] pTrackedDevicePoseArray); public abstract void ResetSeatedZeroPose(); public abstract HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); + public abstract HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose(); public abstract uint GetSortedTrackedDeviceIndicesOfClass(TrackedDeviceClass eTrackedDeviceClass,uint [] punTrackedDeviceIndexArray,uint unRelativeToTrackedDeviceIndex); + public abstract uint GetTrackedDeviceActivityLevel(uint unDeviceId); public abstract TrackedDeviceClass GetTrackedDeviceClass(uint unDeviceIndex); public abstract bool IsTrackedDeviceConnected(uint unDeviceIndex); public abstract bool GetBoolTrackedDeviceProperty(uint unDeviceIndex,TrackedDeviceProperty prop,ref TrackedPropertyError pError); @@ -403,6 +445,7 @@ public abstract void ReleaseInputFocus(); public abstract bool IsInputFocusCapturedByAnotherProcess(); public abstract uint DriverDebugRequest(uint unDeviceIndex,string pchRequest,string pchResponseBuffer,uint unResponseBufferSize); + public abstract VRFirmwareError PerformFirmwareUpdate(uint unDeviceIndex); } @@ -437,6 +480,10 @@ public abstract bool GetHardBoundsInfo(out HmdQuad_t [] pQuadsBuffer); public abstract bool GetSeatedBoundsInfo(ref ChaperoneSeatedBoundsInfo_t pInfo); public abstract void ReloadInfo(); + public abstract void SetSceneColor(HmdColor_t color); + public abstract void GetBoundsColor(ref HmdColor_t pOutputColorArray,int nNumOutputColors); + public abstract bool AreBoundsVisible(); + public abstract void ForceBoundsVisible(bool bForce); } @@ -449,11 +496,13 @@ public abstract void SetGamma(float fGamma); public abstract float GetGamma(); public abstract VRCompositorError WaitGetPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray); - public abstract VRCompositorError Submit(Hmd_Eye eEye,GraphicsAPIConvention eTextureType,IntPtr pTexture,ref VRTextureBounds_t pBounds); + public abstract VRCompositorError Submit(Hmd_Eye eEye,GraphicsAPIConvention eTextureType,IntPtr pTexture,ref VRTextureBounds_t pBounds,VRSubmitFlags_t nSubmitFlags); public abstract void ClearLastSubmittedFrame(); public abstract bool GetFrameTiming(ref Compositor_FrameTiming pTiming,uint unFramesAgo); public abstract void FadeToColor(float fSeconds,float fRed,float fGreen,float fBlue,float fAlpha,bool bBackground); public abstract void FadeGrid(float fSeconds,bool bFadeIn); + public abstract void SetSkyboxOverride(GraphicsAPIConvention eTextureType,IntPtr pFront,IntPtr pBack,IntPtr pLeft,IntPtr pRight,IntPtr pTop,IntPtr pBottom); + public abstract void ClearSkyboxOverride(); public abstract void CompositorBringToFront(); public abstract void CompositorGoToBack(); public abstract void CompositorQuit(); @@ -506,6 +555,7 @@ public abstract VROverlayError SetOverlayMouseScale(ulong ulOverlayHandle,ref HmdVector2_t pvecMouseScale); public abstract bool ComputeOverlayIntersection(ulong ulOverlayHandle,ref VROverlayIntersectionParams_t pParams,ref VROverlayIntersectionResults_t pResults); public abstract bool HandleControllerOverlayInteractionAsMouse(ulong ulOverlayHandle,uint unControllerDeviceIndex); + public abstract bool IsFocusOverlay(ulong ulOverlayHandle); public abstract VROverlayError SetOverlayTexture(ulong ulOverlayHandle,GraphicsAPIConvention eTextureType,IntPtr pTexture); public abstract VROverlayError ClearOverlayTexture(ulong ulOverlayHandle); public abstract VROverlayError SetOverlayRaw(ulong ulOverlayHandle,IntPtr pvBuffer,uint unWidth,uint unHeight,uint unDepth); @@ -557,6 +607,22 @@ } +public abstract class IVRSettings +{ + public abstract IntPtr GetIntPtr(); + public abstract string GetSettingsErrorNameFromEnum(uint eError); + public abstract void Sync(ref uint peError); + public abstract bool GetBool(string pchSection,string pchSettingsKey,bool bDefaultValue,ref uint peError); + public abstract void SetBool(string pchSection,string pchSettingsKey,bool bValue,ref uint peError); + public abstract int GetInt32(string pchSection,string pchSettingsKey,int nDefaultValue,ref uint peError); + public abstract void SetInt32(string pchSection,string pchSettingsKey,int nValue,ref uint peError); + public abstract float GetFloat(string pchSection,string pchSettingsKey,float flDefaultValue,ref uint peError); + public abstract void SetFloat(string pchSection,string pchSettingsKey,float flValue,ref uint peError); + public abstract void GetString(string pchSection,string pchSettingsKey,string pchValue,uint unValueLen,string pchDefaultValue,ref uint peError); + public abstract void SetString(string pchSection,string pchSettingsKey,string pchValue,ref uint peError); +} + + public abstract class IVRCameraAccess { public abstract IntPtr GetIntPtr(); @@ -571,7 +637,7 @@ public abstract class IVRChaperoneSetup { public abstract IntPtr GetIntPtr(); - public abstract bool CommitWorkingCopy(string pchCalibrationName); + public abstract bool CommitWorkingCopy(uint configFile); public abstract void RevertWorkingCopy(); public abstract bool GetWorkingSoftBoundsInfo(ref ChaperoneSoftBoundsInfo_t pInfo); public abstract bool GetWorkingHardBoundsInfo(out HmdQuad_t [] pQuadsBuffer); @@ -588,7 +654,7 @@ public abstract void SetWorkingTagPoseByName(string pchTagName,IntPtr matSeatedZeroPoseToRawTrackingPose,float flScale); public abstract void RemoveWorkingTagPoseByName(string pchTagName); public abstract void RemoveAllWorkingTagPoses(); - public abstract void ReloadFromDisk(); + public abstract void ReloadFromDisk(uint configFile); } @@ -704,12 +770,24 @@ HmdMatrix34_t result = VRNativeEntrypoints.VR_IVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(m_pVRSystem); return result; } + public override HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() + { + CheckIfUsable(); + HmdMatrix34_t result = VRNativeEntrypoints.VR_IVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(m_pVRSystem); + return result; + } public override uint GetSortedTrackedDeviceIndicesOfClass(TrackedDeviceClass eTrackedDeviceClass,uint [] punTrackedDeviceIndexArray,uint unRelativeToTrackedDeviceIndex) { CheckIfUsable(); uint result = VRNativeEntrypoints.VR_IVRSystem_GetSortedTrackedDeviceIndicesOfClass(m_pVRSystem,eTrackedDeviceClass,punTrackedDeviceIndexArray,(uint) punTrackedDeviceIndexArray.Length,unRelativeToTrackedDeviceIndex); return result; } + public override uint GetTrackedDeviceActivityLevel(uint unDeviceId) + { + CheckIfUsable(); + uint result = VRNativeEntrypoints.VR_IVRSystem_GetTrackedDeviceActivityLevel(m_pVRSystem,unDeviceId); + return result; + } public override TrackedDeviceClass GetTrackedDeviceClass(uint unDeviceIndex) { CheckIfUsable(); @@ -840,6 +918,12 @@ uint result = VRNativeEntrypoints.VR_IVRSystem_DriverDebugRequest(m_pVRSystem,unDeviceIndex,pchRequest,pchResponseBuffer,unResponseBufferSize); return result; } + public override VRFirmwareError PerformFirmwareUpdate(uint unDeviceIndex) + { + CheckIfUsable(); + VRFirmwareError result = VRNativeEntrypoints.VR_IVRSystem_PerformFirmwareUpdate(m_pVRSystem,unDeviceIndex); + return result; + } } @@ -1016,6 +1100,27 @@ CheckIfUsable(); VRNativeEntrypoints.VR_IVRChaperone_ReloadInfo(m_pVRChaperone); } + public override void SetSceneColor(HmdColor_t color) + { + CheckIfUsable(); + VRNativeEntrypoints.VR_IVRChaperone_SetSceneColor(m_pVRChaperone,color); + } + public override void GetBoundsColor(ref HmdColor_t pOutputColorArray,int nNumOutputColors) + { + CheckIfUsable(); + VRNativeEntrypoints.VR_IVRChaperone_GetBoundsColor(m_pVRChaperone,ref pOutputColorArray,nNumOutputColors); + } + public override bool AreBoundsVisible() + { + CheckIfUsable(); + bool result = VRNativeEntrypoints.VR_IVRChaperone_AreBoundsVisible(m_pVRChaperone); + return result; + } + public override void ForceBoundsVisible(bool bForce) + { + CheckIfUsable(); + VRNativeEntrypoints.VR_IVRChaperone_ForceBoundsVisible(m_pVRChaperone,bForce); + } } @@ -1070,10 +1175,10 @@ VRCompositorError result = VRNativeEntrypoints.VR_IVRCompositor_WaitGetPoses(m_pVRCompositor,pRenderPoseArray,(uint) pRenderPoseArray.Length,pGamePoseArray,(uint) pGamePoseArray.Length); return result; } - public override VRCompositorError Submit(Hmd_Eye eEye,GraphicsAPIConvention eTextureType,IntPtr pTexture,ref VRTextureBounds_t pBounds) + public override VRCompositorError Submit(Hmd_Eye eEye,GraphicsAPIConvention eTextureType,IntPtr pTexture,ref VRTextureBounds_t pBounds,VRSubmitFlags_t nSubmitFlags) { CheckIfUsable(); - VRCompositorError result = VRNativeEntrypoints.VR_IVRCompositor_Submit(m_pVRCompositor,eEye,eTextureType,pTexture,ref pBounds); + VRCompositorError result = VRNativeEntrypoints.VR_IVRCompositor_Submit(m_pVRCompositor,eEye,eTextureType,pTexture,ref pBounds,nSubmitFlags); return result; } public override void ClearLastSubmittedFrame() @@ -1097,6 +1202,16 @@ CheckIfUsable(); VRNativeEntrypoints.VR_IVRCompositor_FadeGrid(m_pVRCompositor,fSeconds,bFadeIn); } + public override void SetSkyboxOverride(GraphicsAPIConvention eTextureType,IntPtr pFront,IntPtr pBack,IntPtr pLeft,IntPtr pRight,IntPtr pTop,IntPtr pBottom) + { + CheckIfUsable(); + VRNativeEntrypoints.VR_IVRCompositor_SetSkyboxOverride(m_pVRCompositor,eTextureType,pFront,pBack,pLeft,pRight,pTop,pBottom); + } + public override void ClearSkyboxOverride() + { + CheckIfUsable(); + VRNativeEntrypoints.VR_IVRCompositor_ClearSkyboxOverride(m_pVRCompositor); + } public override void CompositorBringToFront() { CheckIfUsable(); @@ -1403,6 +1518,12 @@ bool result = VRNativeEntrypoints.VR_IVROverlay_HandleControllerOverlayInteractionAsMouse(m_pVROverlay,ulOverlayHandle,unControllerDeviceIndex); return result; } + public override bool IsFocusOverlay(ulong ulOverlayHandle) + { + CheckIfUsable(); + bool result = VRNativeEntrypoints.VR_IVROverlay_IsFocusOverlay(m_pVROverlay,ulOverlayHandle); + return result; + } public override VROverlayError SetOverlayTexture(ulong ulOverlayHandle,GraphicsAPIConvention eTextureType,IntPtr pTexture) { CheckIfUsable(); @@ -1647,6 +1768,89 @@ } +public class CVRSettings : IVRSettings +{ + public CVRSettings(IntPtr VRSettings) + { + m_pVRSettings = VRSettings; + } + IntPtr m_pVRSettings; + + public override IntPtr GetIntPtr() { return m_pVRSettings; } + + private void CheckIfUsable() + { + if (m_pVRSettings == IntPtr.Zero) + { + throw new Exception("Steam Pointer not configured"); + } + } + public override string GetSettingsErrorNameFromEnum(uint eError) + { + CheckIfUsable(); + IntPtr result = VRNativeEntrypoints.VR_IVRSettings_GetSettingsErrorNameFromEnum(m_pVRSettings,eError); + return (string) Marshal.PtrToStructure(result, typeof(string)); + } + public override void Sync(ref uint peError) + { + CheckIfUsable(); + peError = 0; + VRNativeEntrypoints.VR_IVRSettings_Sync(m_pVRSettings,ref peError); + } + public override bool GetBool(string pchSection,string pchSettingsKey,bool bDefaultValue,ref uint peError) + { + CheckIfUsable(); + peError = 0; + bool result = VRNativeEntrypoints.VR_IVRSettings_GetBool(m_pVRSettings,pchSection,pchSettingsKey,bDefaultValue,ref peError); + return result; + } + public override void SetBool(string pchSection,string pchSettingsKey,bool bValue,ref uint peError) + { + CheckIfUsable(); + peError = 0; + VRNativeEntrypoints.VR_IVRSettings_SetBool(m_pVRSettings,pchSection,pchSettingsKey,bValue,ref peError); + } + public override int GetInt32(string pchSection,string pchSettingsKey,int nDefaultValue,ref uint peError) + { + CheckIfUsable(); + peError = 0; + int result = VRNativeEntrypoints.VR_IVRSettings_GetInt32(m_pVRSettings,pchSection,pchSettingsKey,nDefaultValue,ref peError); + return result; + } + public override void SetInt32(string pchSection,string pchSettingsKey,int nValue,ref uint peError) + { + CheckIfUsable(); + peError = 0; + VRNativeEntrypoints.VR_IVRSettings_SetInt32(m_pVRSettings,pchSection,pchSettingsKey,nValue,ref peError); + } + public override float GetFloat(string pchSection,string pchSettingsKey,float flDefaultValue,ref uint peError) + { + CheckIfUsable(); + peError = 0; + float result = VRNativeEntrypoints.VR_IVRSettings_GetFloat(m_pVRSettings,pchSection,pchSettingsKey,flDefaultValue,ref peError); + return result; + } + public override void SetFloat(string pchSection,string pchSettingsKey,float flValue,ref uint peError) + { + CheckIfUsable(); + peError = 0; + VRNativeEntrypoints.VR_IVRSettings_SetFloat(m_pVRSettings,pchSection,pchSettingsKey,flValue,ref peError); + } + public override void GetString(string pchSection,string pchSettingsKey,string pchValue,uint unValueLen,string pchDefaultValue,ref uint peError) + { + CheckIfUsable(); + peError = 0; + VRNativeEntrypoints.VR_IVRSettings_GetString(m_pVRSettings,pchSection,pchSettingsKey,pchValue,unValueLen,pchDefaultValue,ref peError); + } + public override void SetString(string pchSection,string pchSettingsKey,string pchValue,ref uint peError) + { + CheckIfUsable(); + peError = 0; + VRNativeEntrypoints.VR_IVRSettings_SetString(m_pVRSettings,pchSection,pchSettingsKey,pchValue,ref peError); + } +} + + public class CVRCameraAccess : IVRCameraAccess { public CVRCameraAccess(IntPtr VRCameraAccess) @@ -1714,10 +1918,10 @@ throw new Exception("Steam Pointer not configured"); } } - public override bool CommitWorkingCopy(string pchCalibrationName) + public override bool CommitWorkingCopy(uint configFile) { CheckIfUsable(); - bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_CommitWorkingCopy(m_pVRChaperoneSetup,pchCalibrationName); + bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_CommitWorkingCopy(m_pVRChaperoneSetup,configFile); return result; } public override void RevertWorkingCopy() @@ -1818,10 +2022,10 @@ CheckIfUsable(); VRNativeEntrypoints.VR_IVRChaperoneSetup_RemoveAllWorkingTagPoses(m_pVRChaperoneSetup); } - public override void ReloadFromDisk() + public override void ReloadFromDisk(uint configFile) { CheckIfUsable(); - VRNativeEntrypoints.VR_IVRChaperoneSetup_ReloadFromDisk(m_pVRChaperoneSetup); + VRNativeEntrypoints.VR_IVRChaperoneSetup_ReloadFromDisk(m_pVRChaperoneSetup,configFile); } } @@ -1891,6 +2095,15 @@ Prop_DeviceIsCharging_Bool = 1011, Prop_DeviceBatteryPercentage_Float = 1012, Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, Prop_ReportsTimeSinceVSync_Bool = 2000, Prop_SecondsFromVsyncToPhotons_Float = 2001, Prop_DisplayFrequency_Float = 2002, @@ -1899,6 +2112,9 @@ Prop_PreviousUniverseId_Uint64 = 2005, Prop_DisplayFirmwareVersion_String = 2006, Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, Prop_AttachedDeviceId_String = 3000, Prop_SupportedButtons_Uint64 = 3001, Prop_Axis0Type_Int32 = 3002, @@ -1912,6 +2128,15 @@ Prop_FieldOfViewBottomDegrees_Float = 4003, Prop_TrackingRangeMinimumMeters_Float = 4004, Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_TrackedCamera_IntrinsicsFX_Float = 5000, + Prop_TrackedCamera_IntrinsicsFY_Float = 5001, + Prop_TrackedCamera_IntrinsicsCX_Float = 5002, + Prop_TrackedCamera_IntrinsicsCY_Float = 5003, + Prop_TrackedCamera_IntrinsicsK1_Float = 5004, + Prop_TrackedCamera_IntrinsicsK2_Float = 5005, + Prop_TrackedCamera_IntrinsicsP1_Float = 5006, + Prop_TrackedCamera_IntrinsicsP2_Float = 5007, + Prop_TrackedCamera_IntrinsicsK3_Float = 5008, } public enum TrackedPropertyError { @@ -1925,6 +2150,11 @@ TrackedProp_ValueNotProvidedByDevice = 7, TrackedProp_StringExceedsMaximumLength = 8, } +public enum VRSubmitFlags_t +{ + Submit_Default = 0, + Submit_LensDistortionAlreadyApplied = 1, +} public enum VRStatusState_t { State_OK = 0, @@ -1939,6 +2169,8 @@ VREvent_TrackedDeviceActivated = 100, VREvent_TrackedDeviceDeactivated = 101, VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, VREvent_ButtonPress = 200, VREvent_ButtonUnpress = 201, VREvent_ButtonTouch = 202, @@ -1946,6 +2178,8 @@ VREvent_MouseMove = 300, VREvent_MouseButtonDown = 301, VREvent_MouseButtonUp = 302, + VREvent_FocusEnter = 303, + VREvent_FocusLeave = 304, VREvent_InputFocusCaptured = 400, VREvent_InputFocusReleased = 401, VREvent_SceneFocusLost = 402, @@ -1967,7 +2201,18 @@ VREvent_ProcessQuit = 701, VREvent_ChaperoneDataHasChanged = 800, VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, VREvent_StatusUpdate = 900, + VREvent_MCImageUpdated = 1000, + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, +} +public enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, } public enum EVRButtonId { @@ -2027,6 +2272,12 @@ VRApplication_Scene = 1, VRApplication_Overlay = 2, } +public enum VRFirmwareError +{ + None = 0, + Success = 1, + Fail = 2, +} public enum HmdError { None = 0, @@ -2049,6 +2300,7 @@ Init_Retry = 115, Init_InitCanceledByUser = 116, Init_AnotherAppLaunching = 117, + Init_SettingsInitFailed = 118, Driver_Failed = 200, Driver_Unknown = 201, Driver_HmdUnknown = 202, @@ -2064,6 +2316,13 @@ IPC_CompositorInitFailed = 303, IPC_MutexInitFailed = 304, VendorSpecific_UnableToConnectToOculusRuntime = 1000, + VendorSpecific_HmdFound_CantOpenDevice = 1101, + VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VendorSpecific_HmdFound_NoStoredConfig = 1103, + VendorSpecific_HmdFound_ConfigTooBig = 1104, + VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, Steam_SteamInstallationNotFound = 2000, } public enum EVRApplicationError @@ -2142,6 +2401,13 @@ k_ENotificationError_Fail = 1, k_eNotificationError_InvalidParam = 2, } +public enum EVRSettingsError +{ + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, +} public enum CameraImageResult { OK = 0, @@ -2149,6 +2415,11 @@ NotReady = 2, SameFrame = 3, } +public enum EChaperoneConfigFile +{ + Live = 1, + Temp = 2, +} [StructLayout(LayoutKind.Explicit)] public struct VREvent_Data_t { @@ -2172,6 +2443,11 @@ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.R4)] public float[] v; //float[3] } +[StructLayout(LayoutKind.Sequential)] public struct HmdVector4_t +{ + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.R4)] + public float[] v; //float[4] +} [StructLayout(LayoutKind.Sequential)] public struct HmdVector3d_t { [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.R8)] @@ -2189,6 +2465,13 @@ public double y; public double z; } +[StructLayout(LayoutKind.Sequential)] public struct HmdColor_t +{ + public float r; + public float g; + public float b; + public float a; +} [StructLayout(LayoutKind.Sequential)] public struct HmdQuad_t { [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.Struct)] @@ -2425,23 +2708,63 @@ public const uint k_unMaxPropertyStringSize = 32768; public const uint k_unControllerStateAxisCount = 5; public const ulong k_ulOverlayHandleInvalid = 0; - public const string IVRSystem_Version = "IVRSystem_005"; + public const string IVRSystem_Version = "IVRSystem_006"; public const uint k_unMaxApplicationKeyLength = 128; public const string IVRApplications_Version = "IVRApplications_001"; public const string IVRChaperone_Version = "IVRChaperone_002"; - public const string IVRCompositor_Version = "IVRCompositor_007"; + public const string IVRCompositor_Version = "IVRCompositor_008"; public const uint k_unVROverlayMaxKeyLength = 128; public const uint k_unVROverlayMaxNameLength = 128; public const uint k_unMaxOverlayCount = 32; - public const string IVROverlay_Version = "IVROverlay_004"; + public const string IVROverlay_Version = "IVROverlay_005"; public const string IVRRenderModels_Version = "IVRRenderModels_001"; public const string IVRControlPanel_Version = "IVRControlPanel_001"; public const uint k_unNotificationTypeMaxSize = 16; public const uint k_unNotificationTextMaxSize = 128; public const uint k_unNotificationCatagoryMaxSize = 32; public const string IVRNotifications_Version = "IVRNotifications_001"; + public const uint k_unMaxSettingsKeyLength = 128; + public const string k_pch_SteamVR_Section = "steamvr"; + public const string k_pch_SteamVR_RequireHmd_String = "requireHmd"; + public const string k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + public const string k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + public const string k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + public const string k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + public const string k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + public const string k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps"; + public const string k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + public const string k_pch_SteamVR_IPD_Float = "ipd"; + public const string k_pch_Lighthouse_Section = "driver_lighthouse"; + public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + public const string k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + public const string k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + public const string k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + public const string k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + public const string k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + public const string k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + public const string k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + public const string k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + public const string k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + public const string k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + public const string k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + public const string k_pch_Null_Section = "driver_null"; + public const string k_pch_Null_EnableNullDriver_Bool = "enable"; + public const string k_pch_Null_Id_String = "id"; + public const string k_pch_Null_SerialNumber_String = "serialNumber"; + public const string k_pch_Null_ModelNumber_String = "modelNumber"; + public const string k_pch_Null_WindowX_Int32 = "windowX"; + public const string k_pch_Null_WindowY_Int32 = "windowY"; + public const string k_pch_Null_WindowWidth_Int32 = "windowWidth"; + public const string k_pch_Null_WindowHeight_Int32 = "windowHeight"; + public const string k_pch_Null_RenderWidth_Int32 = "renderWidth"; + public const string k_pch_Null_RenderHeight_Int32 = "renderHeight"; + public const string k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + public const string k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + public const string k_pch_Notifications_Section = "notifications"; + public const string k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + public const string IVRSettings_Version = "IVRSettings_001"; public const string IVRCameraAccess_Version = "IVRCameraAccess_001"; - public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_001"; + public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_002"; }
diff --git a/headers/openvr_api.json b/headers/openvr_api.json index ca2da2c..602b2e0 100644 --- a/headers/openvr_api.json +++ b/headers/openvr_api.json
@@ -47,6 +47,15 @@ ,{"name": "Prop_DeviceIsCharging_Bool","value": "1011"} ,{"name": "Prop_DeviceBatteryPercentage_Float","value": "1012"} ,{"name": "Prop_StatusDisplayTransform_Matrix34","value": "1013"} + ,{"name": "Prop_Firmware_UpdateAvailable_Bool","value": "1014"} + ,{"name": "Prop_Firmware_ManualUpdate_Bool","value": "1015"} + ,{"name": "Prop_Firmware_ManualUpdateURL_String","value": "1016"} + ,{"name": "Prop_HardwareRevision_Uint64","value": "1017"} + ,{"name": "Prop_FirmwareVersion_Uint64","value": "1018"} + ,{"name": "Prop_FPGAVersion_Uint64","value": "1019"} + ,{"name": "Prop_VRCVersion_Uint64","value": "1020"} + ,{"name": "Prop_RadioVersion_Uint64","value": "1021"} + ,{"name": "Prop_DongleVersion_Uint64","value": "1022"} ,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"} ,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"} ,{"name": "Prop_DisplayFrequency_Float","value": "2002"} @@ -55,6 +64,9 @@ ,{"name": "Prop_PreviousUniverseId_Uint64","value": "2005"} ,{"name": "Prop_DisplayFirmwareVersion_String","value": "2006"} ,{"name": "Prop_IsOnDesktop_Bool","value": "2007"} + ,{"name": "Prop_DisplayMCType_Int32","value": "2008"} + ,{"name": "Prop_DisplayMCOffset_Float","value": "2009"} + ,{"name": "Prop_DisplayMCScale_Float","value": "2010"} ,{"name": "Prop_AttachedDeviceId_String","value": "3000"} ,{"name": "Prop_SupportedButtons_Uint64","value": "3001"} ,{"name": "Prop_Axis0Type_Int32","value": "3002"} @@ -68,6 +80,15 @@ ,{"name": "Prop_FieldOfViewBottomDegrees_Float","value": "4003"} ,{"name": "Prop_TrackingRangeMinimumMeters_Float","value": "4004"} ,{"name": "Prop_TrackingRangeMaximumMeters_Float","value": "4005"} + ,{"name": "Prop_TrackedCamera_IntrinsicsFX_Float","value": "5000"} + ,{"name": "Prop_TrackedCamera_IntrinsicsFY_Float","value": "5001"} + ,{"name": "Prop_TrackedCamera_IntrinsicsCX_Float","value": "5002"} + ,{"name": "Prop_TrackedCamera_IntrinsicsCY_Float","value": "5003"} + ,{"name": "Prop_TrackedCamera_IntrinsicsK1_Float","value": "5004"} + ,{"name": "Prop_TrackedCamera_IntrinsicsK2_Float","value": "5005"} + ,{"name": "Prop_TrackedCamera_IntrinsicsP1_Float","value": "5006"} + ,{"name": "Prop_TrackedCamera_IntrinsicsP2_Float","value": "5007"} + ,{"name": "Prop_TrackedCamera_IntrinsicsK3_Float","value": "5008"} ]} , {"enumname": "vr::TrackedPropertyError","values": [ {"name": "TrackedProp_Success","value": "0"} @@ -80,6 +101,10 @@ ,{"name": "TrackedProp_ValueNotProvidedByDevice","value": "7"} ,{"name": "TrackedProp_StringExceedsMaximumLength","value": "8"} ]} +, {"enumname": "vr::VRSubmitFlags_t","values": [ + {"name": "Submit_Default","value": "0"} + ,{"name": "Submit_LensDistortionAlreadyApplied","value": "1"} +]} , {"enumname": "vr::VRStatusState_t","values": [ {"name": "State_OK","value": "0"} ,{"name": "State_Error","value": "1"} @@ -92,6 +117,8 @@ ,{"name": "VREvent_TrackedDeviceActivated","value": "100"} ,{"name": "VREvent_TrackedDeviceDeactivated","value": "101"} ,{"name": "VREvent_TrackedDeviceUpdated","value": "102"} + ,{"name": "VREvent_TrackedDeviceUserInteractionStarted","value": "103"} + ,{"name": "VREvent_TrackedDeviceUserInteractionEnded","value": "104"} ,{"name": "VREvent_ButtonPress","value": "200"} ,{"name": "VREvent_ButtonUnpress","value": "201"} ,{"name": "VREvent_ButtonTouch","value": "202"} @@ -99,6 +126,8 @@ ,{"name": "VREvent_MouseMove","value": "300"} ,{"name": "VREvent_MouseButtonDown","value": "301"} ,{"name": "VREvent_MouseButtonUp","value": "302"} + ,{"name": "VREvent_FocusEnter","value": "303"} + ,{"name": "VREvent_FocusLeave","value": "304"} ,{"name": "VREvent_InputFocusCaptured","value": "400"} ,{"name": "VREvent_InputFocusReleased","value": "401"} ,{"name": "VREvent_SceneFocusLost","value": "402"} @@ -120,7 +149,17 @@ ,{"name": "VREvent_ProcessQuit","value": "701"} ,{"name": "VREvent_ChaperoneDataHasChanged","value": "800"} ,{"name": "VREvent_ChaperoneUniverseHasChanged","value": "801"} + ,{"name": "VREvent_ChaperoneTempDataHasChanged","value": "802"} ,{"name": "VREvent_StatusUpdate","value": "900"} + ,{"name": "VREvent_MCImageUpdated","value": "1000"} + ,{"name": "VREvent_FirmwareUpdateStarted","value": "1100"} + ,{"name": "VREvent_FirmwareUpdateFinished","value": "1101"} +]} +, {"enumname": "vr::EDeviceActivityLevel","values": [ + {"name": "k_EDeviceActivityLevel_Unknown","value": "-1"} + ,{"name": "k_EDeviceActivityLevel_Idle","value": "0"} + ,{"name": "k_EDeviceActivityLevel_UserInteraction","value": "1"} + ,{"name": "k_EDeviceActivityLevel_UserInteraction_Timeout","value": "2"} ]} , {"enumname": "vr::EVRButtonId","values": [ {"name": "k_EButton_System","value": "0"} @@ -174,6 +213,11 @@ ,{"name": "VRApplication_Scene","value": "1"} ,{"name": "VRApplication_Overlay","value": "2"} ]} +, {"enumname": "vr::VRFirmwareError","values": [ + {"name": "VRFirmwareError_None","value": "0"} + ,{"name": "VRFirmwareError_Success","value": "1"} + ,{"name": "VRFirmwareError_Fail","value": "2"} +]} , {"enumname": "vr::HmdError","values": [ {"name": "HmdError_None","value": "0"} ,{"name": "HmdError_Unknown","value": "1"} @@ -195,6 +239,7 @@ ,{"name": "HmdError_Init_Retry","value": "115"} ,{"name": "HmdError_Init_InitCanceledByUser","value": "116"} ,{"name": "HmdError_Init_AnotherAppLaunching","value": "117"} + ,{"name": "HmdError_Init_SettingsInitFailed","value": "118"} ,{"name": "HmdError_Driver_Failed","value": "200"} ,{"name": "HmdError_Driver_Unknown","value": "201"} ,{"name": "HmdError_Driver_HmdUnknown","value": "202"} @@ -210,6 +255,13 @@ ,{"name": "HmdError_IPC_CompositorInitFailed","value": "303"} ,{"name": "HmdError_IPC_MutexInitFailed","value": "304"} ,{"name": "HmdError_VendorSpecific_UnableToConnectToOculusRuntime","value": "1000"} + ,{"name": "HmdError_VendorSpecific_HmdFound_CantOpenDevice","value": "1101"} + ,{"name": "HmdError_VendorSpecific_HmdFound_UnableToRequestConfigStart","value": "1102"} + ,{"name": "HmdError_VendorSpecific_HmdFound_NoStoredConfig","value": "1103"} + ,{"name": "HmdError_VendorSpecific_HmdFound_ConfigTooBig","value": "1104"} + ,{"name": "HmdError_VendorSpecific_HmdFound_ConfigTooSmall","value": "1105"} + ,{"name": "HmdError_VendorSpecific_HmdFound_UnableToInitZLib","value": "1106"} + ,{"name": "HmdError_VendorSpecific_HmdFound_CantReadFirmwareVersion","value": "1107"} ,{"name": "HmdError_Steam_SteamInstallationNotFound","value": "2000"} ]} , {"enumname": "vr::EVRApplicationError","values": [ @@ -280,12 +332,22 @@ ,{"name": "k_ENotificationError_Fail","value": "1"} ,{"name": "k_eNotificationError_InvalidParam","value": "2"} ]} +, {"enumname": "vr::EVRSettingsError","values": [ + {"name": "VRSettingsError_None","value": "0"} + ,{"name": "VRSettingsError_IPCFailed","value": "1"} + ,{"name": "VRSettingsError_WriteFailed","value": "2"} + ,{"name": "VRSettingsError_ReadFailed","value": "3"} +]} , {"enumname": "vr::CameraImageResult","values": [ {"name": "CameraImageResult_OK","value": "0"} ,{"name": "CameraImageResult_Uninitalized","value": "1"} ,{"name": "CameraImageResult_NotReady","value": "2"} ,{"name": "CameraImageResult_SameFrame","value": "3"} ]} +, {"enumname": "vr::EChaperoneConfigFile","values": [ + {"name": "EChaperoneConfigFile_Live","value": "1"} + ,{"name": "EChaperoneConfigFile_Temp","value": "2"} +]} ], "consts":[{ "constname": "k_unTrackingStringSize","consttype": "const uint32_t", "constval": "32"} @@ -304,7 +366,7 @@ ,{ "constname": "k_ulOverlayHandleInvalid","consttype": "const VROverlayHandle_t", "constval": "0"} ,{ - "constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_005"} + "constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_006"} ,{ "constname": "k_unMaxApplicationKeyLength","consttype": "const uint32_t", "constval": "128"} ,{ @@ -312,7 +374,7 @@ ,{ "constname": "IVRChaperone_Version","consttype": "const char *const", "constval": "IVRChaperone_002"} ,{ - "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_007"} + "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_008"} ,{ "constname": "k_unVROverlayMaxKeyLength","consttype": "const uint32_t", "constval": "128"} ,{ @@ -320,7 +382,7 @@ ,{ "constname": "k_unMaxOverlayCount","consttype": "const uint32_t", "constval": "32"} ,{ - "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_004"} + "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_005"} ,{ "constname": "IVRRenderModels_Version","consttype": "const char *const", "constval": "IVRRenderModels_001"} ,{ @@ -334,9 +396,89 @@ ,{ "constname": "IVRNotifications_Version","consttype": "const char *const", "constval": "IVRNotifications_001"} ,{ + "constname": "k_unMaxSettingsKeyLength","consttype": "const uint32_t", "constval": "128"} +,{ + "constname": "k_pch_SteamVR_Section","consttype": "const char *", "constval": "steamvr"} +,{ + "constname": "k_pch_SteamVR_RequireHmd_String","consttype": "const char *", "constval": "requireHmd"} +,{ + "constname": "k_pch_SteamVR_ForcedDriverKey_String","consttype": "const char *", "constval": "forcedDriver"} +,{ + "constname": "k_pch_SteamVR_DisplayDebug_Bool","consttype": "const char *", "constval": "displayDebug"} +,{ + "constname": "k_pch_SteamVR_EnableDistortion_Bool","consttype": "const char *", "constval": "enableDistortion"} +,{ + "constname": "k_pch_SteamVR_DisplayDebugX_Int32","consttype": "const char *", "constval": "displayDebugX"} +,{ + "constname": "k_pch_SteamVR_DisplayDebugY_Int32","consttype": "const char *", "constval": "displayDebugY"} +,{ + "constname": "k_pch_SteamVR_SendSystemButtonToAllApps_Bool","consttype": "const char *", "constval": "sendSystemButtonToAllApps"} +,{ + "constname": "k_pch_SteamVR_LogLevel_Int32","consttype": "const char *", "constval": "loglevel"} +,{ + "constname": "k_pch_SteamVR_IPD_Float","consttype": "const char *", "constval": "ipd"} +,{ + "constname": "k_pch_Lighthouse_Section","consttype": "const char *", "constval": "driver_lighthouse"} +,{ + "constname": "k_pch_Lighthouse_DisableIMU_Bool","consttype": "const char *", "constval": "disableimu"} +,{ + "constname": "k_pch_Lighthouse_UseDisambiguation_String","consttype": "const char *", "constval": "usedisambiguation"} +,{ + "constname": "k_pch_Lighthouse_DisambiguationDebug_Int32","consttype": "const char *", "constval": "disambiguationdebug"} +,{ + "constname": "k_pch_Lighthouse_PrimaryBasestation_Int32","consttype": "const char *", "constval": "primarybasestation"} +,{ + "constname": "k_pch_Lighthouse_LighthouseName_String","consttype": "const char *", "constval": "lighthousename"} +,{ + "constname": "k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float","consttype": "const char *", "constval": "maxincidenceangledegrees"} +,{ + "constname": "k_pch_Lighthouse_UseLighthouseDirect_Bool","consttype": "const char *", "constval": "uselighthousedirect"} +,{ + "constname": "k_pch_Lighthouse_DBHistory_Bool","consttype": "const char *", "constval": "dbhistory"} +,{ + "constname": "k_pch_Lighthouse_OriginOffsetX_Float","consttype": "const char *", "constval": "originoffsetx"} +,{ + "constname": "k_pch_Lighthouse_OriginOffsetY_Float","consttype": "const char *", "constval": "originoffsety"} +,{ + "constname": "k_pch_Lighthouse_OriginOffsetZ_Float","consttype": "const char *", "constval": "originoffsetz"} +,{ + "constname": "k_pch_Lighthouse_HeadingOffset_Float","consttype": "const char *", "constval": "headingoffset"} +,{ + "constname": "k_pch_Null_Section","consttype": "const char *", "constval": "driver_null"} +,{ + "constname": "k_pch_Null_EnableNullDriver_Bool","consttype": "const char *", "constval": "enable"} +,{ + "constname": "k_pch_Null_Id_String","consttype": "const char *", "constval": "id"} +,{ + "constname": "k_pch_Null_SerialNumber_String","consttype": "const char *", "constval": "serialNumber"} +,{ + "constname": "k_pch_Null_ModelNumber_String","consttype": "const char *", "constval": "modelNumber"} +,{ + "constname": "k_pch_Null_WindowX_Int32","consttype": "const char *", "constval": "windowX"} +,{ + "constname": "k_pch_Null_WindowY_Int32","consttype": "const char *", "constval": "windowY"} +,{ + "constname": "k_pch_Null_WindowWidth_Int32","consttype": "const char *", "constval": "windowWidth"} +,{ + "constname": "k_pch_Null_WindowHeight_Int32","consttype": "const char *", "constval": "windowHeight"} +,{ + "constname": "k_pch_Null_RenderWidth_Int32","consttype": "const char *", "constval": "renderWidth"} +,{ + "constname": "k_pch_Null_RenderHeight_Int32","consttype": "const char *", "constval": "renderHeight"} +,{ + "constname": "k_pch_Null_SecondsFromVsyncToPhotons_Float","consttype": "const char *", "constval": "secondsFromVsyncToPhotons"} +,{ + "constname": "k_pch_Null_DisplayFrequency_Float","consttype": "const char *", "constval": "displayFrequency"} +,{ + "constname": "k_pch_Notifications_Section","consttype": "const char *", "constval": "notifications"} +,{ + "constname": "k_pch_Notifications_DoNotDisturb_Bool","consttype": "const char *", "constval": "DoNotDisturb"} +,{ + "constname": "IVRSettings_Version","consttype": "const char *const", "constval": "IVRSettings_001"} +,{ "constname": "IVRCameraAccess_Version","consttype": "const char *const", "constval": "IVRCameraAccess_001"} ,{ - "constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_001"} + "constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_002"} ], "structs":[{"struct": "vr::HmdMatrix34_t","fields": [ { "fieldname": "m", "fieldtype": "float [3][4]"}]} @@ -344,6 +486,8 @@ { "fieldname": "m", "fieldtype": "float [4][4]"}]} ,{"struct": "vr::HmdVector3_t","fields": [ { "fieldname": "v", "fieldtype": "float [3]"}]} +,{"struct": "vr::HmdVector4_t","fields": [ +{ "fieldname": "v", "fieldtype": "float [4]"}]} ,{"struct": "vr::HmdVector3d_t","fields": [ { "fieldname": "v", "fieldtype": "double [3]"}]} ,{"struct": "vr::HmdVector2_t","fields": [ @@ -353,6 +497,11 @@ { "fieldname": "x", "fieldtype": "double"}, { "fieldname": "y", "fieldtype": "double"}, { "fieldname": "z", "fieldtype": "double"}]} +,{"struct": "vr::HmdColor_t","fields": [ +{ "fieldname": "r", "fieldtype": "float"}, +{ "fieldname": "g", "fieldtype": "float"}, +{ "fieldname": "b", "fieldtype": "float"}, +{ "fieldname": "a", "fieldtype": "float"}]} ,{"struct": "vr::HmdQuad_t","fields": [ { "fieldname": "vCorners", "fieldtype": "struct vr::HmdVector3_t [4]"}]} ,{"struct": "vr::DistortionCoordinates_t","fields": [ @@ -622,6 +771,11 @@ } ,{ "classname": "vr::IVRSystem", + "methodname": "GetRawZeroPoseToStandingAbsoluteTrackingPose", + "returntype": "struct vr::HmdMatrix34_t" +} +,{ + "classname": "vr::IVRSystem", "methodname": "GetSortedTrackedDeviceIndicesOfClass", "returntype": "uint32_t", "params": [ @@ -633,6 +787,14 @@ } ,{ "classname": "vr::IVRSystem", + "methodname": "GetTrackedDeviceActivityLevel", + "returntype": "vr::EDeviceActivityLevel", + "params": [ +{ "paramname": "unDeviceId" ,"paramtype": "vr::TrackedDeviceIndex_t"} + ] +} +,{ + "classname": "vr::IVRSystem", "methodname": "GetTrackedDeviceClass", "returntype": "vr::TrackedDeviceClass", "params": [ @@ -824,6 +986,14 @@ ] } ,{ + "classname": "vr::IVRSystem", + "methodname": "PerformFirmwareUpdate", + "returntype": "vr::VRFirmwareError", + "params": [ +{ "paramname": "unDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"} + ] +} +,{ "classname": "vr::IVRApplications", "methodname": "AddApplicationManifest", "returntype": "vr::EVRApplicationError", @@ -1006,6 +1176,36 @@ "returntype": "void" } ,{ + "classname": "vr::IVRChaperone", + "methodname": "SetSceneColor", + "returntype": "void", + "params": [ +{ "paramname": "color" ,"paramtype": "struct vr::HmdColor_t"} + ] +} +,{ + "classname": "vr::IVRChaperone", + "methodname": "GetBoundsColor", + "returntype": "void", + "params": [ +{ "paramname": "pOutputColorArray" ,"paramtype": "struct vr::HmdColor_t *"}, +{ "paramname": "nNumOutputColors" ,"paramtype": "int"} + ] +} +,{ + "classname": "vr::IVRChaperone", + "methodname": "AreBoundsVisible", + "returntype": "bool" +} +,{ + "classname": "vr::IVRChaperone", + "methodname": "ForceBoundsVisible", + "returntype": "void", + "params": [ +{ "paramname": "bForce" ,"paramtype": "bool"} + ] +} +,{ "classname": "vr::IVRCompositor", "methodname": "GetLastError", "returntype": "uint32_t", @@ -1059,7 +1259,8 @@ { "paramname": "eEye" ,"paramtype": "vr::Hmd_Eye"}, { "paramname": "eTextureType" ,"paramtype": "vr::GraphicsAPIConvention"}, { "paramname": "pTexture" ,"paramtype": "void *"}, -{ "paramname": "pBounds" ,"paramtype": "const struct vr::VRTextureBounds_t *"} +{ "paramname": "pBounds" ,"paramtype": "const struct vr::VRTextureBounds_t *"}, +{ "paramname": "nSubmitFlags" ,"paramtype": "vr::VRSubmitFlags_t"} ] } ,{ @@ -1100,6 +1301,25 @@ } ,{ "classname": "vr::IVRCompositor", + "methodname": "SetSkyboxOverride", + "returntype": "void", + "params": [ +{ "paramname": "eTextureType" ,"paramtype": "vr::GraphicsAPIConvention"}, +{ "paramname": "pFront" ,"paramtype": "void *"}, +{ "paramname": "pBack" ,"paramtype": "void *"}, +{ "paramname": "pLeft" ,"paramtype": "void *"}, +{ "paramname": "pRight" ,"paramtype": "void *"}, +{ "paramname": "pTop" ,"paramtype": "void *"}, +{ "paramname": "pBottom" ,"paramtype": "void *"} + ] +} +,{ + "classname": "vr::IVRCompositor", + "methodname": "ClearSkyboxOverride", + "returntype": "void" +} +,{ + "classname": "vr::IVRCompositor", "methodname": "CompositorBringToFront", "returntype": "void" } @@ -1496,6 +1716,14 @@ } ,{ "classname": "vr::IVROverlay", + "methodname": "IsFocusOverlay", + "returntype": "bool", + "params": [ +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"} + ] +} +,{ + "classname": "vr::IVROverlay", "methodname": "SetOverlayTexture", "returntype": "vr::VROverlayError", "params": [ @@ -1743,10 +1971,10 @@ "params": [ { "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, { "paramname": "ulUserValue" ,"paramtype": "uint64_t"}, -{ "paramname": "strType" ,"paramtype": "char *"}, -{ "paramname": "strText" ,"paramtype": "char *"}, -{ "paramname": "strCategory" ,"paramtype": "char *"}, -{ "paramname": "photo" ,"paramtype": "struct vr::NotificationBitmap *"}, +{ "paramname": "strType" ,"paramtype": "const char *"}, +{ "paramname": "strText" ,"paramtype": "const char *"}, +{ "paramname": "strCategory" ,"paramtype": "const char *"}, +{ "paramname": "photo" ,"paramtype": "const struct vr::NotificationBitmap *"}, { "paramname": "notificationId" ,"paramtype": "vr::VRNotificationId *"} ] } @@ -1759,6 +1987,112 @@ ] } ,{ + "classname": "vr::IVRSettings", + "methodname": "GetSettingsErrorNameFromEnum", + "returntype": "const char *", + "params": [ +{ "paramname": "eError" ,"paramtype": "vr::EVRSettingsError"} + ] +} +,{ + "classname": "vr::IVRSettings", + "methodname": "Sync", + "returntype": "void", + "params": [ +{ "paramname": "peError" ,"paramtype": "vr::EVRSettingsError *"} + ] +} +,{ + "classname": "vr::IVRSettings", + "methodname": "GetBool", + "returntype": "bool", + "params": [ +{ "paramname": "pchSection" ,"paramtype": "const char *"}, +{ "paramname": "pchSettingsKey" ,"paramtype": "const char *"}, +{ "paramname": "bDefaultValue" ,"paramtype": "bool"}, +{ "paramname": "peError" ,"paramtype": "vr::EVRSettingsError *"} + ] +} +,{ + "classname": "vr::IVRSettings", + "methodname": "SetBool", + "returntype": "void", + "params": [ +{ "paramname": "pchSection" ,"paramtype": "const char *"}, +{ "paramname": "pchSettingsKey" ,"paramtype": "const char *"}, +{ "paramname": "bValue" ,"paramtype": "bool"}, +{ "paramname": "peError" ,"paramtype": "vr::EVRSettingsError *"} + ] +} +,{ + "classname": "vr::IVRSettings", + "methodname": "GetInt32", + "returntype": "int32_t", + "params": [ +{ "paramname": "pchSection" ,"paramtype": "const char *"}, +{ "paramname": "pchSettingsKey" ,"paramtype": "const char *"}, +{ "paramname": "nDefaultValue" ,"paramtype": "int32_t"}, +{ "paramname": "peError" ,"paramtype": "vr::EVRSettingsError *"} + ] +} +,{ + "classname": "vr::IVRSettings", + "methodname": "SetInt32", + "returntype": "void", + "params": [ +{ "paramname": "pchSection" ,"paramtype": "const char *"}, +{ "paramname": "pchSettingsKey" ,"paramtype": "const char *"}, +{ "paramname": "nValue" ,"paramtype": "int32_t"}, +{ "paramname": "peError" ,"paramtype": "vr::EVRSettingsError *"} + ] +} +,{ + "classname": "vr::IVRSettings", + "methodname": "GetFloat", + "returntype": "float", + "params": [ +{ "paramname": "pchSection" ,"paramtype": "const char *"}, +{ "paramname": "pchSettingsKey" ,"paramtype": "const char *"}, +{ "paramname": "flDefaultValue" ,"paramtype": "float"}, +{ "paramname": "peError" ,"paramtype": "vr::EVRSettingsError *"} + ] +} +,{ + "classname": "vr::IVRSettings", + "methodname": "SetFloat", + "returntype": "void", + "params": [ +{ "paramname": "pchSection" ,"paramtype": "const char *"}, +{ "paramname": "pchSettingsKey" ,"paramtype": "const char *"}, +{ "paramname": "flValue" ,"paramtype": "float"}, +{ "paramname": "peError" ,"paramtype": "vr::EVRSettingsError *"} + ] +} +,{ + "classname": "vr::IVRSettings", + "methodname": "GetString", + "returntype": "void", + "params": [ +{ "paramname": "pchSection" ,"paramtype": "const char *"}, +{ "paramname": "pchSettingsKey" ,"paramtype": "const char *"}, +{ "paramname": "pchValue" ,"paramtype": "char *"}, +{ "paramname": "unValueLen" ,"paramtype": "uint32_t"}, +{ "paramname": "pchDefaultValue" ,"paramtype": "const char *"}, +{ "paramname": "peError" ,"paramtype": "vr::EVRSettingsError *"} + ] +} +,{ + "classname": "vr::IVRSettings", + "methodname": "SetString", + "returntype": "void", + "params": [ +{ "paramname": "pchSection" ,"paramtype": "const char *"}, +{ "paramname": "pchSettingsKey" ,"paramtype": "const char *"}, +{ "paramname": "pchValue" ,"paramtype": "const char *"}, +{ "paramname": "peError" ,"paramtype": "vr::EVRSettingsError *"} + ] +} +,{ "classname": "vr::IVRCameraAccess", "methodname": "GetCameraCount", "returntype": "uint32_t" @@ -1805,7 +2139,7 @@ "methodname": "CommitWorkingCopy", "returntype": "bool", "params": [ -{ "paramname": "pchCalibrationName" ,"paramtype": "const char *"} +{ "paramname": "configFile" ,"paramtype": "vr::EChaperoneConfigFile"} ] } ,{ @@ -1943,7 +2277,10 @@ ,{ "classname": "vr::IVRChaperoneSetup", "methodname": "ReloadFromDisk", - "returntype": "void" + "returntype": "void", + "params": [ +{ "paramname": "configFile" ,"paramtype": "vr::EChaperoneConfigFile"} + ] } ] } \ No newline at end of file
diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h index e16da87..7736501 100644 --- a/headers/openvr_capi.h +++ b/headers/openvr_capi.h
@@ -80,23 +80,63 @@ unsigned int k_unMaxPropertyStringSize = 32768; unsigned int k_unControllerStateAxisCount = 5; unsigned long k_ulOverlayHandleInvalid = 0; -char * IVRSystem_Version = "IVRSystem_005"; +char * IVRSystem_Version = "IVRSystem_006"; unsigned int k_unMaxApplicationKeyLength = 128; char * IVRApplications_Version = "IVRApplications_001"; char * IVRChaperone_Version = "IVRChaperone_002"; -char * IVRCompositor_Version = "IVRCompositor_007"; +char * IVRCompositor_Version = "IVRCompositor_008"; unsigned int k_unVROverlayMaxKeyLength = 128; unsigned int k_unVROverlayMaxNameLength = 128; unsigned int k_unMaxOverlayCount = 32; -char * IVROverlay_Version = "IVROverlay_004"; +char * IVROverlay_Version = "IVROverlay_005"; char * IVRRenderModels_Version = "IVRRenderModels_001"; char * IVRControlPanel_Version = "IVRControlPanel_001"; unsigned int k_unNotificationTypeMaxSize = 16; unsigned int k_unNotificationTextMaxSize = 128; unsigned int k_unNotificationCatagoryMaxSize = 32; char * IVRNotifications_Version = "IVRNotifications_001"; +unsigned int k_unMaxSettingsKeyLength = 128; +char * k_pch_SteamVR_Section = "steamvr"; +char * k_pch_SteamVR_RequireHmd_String = "requireHmd"; +char * k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; +char * k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; +char * k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; +char * k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; +char * k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; +char * k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps"; +char * k_pch_SteamVR_LogLevel_Int32 = "loglevel"; +char * k_pch_SteamVR_IPD_Float = "ipd"; +char * k_pch_Lighthouse_Section = "driver_lighthouse"; +char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; +char * k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; +char * k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; +char * k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; +char * k_pch_Lighthouse_LighthouseName_String = "lighthousename"; +char * k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; +char * k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; +char * k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; +char * k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; +char * k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; +char * k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; +char * k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; +char * k_pch_Null_Section = "driver_null"; +char * k_pch_Null_EnableNullDriver_Bool = "enable"; +char * k_pch_Null_Id_String = "id"; +char * k_pch_Null_SerialNumber_String = "serialNumber"; +char * k_pch_Null_ModelNumber_String = "modelNumber"; +char * k_pch_Null_WindowX_Int32 = "windowX"; +char * k_pch_Null_WindowY_Int32 = "windowY"; +char * k_pch_Null_WindowWidth_Int32 = "windowWidth"; +char * k_pch_Null_WindowHeight_Int32 = "windowHeight"; +char * k_pch_Null_RenderWidth_Int32 = "renderWidth"; +char * k_pch_Null_RenderHeight_Int32 = "renderHeight"; +char * k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; +char * k_pch_Null_DisplayFrequency_Float = "displayFrequency"; +char * k_pch_Notifications_Section = "notifications"; +char * k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; +char * IVRSettings_Version = "IVRSettings_001"; char * IVRCameraAccess_Version = "IVRCameraAccess_001"; -char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_001"; +char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_002"; typedef enum Hmd_Eye { Hmd_Eye_Eye_Left = 0, @@ -145,6 +185,15 @@ TrackedDeviceProperty_Prop_DeviceIsCharging_Bool = 1011, TrackedDeviceProperty_Prop_DeviceBatteryPercentage_Float = 1012, TrackedDeviceProperty_Prop_StatusDisplayTransform_Matrix34 = 1013, + TrackedDeviceProperty_Prop_Firmware_UpdateAvailable_Bool = 1014, + TrackedDeviceProperty_Prop_Firmware_ManualUpdate_Bool = 1015, + TrackedDeviceProperty_Prop_Firmware_ManualUpdateURL_String = 1016, + TrackedDeviceProperty_Prop_HardwareRevision_Uint64 = 1017, + TrackedDeviceProperty_Prop_FirmwareVersion_Uint64 = 1018, + TrackedDeviceProperty_Prop_FPGAVersion_Uint64 = 1019, + TrackedDeviceProperty_Prop_VRCVersion_Uint64 = 1020, + TrackedDeviceProperty_Prop_RadioVersion_Uint64 = 1021, + TrackedDeviceProperty_Prop_DongleVersion_Uint64 = 1022, TrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000, TrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001, TrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002, @@ -153,6 +202,9 @@ TrackedDeviceProperty_Prop_PreviousUniverseId_Uint64 = 2005, TrackedDeviceProperty_Prop_DisplayFirmwareVersion_String = 2006, TrackedDeviceProperty_Prop_IsOnDesktop_Bool = 2007, + TrackedDeviceProperty_Prop_DisplayMCType_Int32 = 2008, + TrackedDeviceProperty_Prop_DisplayMCOffset_Float = 2009, + TrackedDeviceProperty_Prop_DisplayMCScale_Float = 2010, TrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000, TrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001, TrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002, @@ -166,6 +218,15 @@ TrackedDeviceProperty_Prop_FieldOfViewBottomDegrees_Float = 4003, TrackedDeviceProperty_Prop_TrackingRangeMinimumMeters_Float = 4004, TrackedDeviceProperty_Prop_TrackingRangeMaximumMeters_Float = 4005, + TrackedDeviceProperty_Prop_TrackedCamera_IntrinsicsFX_Float = 5000, + TrackedDeviceProperty_Prop_TrackedCamera_IntrinsicsFY_Float = 5001, + TrackedDeviceProperty_Prop_TrackedCamera_IntrinsicsCX_Float = 5002, + TrackedDeviceProperty_Prop_TrackedCamera_IntrinsicsCY_Float = 5003, + TrackedDeviceProperty_Prop_TrackedCamera_IntrinsicsK1_Float = 5004, + TrackedDeviceProperty_Prop_TrackedCamera_IntrinsicsK2_Float = 5005, + TrackedDeviceProperty_Prop_TrackedCamera_IntrinsicsP1_Float = 5006, + TrackedDeviceProperty_Prop_TrackedCamera_IntrinsicsP2_Float = 5007, + TrackedDeviceProperty_Prop_TrackedCamera_IntrinsicsK3_Float = 5008, }; typedef enum TrackedPropertyError { @@ -179,6 +240,11 @@ TrackedPropertyError_TrackedProp_ValueNotProvidedByDevice = 7, TrackedPropertyError_TrackedProp_StringExceedsMaximumLength = 8, }; +typedef enum VRSubmitFlags_t +{ + VRSubmitFlags_t_Submit_Default = 0, + VRSubmitFlags_t_Submit_LensDistortionAlreadyApplied = 1, +}; typedef enum VRStatusState_t { VRStatusState_t_State_OK = 0, @@ -193,6 +259,8 @@ EVREventType_VREvent_TrackedDeviceActivated = 100, EVREventType_VREvent_TrackedDeviceDeactivated = 101, EVREventType_VREvent_TrackedDeviceUpdated = 102, + EVREventType_VREvent_TrackedDeviceUserInteractionStarted = 103, + EVREventType_VREvent_TrackedDeviceUserInteractionEnded = 104, EVREventType_VREvent_ButtonPress = 200, EVREventType_VREvent_ButtonUnpress = 201, EVREventType_VREvent_ButtonTouch = 202, @@ -200,6 +268,8 @@ EVREventType_VREvent_MouseMove = 300, EVREventType_VREvent_MouseButtonDown = 301, EVREventType_VREvent_MouseButtonUp = 302, + EVREventType_VREvent_FocusEnter = 303, + EVREventType_VREvent_FocusLeave = 304, EVREventType_VREvent_InputFocusCaptured = 400, EVREventType_VREvent_InputFocusReleased = 401, EVREventType_VREvent_SceneFocusLost = 402, @@ -221,7 +291,18 @@ EVREventType_VREvent_ProcessQuit = 701, EVREventType_VREvent_ChaperoneDataHasChanged = 800, EVREventType_VREvent_ChaperoneUniverseHasChanged = 801, + EVREventType_VREvent_ChaperoneTempDataHasChanged = 802, EVREventType_VREvent_StatusUpdate = 900, + EVREventType_VREvent_MCImageUpdated = 1000, + EVREventType_VREvent_FirmwareUpdateStarted = 1100, + EVREventType_VREvent_FirmwareUpdateFinished = 1101, +}; +typedef enum EDeviceActivityLevel +{ + EDeviceActivityLevel_k_EDeviceActivityLevel_Unknown = -1, + EDeviceActivityLevel_k_EDeviceActivityLevel_Idle = 0, + EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction = 1, + EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction_Timeout = 2, }; typedef enum EVRButtonId { @@ -281,6 +362,12 @@ EVRApplicationType_VRApplication_Scene = 1, EVRApplicationType_VRApplication_Overlay = 2, }; +typedef enum VRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; typedef enum HmdError { HmdError_None = 0, @@ -303,6 +390,7 @@ HmdError_Init_Retry = 115, HmdError_Init_InitCanceledByUser = 116, HmdError_Init_AnotherAppLaunching = 117, + HmdError_Init_SettingsInitFailed = 118, HmdError_Driver_Failed = 200, HmdError_Driver_Unknown = 201, HmdError_Driver_HmdUnknown = 202, @@ -318,6 +406,13 @@ HmdError_IPC_CompositorInitFailed = 303, HmdError_IPC_MutexInitFailed = 304, HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + HmdError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + HmdError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + HmdError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + HmdError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + HmdError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + HmdError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + HmdError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, HmdError_Steam_SteamInstallationNotFound = 2000, }; typedef enum EVRApplicationError @@ -396,6 +491,13 @@ NotificationError_t_k_ENotificationError_Fail = 1, NotificationError_t_k_eNotificationError_InvalidParam = 2, }; +typedef enum EVRSettingsError +{ + EVRSettingsError_VRSettingsError_None = 0, + EVRSettingsError_VRSettingsError_IPCFailed = 1, + EVRSettingsError_VRSettingsError_WriteFailed = 2, + EVRSettingsError_VRSettingsError_ReadFailed = 3, +}; typedef enum CameraImageResult { CameraImageResult_OK = 0, @@ -403,6 +505,11 @@ CameraImageResult_NotReady = 2, CameraImageResult_SameFrame = 3, }; +typedef enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, + EChaperoneConfigFile_Temp = 2, +}; typedef struct HmdMatrix34_t { float m[3][4]; //float[3][4] @@ -415,6 +522,10 @@ { float v[3]; //float[3] } HmdVector3_t; +typedef struct HmdVector4_t +{ + float v[4]; //float[4] +} HmdVector4_t; typedef struct HmdVector3d_t { double v[3]; //double[3] @@ -430,6 +541,13 @@ double y; double z; } HmdQuaternion_t; +typedef struct HmdColor_t +{ + float r; + float g; + float b; + float a; +} HmdColor_t; typedef struct HmdQuad_t { HmdVector3_t vCorners[4]; //HmdVector3_t[4] @@ -596,7 +714,9 @@ S_API void VR_IVRSystem_GetDeviceToAbsoluteTrackingPose(intptr_t instancePtr, TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, struct TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount); S_API void VR_IVRSystem_ResetSeatedZeroPose(intptr_t instancePtr); S_API struct HmdMatrix34_t VR_IVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(intptr_t instancePtr); +S_API struct HmdMatrix34_t VR_IVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(intptr_t instancePtr); S_API uint32_t VR_IVRSystem_GetSortedTrackedDeviceIndicesOfClass(intptr_t instancePtr, TrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex); +S_API EDeviceActivityLevel VR_IVRSystem_GetTrackedDeviceActivityLevel(intptr_t instancePtr, TrackedDeviceIndex_t unDeviceId); S_API TrackedDeviceClass VR_IVRSystem_GetTrackedDeviceClass(intptr_t instancePtr, TrackedDeviceIndex_t unDeviceIndex); S_API bool VR_IVRSystem_IsTrackedDeviceConnected(intptr_t instancePtr, TrackedDeviceIndex_t unDeviceIndex); S_API bool VR_IVRSystem_GetBoolTrackedDeviceProperty(intptr_t instancePtr, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError); @@ -619,6 +739,7 @@ S_API void VR_IVRSystem_ReleaseInputFocus(intptr_t instancePtr); S_API bool VR_IVRSystem_IsInputFocusCapturedByAnotherProcess(intptr_t instancePtr); S_API uint32_t VR_IVRSystem_DriverDebugRequest(intptr_t instancePtr, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize); +S_API VRFirmwareError VR_IVRSystem_PerformFirmwareUpdate(intptr_t instancePtr, TrackedDeviceIndex_t unDeviceIndex); S_API EVRApplicationError VR_IVRApplications_AddApplicationManifest(intptr_t instancePtr, const char * pchApplicationManifestFullPath, bool bTemporary); S_API EVRApplicationError VR_IVRApplications_RemoveApplicationManifest(intptr_t instancePtr, const char * pchApplicationManifestFullPath); S_API bool VR_IVRApplications_IsApplicationInstalled(intptr_t instancePtr, const char * pchAppKey); @@ -641,17 +762,23 @@ S_API bool VR_IVRChaperone_GetHardBoundsInfo(intptr_t instancePtr, struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount); S_API bool VR_IVRChaperone_GetSeatedBoundsInfo(intptr_t instancePtr, struct ChaperoneSeatedBoundsInfo_t * pInfo); S_API void VR_IVRChaperone_ReloadInfo(intptr_t instancePtr); +S_API void VR_IVRChaperone_SetSceneColor(intptr_t instancePtr, struct HmdColor_t color); +S_API void VR_IVRChaperone_GetBoundsColor(intptr_t instancePtr, struct HmdColor_t * pOutputColorArray, int nNumOutputColors); +S_API bool VR_IVRChaperone_AreBoundsVisible(intptr_t instancePtr); +S_API void VR_IVRChaperone_ForceBoundsVisible(intptr_t instancePtr, bool bForce); S_API uint32_t VR_IVRCompositor_GetLastError(intptr_t instancePtr, char * pchBuffer, uint32_t unBufferSize); S_API void VR_IVRCompositor_SetVSync(intptr_t instancePtr, bool bVSync); S_API bool VR_IVRCompositor_GetVSync(intptr_t instancePtr); S_API void VR_IVRCompositor_SetGamma(intptr_t instancePtr, float fGamma); S_API float VR_IVRCompositor_GetGamma(intptr_t instancePtr); S_API VRCompositorError VR_IVRCompositor_WaitGetPoses(intptr_t instancePtr, struct TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, struct TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); -S_API VRCompositorError VR_IVRCompositor_Submit(intptr_t instancePtr, Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void * pTexture, const struct VRTextureBounds_t * pBounds); +S_API VRCompositorError VR_IVRCompositor_Submit(intptr_t instancePtr, Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void * pTexture, const struct VRTextureBounds_t * pBounds, VRSubmitFlags_t nSubmitFlags); S_API void VR_IVRCompositor_ClearLastSubmittedFrame(intptr_t instancePtr); S_API bool VR_IVRCompositor_GetFrameTiming(intptr_t instancePtr, struct Compositor_FrameTiming * pTiming, uint32_t unFramesAgo); S_API void VR_IVRCompositor_FadeToColor(intptr_t instancePtr, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground); S_API void VR_IVRCompositor_FadeGrid(intptr_t instancePtr, float fSeconds, bool bFadeIn); +S_API void VR_IVRCompositor_SetSkyboxOverride(intptr_t instancePtr, GraphicsAPIConvention eTextureType, void * pFront, void * pBack, void * pLeft, void * pRight, void * pTop, void * pBottom); +S_API void VR_IVRCompositor_ClearSkyboxOverride(intptr_t instancePtr); S_API void VR_IVRCompositor_CompositorBringToFront(intptr_t instancePtr); S_API void VR_IVRCompositor_CompositorGoToBack(intptr_t instancePtr); S_API void VR_IVRCompositor_CompositorQuit(intptr_t instancePtr); @@ -698,6 +825,7 @@ S_API VROverlayError VR_IVROverlay_SetOverlayMouseScale(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, const struct HmdVector2_t * pvecMouseScale); S_API bool VR_IVROverlay_ComputeOverlayIntersection(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, const struct VROverlayIntersectionParams_t * pParams, struct VROverlayIntersectionResults_t * pResults); S_API bool VR_IVROverlay_HandleControllerOverlayInteractionAsMouse(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex); +S_API bool VR_IVROverlay_IsFocusOverlay(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle); S_API VROverlayError VR_IVROverlay_SetOverlayTexture(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void * pTexture); S_API VROverlayError VR_IVROverlay_ClearOverlayTexture(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle); S_API VROverlayError VR_IVROverlay_SetOverlayRaw(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth); @@ -726,14 +854,24 @@ S_API uint32_t VR_IVRControlPanel_StartVRProcess(intptr_t instancePtr, const char * pchExecutable, const char ** pchArguments, uint32_t unArgumentCount, const char * pchWorkingDirectory); S_API void VR_IVRControlPanel_SetMasterProcessToThis(intptr_t instancePtr); S_API uint32_t VR_IVRNotifications_GetErrorString(intptr_t instancePtr, NotificationError_t error, char * pchBuffer, uint32_t unBufferSize); -S_API NotificationError_t VR_IVRNotifications_CreateNotification(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, char * strType, char * strText, char * strCategory, struct NotificationBitmap * photo, VRNotificationId * notificationId); +S_API NotificationError_t VR_IVRNotifications_CreateNotification(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, const char * strType, const char * strText, const char * strCategory, const struct NotificationBitmap * photo, VRNotificationId * notificationId); S_API NotificationError_t VR_IVRNotifications_DismissNotification(intptr_t instancePtr, VRNotificationId notificationId); +S_API char * VR_IVRSettings_GetSettingsErrorNameFromEnum(intptr_t instancePtr, EVRSettingsError eError); +S_API void VR_IVRSettings_Sync(intptr_t instancePtr, EVRSettingsError * peError); +S_API bool VR_IVRSettings_GetBool(intptr_t instancePtr, const char * pchSection, const char * pchSettingsKey, bool bDefaultValue, EVRSettingsError * peError); +S_API void VR_IVRSettings_SetBool(intptr_t instancePtr, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError); +S_API int32_t VR_IVRSettings_GetInt32(intptr_t instancePtr, const char * pchSection, const char * pchSettingsKey, int32_t nDefaultValue, EVRSettingsError * peError); +S_API void VR_IVRSettings_SetInt32(intptr_t instancePtr, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError); +S_API float VR_IVRSettings_GetFloat(intptr_t instancePtr, const char * pchSection, const char * pchSettingsKey, float flDefaultValue, EVRSettingsError * peError); +S_API void VR_IVRSettings_SetFloat(intptr_t instancePtr, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError); +S_API void VR_IVRSettings_GetString(intptr_t instancePtr, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, const char * pchDefaultValue, EVRSettingsError * peError); +S_API void VR_IVRSettings_SetString(intptr_t instancePtr, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError); S_API uint32_t VR_IVRCameraAccess_GetCameraCount(intptr_t instancePtr); S_API uint32_t VR_IVRCameraAccess_GetCameraId(intptr_t instancePtr, uint32_t unCameraIndex, char * pchBuffer, uint32_t unBufferLen); S_API bool VR_IVRCameraAccess_EnableCamera(intptr_t instancePtr, uint32_t unCameraIndex, bool bEnabled); S_API bool VR_IVRCameraAccess_GetCameraInfo(intptr_t instancePtr, uint32_t unCameraIndex, struct CameraInfo_t * pCameraInfo); S_API bool VR_IVRCameraAccess_GetCameraImage(intptr_t instancePtr, uint32_t unCameraIndex, struct CameraImage_t * pCameraImage); -S_API bool VR_IVRChaperoneSetup_CommitWorkingCopy(intptr_t instancePtr, const char * pchCalibrationName); +S_API bool VR_IVRChaperoneSetup_CommitWorkingCopy(intptr_t instancePtr, EChaperoneConfigFile configFile); S_API void VR_IVRChaperoneSetup_RevertWorkingCopy(intptr_t instancePtr); S_API bool VR_IVRChaperoneSetup_GetWorkingSoftBoundsInfo(intptr_t instancePtr, struct ChaperoneSoftBoundsInfo_t * pInfo); S_API bool VR_IVRChaperoneSetup_GetWorkingHardBoundsInfo(intptr_t instancePtr, struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount); @@ -750,7 +888,7 @@ S_API void VR_IVRChaperoneSetup_SetWorkingTagPoseByName(intptr_t instancePtr, const char * pchTagName, const struct HmdMatrix34_t & matSeatedZeroPoseToRawTrackingPose, float flScale); S_API void VR_IVRChaperoneSetup_RemoveWorkingTagPoseByName(intptr_t instancePtr, const char * pchTagName); S_API void VR_IVRChaperoneSetup_RemoveAllWorkingTagPoses(intptr_t instancePtr); -S_API void VR_IVRChaperoneSetup_ReloadFromDisk(intptr_t instancePtr); +S_API void VR_IVRChaperoneSetup_ReloadFromDisk(intptr_t instancePtr, EChaperoneConfigFile configFile); // Global entry points S_API intptr_t VR_Init( HmdError *peError, EVRApplicationType eType );
diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h index 345e08c..2da4e6c 100644 --- a/headers/openvr_driver.h +++ b/headers/openvr_driver.h
@@ -48,6 +48,11 @@ float v[3]; }; +struct HmdVector4_t +{ + float v[4]; +}; + struct HmdVector3d_t { double v[3]; @@ -63,6 +68,11 @@ double w, x, y, z; }; +struct HmdColor_t +{ + float r, g, b, a; +}; + struct HmdQuad_t { HmdVector3_t vCorners[ 4 ]; @@ -147,47 +157,71 @@ enum TrackedDeviceProperty { // general properties that apply to all device classes - Prop_TrackingSystemName_String = 1000, - Prop_ModelNumber_String = 1001, - Prop_SerialNumber_String = 1002, - Prop_RenderModelName_String = 1003, - Prop_WillDriftInYaw_Bool = 1004, - Prop_ManufacturerName_String = 1005, - Prop_TrackingFirmwareVersion_String = 1006, - Prop_HardwareRevision_String = 1007, - Prop_AllWirelessDongleDescriptions_String= 1008, - Prop_ConnectedWirelessDongle_String = 1009, - Prop_DeviceIsWireless_Bool = 1010, - Prop_DeviceIsCharging_Bool = 1011, - Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full - Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + // Properties that are unique to TrackedDeviceClass_HMD - Prop_ReportsTimeSinceVSync_Bool = 2000, - Prop_SecondsFromVsyncToPhotons_Float = 2001, - Prop_DisplayFrequency_Float = 2002, - Prop_UserIpdMeters_Float = 2003, - Prop_CurrentUniverseId_Uint64 = 2004, - Prop_PreviousUniverseId_Uint64 = 2005, - Prop_DisplayFirmwareVersion_String = 2006, - Prop_IsOnDesktop_Bool = 2007, + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, // Properties that are unique to TrackedDeviceClass_Controller - Prop_AttachedDeviceId_String = 3000, - Prop_SupportedButtons_Uint64 = 3001, - Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType - Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType - Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType - Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType - Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType // Properties that are unique to TrackedDeviceClass_TrackingReference - Prop_FieldOfViewLeftDegrees_Float = 4000, - Prop_FieldOfViewRightDegrees_Float = 4001, - Prop_FieldOfViewTopDegrees_Float = 4002, - Prop_FieldOfViewBottomDegrees_Float = 4003, - Prop_TrackingRangeMinimumMeters_Float = 4004, - Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + + // Camera calibration parameters + Prop_TrackedCamera_IntrinsicsFX_Float = 5000, + Prop_TrackedCamera_IntrinsicsFY_Float = 5001, + Prop_TrackedCamera_IntrinsicsCX_Float = 5002, + Prop_TrackedCamera_IntrinsicsCY_Float = 5003, + Prop_TrackedCamera_IntrinsicsK1_Float = 5004, + Prop_TrackedCamera_IntrinsicsK2_Float = 5005, + Prop_TrackedCamera_IntrinsicsP1_Float = 5006, + Prop_TrackedCamera_IntrinsicsP2_Float = 5007, + Prop_TrackedCamera_IntrinsicsK3_Float = 5008, }; /** Used to pass device IDs to API calls */ @@ -247,6 +281,20 @@ float uMax, vMax; }; + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum VRSubmitFlags_t +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01 +}; + + /** Status of the overall system */ enum VRStatusState_t { @@ -266,6 +314,8 @@ VREvent_TrackedDeviceActivated = 100, VREvent_TrackedDeviceDeactivated = 101, VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, VREvent_ButtonPress = 200, // data is controller VREvent_ButtonUnpress = 201, // data is controller @@ -275,6 +325,8 @@ VREvent_MouseMove = 300, // data is mouse VREvent_MouseButtonDown = 301, // data is mouse VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay VREvent_InputFocusCaptured = 400, // data is process VREvent_InputFocusReleased = 401, // data is process @@ -301,8 +353,25 @@ VREvent_ChaperoneDataHasChanged = 800, VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, }; @@ -522,6 +591,16 @@ VRApplication_Overlay = 2, // Application only interacts with overlays }; + +/** error codes for firmware */ +enum VRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + /** error codes returned by Vr_Init */ // Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp @@ -548,6 +627,7 @@ HmdError_Init_Retry = 115, // Used internally to cause retries to vrserver HmdError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup HmdError_Init_AnotherAppLaunching = 117, + HmdError_Init_SettingsInitFailed = 118, HmdError_Driver_Failed = 200, HmdError_Driver_Unknown = 201, @@ -558,7 +638,7 @@ HmdError_Driver_NotCalibrated = 206, HmdError_Driver_CalibrationInvalid = 207, HmdError_Driver_HmdDisplayNotFound = 208, - + HmdError_IPC_ServerInitFailed = 300, HmdError_IPC_ConnectFailed = 301, HmdError_IPC_SharedStateInitFailed = 302, @@ -567,6 +647,14 @@ HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + HmdError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + HmdError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + HmdError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + HmdError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + HmdError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + HmdError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + HmdError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + HmdError_Steam_SteamInstallationNotFound = 2000, }; @@ -781,6 +869,26 @@ virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; // ----------------------------------- + // Direct mode methods + // ----------------------------------- + + /** Specific to Oculus compositor support, textures supplied must be created using this method. */ + virtual void CreateSwapTextureSet( uint32_t unPid, uint32_t unFormat, uint32_t unWidth, uint32_t unHeight, void *( *pSharedTextureHandles )[2] ) {} + + /** Used to textures created using CreateSwapTextureSet. Only one of the set's handles needs to be used to destroy the entire set. */ + virtual void DestroySwapTextureSet( void *pSharedTextureHandle ) {} + + /** Used to purge all texture sets for a given process. */ + virtual void DestroyAllSwapTextureSets( uint32_t unPid ) {} + + /** Call once per layer to draw for this frame. One shared texture handle per eye. Textures must be created + * using CreateSwapTextureSet and should be alternated per frame. Call Present once all layers have been submitted. */ + virtual void SubmitLayer( void *pSharedTextureHandles[2], const vr::VRTextureBounds_t * pBounds, const vr::HmdMatrix34_t * pPose ) {} + + /** Submits queued layers for display. */ + virtual void Present() {} + + // ----------------------------------- // Assorted capability methods // ----------------------------------- @@ -908,6 +1016,13 @@ /** notifies the server than a controller axis changed */ virtual void TrackedDeviceAxisUpdated( uint32_t unWhichDevice, uint32_t unWhichAxis, const VRControllerAxis_t & axisState ) = 0; + + /** Notifies the server that the MC image has been updated for the display attached to the device. This is + * only permitted on devices of the HMD class. */ + virtual void MCImageUpdated() = 0; + + /** always returns a pointer to a valid interface pointer of IVRSettings */ + virtual IVRSettings *GetSettings() = 0; }; @@ -918,6 +1033,8 @@ /** initializes the driver. This will be called before any other methods are called. * If Init returns anything other than HmdError_None the driver DLL will be unloaded. * + * pDriverHost will never be NULL, and will always be a pointer to a IServerDriverHost interface + * * pchUserDriverConfigDir - The absolute path of the directory where the driver should store user * config files. * pchDriverInstallDir - The absolute path of the root directory for the driver. @@ -978,6 +1095,8 @@ * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + /** always returns a pointer to a valid interface pointer of IVRSettings */ + virtual IVRSettings *GetSettings() = 0; }; @@ -990,6 +1109,8 @@ * except BIsHmdPresent(). BIsHmdPresent is called outside of the Init/Cleanup pair. * If Init returns anything other than HmdError_None the driver DLL will be unloaded. * + * pDriverHost will never be NULL, and will always be a pointer to a IClientDriverHost interface + * * pchUserDriverConfigDir - The absolute path of the directory where the driver should store user * config files. * pchDriverInstallDir - The absolute path of the root directory for the driver. @@ -1021,6 +1142,10 @@ * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. */ virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + /** Get the MC image for the current HMD. + * Returns the size in bytes of the buffer required to hold the specified resource. */ + virtual uint32_t GetMCImage( uint32_t *pImgWidth, uint32_t *pImgHeight, uint32_t *pChannels, void *pDataBuffer, uint32_t unBufferLen ) = 0; }; static const char *IClientTrackedDeviceProvider_Version = "IClientTrackedDeviceProvider_001";
diff --git a/lib/linux32/libopenvr_api.so b/lib/linux32/libopenvr_api.so index 8fbbb2f..162b4f8 100755 --- a/lib/linux32/libopenvr_api.so +++ b/lib/linux32/libopenvr_api.so Binary files differ
diff --git a/lib/linux64/libopenvr_api.so b/lib/linux64/libopenvr_api.so index 4efac73..070832e 100755 --- a/lib/linux64/libopenvr_api.so +++ b/lib/linux64/libopenvr_api.so Binary files differ
diff --git a/lib/win32/openvr_api.lib b/lib/win32/openvr_api.lib index 271889f..7c5bb74 100644 --- a/lib/win32/openvr_api.lib +++ b/lib/win32/openvr_api.lib Binary files differ
diff --git a/lib/win64/openvr_api.lib b/lib/win64/openvr_api.lib index a1d77ea..78d0bea 100644 --- a/lib/win64/openvr_api.lib +++ b/lib/win64/openvr_api.lib Binary files differ
diff --git a/samples/bin/win32/openvr_api.dll b/samples/bin/win32/openvr_api.dll index cd7ba5d..28adac3 100644 --- a/samples/bin/win32/openvr_api.dll +++ b/samples/bin/win32/openvr_api.dll Binary files differ
diff --git a/samples/bin/win64/openvr_api.dll b/samples/bin/win64/openvr_api.dll index e264d3d..1ede77d 100644 --- a/samples/bin/win64/openvr_api.dll +++ b/samples/bin/win64/openvr_api.dll Binary files differ
diff --git a/samples/shared/lodepng.cpp b/samples/shared/lodepng.cpp index 2be3fbe..d57a9d9 100644 --- a/samples/shared/lodepng.cpp +++ b/samples/shared/lodepng.cpp
@@ -2351,9 +2351,9 @@ { unsigned result = 0; size_t i; - for(i = nbits - 1; i < nbits; i--) + for ( i = 1; i <= nbits; i++ ) { - result += (unsigned)readBitFromReversedStream(bitpointer, bitstream) << i; + result += (unsigned)readBitFromReversedStream( bitpointer, bitstream ) << (nbits - i); } return result; }
diff --git a/samples/thirdparty/glew/glew-1.11.0/bin/Release/Win32/glewinfo.exe b/samples/thirdparty/glew/glew-1.11.0/bin/Release/Win32/glewinfo.exe old mode 100644 new mode 100755 Binary files differ
diff --git a/samples/thirdparty/glew/glew-1.11.0/bin/Release/Win32/visualinfo.exe b/samples/thirdparty/glew/glew-1.11.0/bin/Release/Win32/visualinfo.exe old mode 100644 new mode 100755 Binary files differ
diff --git a/samples/thirdparty/glew/glew-1.11.0/bin/Release/x64/glewinfo.exe b/samples/thirdparty/glew/glew-1.11.0/bin/Release/x64/glewinfo.exe old mode 100644 new mode 100755 Binary files differ
diff --git a/samples/thirdparty/glew/glew-1.11.0/bin/Release/x64/visualinfo.exe b/samples/thirdparty/glew/glew-1.11.0/bin/Release/x64/visualinfo.exe old mode 100644 new mode 100755 Binary files differ