diff --git a/bin/linux32/libopenvr_api.so b/bin/linux32/libopenvr_api.so index be3cbb9b..a2505450 100755 Binary files a/bin/linux32/libopenvr_api.so and b/bin/linux32/libopenvr_api.so differ diff --git a/bin/linux32/libopenvr_api.so.dbg b/bin/linux32/libopenvr_api.so.dbg index a2ae05de..a26ac1c1 100755 Binary files a/bin/linux32/libopenvr_api.so.dbg and b/bin/linux32/libopenvr_api.so.dbg differ diff --git a/bin/linux64/libopenvr_api.so b/bin/linux64/libopenvr_api.so index 79e2c84c..100bbb12 100755 Binary files a/bin/linux64/libopenvr_api.so and b/bin/linux64/libopenvr_api.so differ diff --git a/bin/linux64/libopenvr_api.so.dbg b/bin/linux64/libopenvr_api.so.dbg index df02108c..48a4088c 100755 Binary files a/bin/linux64/libopenvr_api.so.dbg and b/bin/linux64/libopenvr_api.so.dbg differ diff --git a/bin/osx32/libopenvr_api.dylib b/bin/osx32/libopenvr_api.dylib index 7ff98b2a..7239d3a9 100755 Binary files a/bin/osx32/libopenvr_api.dylib and b/bin/osx32/libopenvr_api.dylib differ diff --git a/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib b/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib index d8b2a037..326855fe 100644 Binary files a/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib and b/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib differ diff --git a/bin/win32/openvr_api.dll b/bin/win32/openvr_api.dll index d917770d..cee55bee 100644 Binary files a/bin/win32/openvr_api.dll and b/bin/win32/openvr_api.dll differ diff --git a/bin/win32/openvr_api.pdb b/bin/win32/openvr_api.pdb index 5091c83d..e106e259 100644 Binary files a/bin/win32/openvr_api.pdb and b/bin/win32/openvr_api.pdb differ diff --git a/bin/win64/openvr_api.dll b/bin/win64/openvr_api.dll index b042a269..47557af4 100644 Binary files a/bin/win64/openvr_api.dll and b/bin/win64/openvr_api.dll differ diff --git a/bin/win64/openvr_api.pdb b/bin/win64/openvr_api.pdb index 1c492102..4e4e9e3a 100644 Binary files a/bin/win64/openvr_api.pdb and b/bin/win64/openvr_api.pdb differ diff --git a/headers/openvr.h b/headers/openvr.h index 9a723c2c..ccb105fa 100644 --- a/headers/openvr.h +++ b/headers/openvr.h @@ -223,6 +223,7 @@ enum ETrackedDeviceProperty Prop_ContainsProximitySensor_Bool = 1025, Prop_DeviceProvidesBatteryStatus_Bool = 1026, Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -231,7 +232,7 @@ enum ETrackedDeviceProperty Prop_UserIpdMeters_Float = 2003, Prop_CurrentUniverseId_Uint64 = 2004, Prop_PreviousUniverseId_Uint64 = 2005, - Prop_DisplayFirmwareVersion_String = 2006, + Prop_DisplayFirmwareVersion_Uint64 = 2006, Prop_IsOnDesktop_Bool = 2007, Prop_DisplayMCType_Int32 = 2008, Prop_DisplayMCOffset_Float = 2009, @@ -253,6 +254,8 @@ enum ETrackedDeviceProperty Prop_LensCenterRightV_Float = 2025, Prop_UserHeadToEyeDepthMeters_Float = 2026, Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, // Properties that are unique to TrackedDeviceClass_Controller Prop_AttachedDeviceId_String = 3000, @@ -270,6 +273,7 @@ enum ETrackedDeviceProperty Prop_FieldOfViewBottomDegrees_Float = 4003, Prop_TrackingRangeMinimumMeters_Float = 4004, Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, // Vendors are free to expose private debug data in this reserved region Prop_VendorSpecific_Reserved_Start = 10000, @@ -355,6 +359,8 @@ enum EVREventType VREvent_MouseButtonUp = 302, // data is mouse VREvent_FocusEnter = 303, // data is overlay VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse VREvent_InputFocusCaptured = 400, // data is process VREvent_InputFocusReleased = 401, // data is process @@ -469,7 +475,7 @@ inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } /** used for controller button events */ struct VREvent_Controller_t { - EVRButtonId button; + uint32_t button; // EVRButtonId enum }; @@ -485,8 +491,35 @@ enum EVRMouseButton /** used for simulated mouse events in overlay space */ struct VREvent_Mouse_t { - float x, y; - EVRMouseButton button; + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; }; /** notification related events. Details will still change at this point */ @@ -496,7 +529,6 @@ struct VREvent_Notification_t uint32_t notificationId; }; - /** Used for events about processes */ struct VREvent_Process_t { @@ -516,7 +548,7 @@ struct VREvent_Overlay_t /** Used for a few events about overlays */ struct VREvent_Status_t { - EVRState statusState; + uint32_t statusState; // EVRState enum }; /** Used for keyboard events **/ @@ -537,8 +569,7 @@ struct VREvent_Chaperone_t uint64_t m_nCurrentUniverse; }; -/** Not actually used for any events. It is just used to reserve -* space in the union for future event types */ +/** Not actually used for any events */ struct VREvent_Reserved_t { uint64_t reserved0; @@ -556,6 +587,7 @@ typedef union VREvent_Reserved_t reserved; VREvent_Controller_t controller; VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; VREvent_Process_t process; VREvent_Notification_t notification; VREvent_Overlay_t overlay; @@ -564,15 +596,17 @@ typedef union VREvent_Ipd_t ipd; VREvent_Chaperone_t chaperone; VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; } VREvent_Data_t; /** An event posted by the server to all running applications */ struct VREvent_t { - EVREventType eventType; + uint32_t eventType; // EVREventType enum TrackedDeviceIndex_t trackedDeviceIndex; - VREvent_Data_t data; float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; }; @@ -779,7 +813,6 @@ enum EVRInitError VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, - VRInitError_VendorSpecific_HmdFound_But = 1100, VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, @@ -834,7 +867,7 @@ enum EVRInitError // vrannotation.h -#ifdef __clang__ +#ifdef API_GEN # define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) #else # define VR_CLANG_ATTR(ATTR) @@ -852,77 +885,6 @@ enum EVRInitError #define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) #define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) -// vrtrackedcameratypes.h -#ifndef _VRTRACKEDCAMERATYPES_H -#define _VRTRACKEDCAMERATYPES_H - -namespace vr -{ - -#if defined(__linux__) || defined(__APPLE__) - // The 32-bit version of gcc has the alignment requirement for uint64 and double set to - // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. - // The 64-bit version of gcc has the alignment requirement for these types set to - // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. - // The 64-bit structure packing has to match the 32-bit structure packing for each platform. - #pragma pack( push, 4 ) -#else - #pragma pack( push, 8 ) -#endif - -enum ECameraVideoStreamFormat -{ - CVS_FORMAT_UNKNOWN = 0, - CVS_FORMAT_RAW10 = 1, // 10 bits per pixel - CVS_FORMAT_NV12 = 2, // 12 bits per pixel - CVS_FORMAT_RGB24 = 3, // 24 bits per pixel - CVS_MAX_FORMATS -}; - -#ifdef _MSC_VER -#define VR_CAMERA_DECL_ALIGN( x ) __declspec( align( x ) ) -#else -#define VR_CAMERA_DECL_ALIGN( x ) // -#endif - -VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t -{ - ECameraVideoStreamFormat m_nStreamFormat; - - uint32_t m_nWidth; - uint32_t m_nHeight; - - uint32_t m_nImageDataSize; // Based on stream format, width, height - - uint32_t m_nFrameSequence; // Starts from 0 when stream starts. - - uint32_t m_nISPFrameTimeStamp; // Driver provided time stamp per driver centric time base - uint32_t m_nISPReferenceTimeStamp; - uint32_t m_nSyncCounter; - - uint32_t m_nExposureTime; - - uint32_t m_nBufferIndex; // Identifies which buffer the image data is hosted - uint32_t m_nBufferCount; // Total number of configured buffers - - double m_flFrameElapsedTime; // Starts from 0 when stream starts. In seconds. - - double m_flFrameCaptureTime; // Relative to when the frame was exposed/captured. - uint64_t m_nFrameCaptureTicks; - - bool m_bPoseIsValid; // Supplied by HMD layer when used as a tracked camera - vr::HmdMatrix34_t m_matDeviceToAbsoluteTracking; - - float m_Pad[4]; - - void *m_pImageData; -}; - -#pragma pack( pop ) - -} - -#endif // _VRTRACKEDCAMERATYPES_H // ivrsystem.h namespace vr { @@ -1094,13 +1056,14 @@ class IVRSystem // ------------------------------------ /** Returns true and fills the event with the next event on the queue if there is one. If there are no events - * this method returns false */ - virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; /** Returns true and fills the event with the next event on the queue if there is one. If there are no events * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. - * This pose will always be older than the call to this function and should not be used to render the device. */ - virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; /** returns the name of an EVREvent enum value */ virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; @@ -1201,7 +1164,7 @@ class IVRSystem virtual void PerformanceTestReportFidelityLevelChange( int nFidelityLevel ) = 0; }; -static const char * const IVRSystem_Version = "IVRSystem_010"; +static const char * const IVRSystem_Version = "IVRSystem_011"; } @@ -1255,6 +1218,8 @@ namespace vr VRApplicationProperty_Source_String = 53, VRApplicationProperty_IsDashboardOverlay_Bool = 60, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, }; /** These are states the scene application startup process will go through. */ @@ -1322,9 +1287,12 @@ namespace vr /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; - /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + /** Returns a bool value for an application property. Returns false in all error cases. */ virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; @@ -1358,7 +1326,7 @@ namespace vr }; - static const char * const IVRApplications_Version = "IVRApplications_002"; + static const char * const IVRApplications_Version = "IVRApplications_003"; /** Returns the current IVRApplications pointer or NULL the interface could not be found. */ VR_INTERFACE vr::IVRApplications *VR_CALLTYPE VRApplications(); @@ -1454,11 +1422,21 @@ namespace vr static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + //----------------------------------------------------------------------------- // notification keys static const char * const k_pch_Notifications_Section = "notifications"; static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + //----------------------------------------------------------------------------- // perf keys static const char * const k_pch_Perf_Section = "perfcheck"; @@ -1627,11 +1605,14 @@ class IVRChaperoneSetup /** Returns the preferred seated position. */ virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; - virtual void SetWorkingWallTagInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; - virtual bool GetLiveWallTagInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; }; -static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_004"; +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; } @@ -1668,27 +1649,40 @@ enum EVRCompositorError /** Provides a single frame's timing information to the app */ struct Compositor_FrameTiming { - uint32_t size; // sizeof(Compositor_FrameTiming) - double frameStart; - float frameVSync; // seconds from frame start - uint32_t droppedFrames; - uint32_t frameIndex; - vr::TrackedDevicePose_t pose; + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flSceneRenderGpuMs; // time spent rendering the scene + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) - float prediction; + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) - float m_flFrameIntervalMs; - float m_flSceneRenderCpuMs; - float m_flSceneRenderGpuMs; - float m_flCompositorRenderCpuMs; - float m_flCompositorRenderGpuMs; - float m_flPresentCallCpuMs; - float m_flRunningStartMs; - float m_flHandoffStartMs; - float m_flHandoffEndMs; - float m_flCompositorUpdateCpuMs; + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; - uint32_t m_nPresents; // number of times this frame was presented + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + int32_t m_nFidelityLevel; // app reported value }; @@ -1793,7 +1787,7 @@ class IVRCompositor virtual void CompositorDumpImages() = 0; }; -static const char * const IVRCompositor_Version = "IVRCompositor_010"; +static const char * const IVRCompositor_Version = "IVRCompositor_011"; } // namespace vr @@ -1908,6 +1902,7 @@ namespace vr VROverlayTransform_Absolute = 0, VROverlayTransform_TrackedDeviceRelative = 1, VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, }; /** Overlay control settings */ @@ -1928,6 +1923,9 @@ namespace vr // Indicates that the overlay should dim/brighten to show gamepad focus VROverlayFlags_ShowGamepadFocus = 5, + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, }; struct VROverlayIntersectionParams_t @@ -1949,10 +1947,10 @@ namespace vr enum EGamepadTextInputMode { k_EGamepadTextInputModeNormal = 0, - k_EGamepadTextInputModePassword = 1 + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, }; - // Controls number of allowed lines for the Big Picture gamepad text entry enum EGamepadTextInputLineMode { @@ -2080,6 +2078,13 @@ namespace vr /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; @@ -2097,8 +2102,8 @@ namespace vr // --------------------------------------------- /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. - * If there are no events this method returns false */ - virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; /** Returns the current input settings for the specified overlay. */ virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; @@ -2191,6 +2196,9 @@ namespace vr /** Shows the dashboard. */ virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + // --------------------------------------------- // Keyboard methods // --------------------------------------------- @@ -2213,7 +2221,7 @@ namespace vr virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; }; - static const char * const IVROverlay_Version = "IVROverlay_008"; + static const char * const IVROverlay_Version = "IVROverlay_010"; } // namespace vr @@ -2225,6 +2233,7 @@ static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // C static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping #if defined(__linux__) || defined(__APPLE__) // The 32-bit version of gcc has the alignment requirement for uint64 and double set to @@ -2367,6 +2376,9 @@ class IVRRenderModels * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state ) */ virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, RenderModel_ComponentState_t *pComponentState ) = 0; + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + }; static const char * const IVRRenderModels_Version = "IVRRenderModels_002"; @@ -2374,68 +2386,6 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_002"; } -// ivrtrackedcamera.h -namespace vr -{ - -#if defined(__linux__) || defined(__APPLE__) - // The 32-bit version of gcc has the alignment requirement for uint64 and double set to - // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. - // The 64-bit version of gcc has the alignment requirement for these types set to - // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. - // The 64-bit structure packing has to match the 32-bit structure packing for each platform. -#pragma pack( push, 4 ) -#else -#pragma pack( push, 8 ) -#endif - -#pragma pack( pop ) - -class IVRTrackedCamera -{ -public: - virtual bool HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; - virtual bool GetCameraFirmwareDescription( vr::TrackedDeviceIndex_t nDeviceIndex, char *pBuffer, uint32_t nBufferLen ) = 0; - - // An invalid or unsupported format returns false. Frame dimensions imply sensor size. - virtual bool GetCameraFrameDimensions( vr::TrackedDeviceIndex_t nDeviceIndex, vr::ECameraVideoStreamFormat nVideoStreamFormat, uint32_t *pWidth, uint32_t *pHeight ) = 0; - - // Caller can request a specific streaming format prior to enable. The request may be ignored if camera has been granted exclusive use by lower level systems. - // Format cannot be changed after camera has been enabled. An unsupported or rejected format returns false. - // Use CVS_FORMAT_UNKNOWN for defaults. - virtual bool SetCameraVideoStreamFormat( vr::TrackedDeviceIndex_t nDeviceIndex, vr::ECameraVideoStreamFormat nVideoStreamFormat ) = 0; - virtual vr::ECameraVideoStreamFormat GetCameraVideoStreamFormat( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; - - // Camera must be enabled prior to streaming. Enabling causes frame buffering allocations and locks attributes. - virtual bool EnableCameraForStreaming( vr::TrackedDeviceIndex_t nDeviceIndex, bool bEnable ) = 0; - - virtual bool StartVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; - virtual bool StopVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; - virtual bool IsVideoStreamActive( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; - - // Starts at 0 and advances in seconds when stream started and valid. A stopped stream returns 0. - // A paused stream is still considered active and the elapsed time advances. - virtual float GetVideoStreamElapsedTime( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; - - // Caller acquires ref-counted frames for exclusive use and releases when finished. Failure to release frames degrades frame buffering. - // NULL implies no frame available. - virtual const vr::CameraVideoStreamFrame_t *GetVideoStreamFrame( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; - virtual bool ReleaseVideoStreamFrame( vr::TrackedDeviceIndex_t nDeviceIndex, const vr::CameraVideoStreamFrame_t *pFrameImage ) = 0; - - virtual bool SetAutoExposure( vr::TrackedDeviceIndex_t nDeviceIndex, bool bEnable ) = 0; - - // A stream can only be paused after it is started. The pause state is cleared after stopping. - virtual bool PauseVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; - virtual bool ResumeVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; - virtual bool IsVideoStreamPaused( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; - - virtual bool GetCameraDistortion( vr::TrackedDeviceIndex_t nDeviceIndex, float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0; - virtual bool GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; -}; - -static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_001"; - -} // ivrextendeddisplay.h namespace vr { @@ -2524,17 +2474,11 @@ namespace vr /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); - /** Returns the current IVRTrackedCamera pointer or NULL the interface could not be found. */ - VR_INTERFACE vr::IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera(); - /** Returns the current IVRExtendedDisplay pointer or NULL the interface could not be found. * This function will also return NULL if the VR Compositor is running as the extended display * interface is incompatible with the compositor. */ VR_INTERFACE vr::IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay(); - - - // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. // They will go away in the future. typedef EVRInitError HmdError; @@ -2552,4 +2496,4 @@ namespace vr typedef EVROverlayError VROverlayError; typedef EVRFirmwareError VRFirmwareError; typedef EVRCompositorError VRCompositorError; -} \ No newline at end of file +} diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs index 3b2a3b5b..d6480bf5 100644 --- a/headers/openvr_api.cs +++ b/headers/openvr_api.cs @@ -74,9 +74,9 @@ class VRNativeEntrypoints [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetPropErrorNameFromEnum")] internal static extern IntPtr VR_IVRSystem_GetPropErrorNameFromEnum(IntPtr instancePtr, ETrackedPropertyError error); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_PollNextEvent")] - internal static extern bool VR_IVRSystem_PollNextEvent(IntPtr instancePtr, ref VREvent_t pEvent); + internal static extern bool VR_IVRSystem_PollNextEvent(IntPtr instancePtr, ref VREvent_t pEvent, uint uncbVREvent); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_PollNextEventWithPose")] - internal static extern bool VR_IVRSystem_PollNextEventWithPose(IntPtr instancePtr, ETrackingUniverseOrigin eOrigin, ref VREvent_t pEvent, ref TrackedDevicePose_t pTrackedDevicePose); + internal static extern bool VR_IVRSystem_PollNextEventWithPose(IntPtr instancePtr, ETrackingUniverseOrigin eOrigin, ref VREvent_t pEvent, uint uncbVREvent, ref TrackedDevicePose_t pTrackedDevicePose); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetEventTypeNameFromEnum")] internal static extern IntPtr VR_IVRSystem_GetEventTypeNameFromEnum(IntPtr instancePtr, EVREventType eType); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetHiddenAreaMesh")] @@ -141,6 +141,8 @@ class VRNativeEntrypoints internal static extern uint VR_IVRApplications_GetApplicationPropertyString(IntPtr instancePtr, string pchAppKey, EVRApplicationProperty eProperty, string pchPropertyValueBuffer, uint unPropertyValueBufferLen, ref EVRApplicationError peError); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationPropertyBool")] internal static extern bool VR_IVRApplications_GetApplicationPropertyBool(IntPtr instancePtr, string pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationPropertyUint64")] + internal static extern ulong VR_IVRApplications_GetApplicationPropertyUint64(IntPtr instancePtr, string pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_SetApplicationAutoLaunch")] internal static extern EVRApplicationError VR_IVRApplications_SetApplicationAutoLaunch(IntPtr instancePtr, string pchAppKey, bool bAutoLaunch); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationAutoLaunch")] @@ -199,10 +201,14 @@ class VRNativeEntrypoints internal static extern void VR_IVRChaperoneSetup_ReloadFromDisk(IntPtr instancePtr, EChaperoneConfigFile configFile); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetLiveSeatedZeroPoseToRawTrackingPose")] internal static extern bool VR_IVRChaperoneSetup_GetLiveSeatedZeroPoseToRawTrackingPose(IntPtr instancePtr, ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose); - [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_SetWorkingWallTagInfo")] - internal static extern void VR_IVRChaperoneSetup_SetWorkingWallTagInfo(IntPtr instancePtr, [In, Out] byte[] pTagsBuffer, uint unTagCount); - [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetLiveWallTagInfo")] - internal static extern bool VR_IVRChaperoneSetup_GetLiveWallTagInfo(IntPtr instancePtr, [In, Out] byte[] pTagsBuffer, ref uint punTagCount); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_SetWorkingCollisionBoundsTagsInfo")] + internal static extern void VR_IVRChaperoneSetup_SetWorkingCollisionBoundsTagsInfo(IntPtr instancePtr, [In, Out] byte[] pTagsBuffer, uint unTagCount); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetLiveCollisionBoundsTagsInfo")] + internal static extern bool VR_IVRChaperoneSetup_GetLiveCollisionBoundsTagsInfo(IntPtr instancePtr, [In, Out] byte[] pTagsBuffer, ref uint punTagCount); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_SetWorkingPhysicalBoundsInfo")] + internal static extern bool VR_IVRChaperoneSetup_SetWorkingPhysicalBoundsInfo(IntPtr instancePtr, [In, Out] HmdQuad_t[] pQuadsBuffer, uint unQuadsCount); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetLivePhysicalBoundsInfo")] + internal static extern bool VR_IVRChaperoneSetup_GetLivePhysicalBoundsInfo(IntPtr instancePtr, [In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_SetTrackingSpace")] internal static extern void VR_IVRCompositor_SetTrackingSpace(IntPtr instancePtr, ETrackingUniverseOrigin eOrigin); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_GetTrackingSpace")] @@ -307,6 +313,10 @@ class VRNativeEntrypoints internal static extern EVROverlayError VR_IVROverlay_SetOverlayTransformTrackedDeviceRelative(IntPtr instancePtr, ulong ulOverlayHandle, uint unTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayTransformTrackedDeviceRelative")] internal static extern EVROverlayError VR_IVROverlay_GetOverlayTransformTrackedDeviceRelative(IntPtr instancePtr, ulong ulOverlayHandle, ref uint punTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayTransformTrackedDeviceComponent")] + internal static extern EVROverlayError VR_IVROverlay_SetOverlayTransformTrackedDeviceComponent(IntPtr instancePtr, ulong ulOverlayHandle, uint unDeviceIndex, string pchComponentName); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayTransformTrackedDeviceComponent")] + internal static extern EVROverlayError VR_IVROverlay_GetOverlayTransformTrackedDeviceComponent(IntPtr instancePtr, ulong ulOverlayHandle, ref uint punDeviceIndex, string pchComponentName, uint unComponentNameSize); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_ShowOverlay")] internal static extern EVROverlayError VR_IVROverlay_ShowOverlay(IntPtr instancePtr, ulong ulOverlayHandle); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_HideOverlay")] @@ -316,7 +326,7 @@ class VRNativeEntrypoints [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetTransformForOverlayCoordinates")] internal static extern EVROverlayError VR_IVROverlay_GetTransformForOverlayCoordinates(IntPtr instancePtr, ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, ref HmdMatrix34_t pmatTransform); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_PollNextOverlayEvent")] - internal static extern bool VR_IVROverlay_PollNextOverlayEvent(IntPtr instancePtr, ulong ulOverlayHandle, ref VREvent_t pEvent); + internal static extern bool VR_IVROverlay_PollNextOverlayEvent(IntPtr instancePtr, ulong ulOverlayHandle, ref VREvent_t pEvent, uint uncbVREvent); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayInputMethod")] internal static extern EVROverlayError VR_IVROverlay_GetOverlayInputMethod(IntPtr instancePtr, ulong ulOverlayHandle, ref VROverlayInputMethod peInputMethod); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayInputMethod")] @@ -359,6 +369,8 @@ class VRNativeEntrypoints internal static extern EVROverlayError VR_IVROverlay_GetDashboardOverlaySceneProcess(IntPtr instancePtr, ulong ulOverlayHandle, ref uint punProcessId); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_ShowDashboard")] internal static extern void VR_IVROverlay_ShowDashboard(IntPtr instancePtr, string pchOverlayToShow); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetPrimaryDashboardDevice")] + internal static extern uint VR_IVROverlay_GetPrimaryDashboardDevice(IntPtr instancePtr); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_ShowKeyboard")] internal static extern EVROverlayError VR_IVROverlay_ShowKeyboard(IntPtr instancePtr, int eInputMode, int eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText, bool bUseMinimalMode, ulong uUserValue); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_ShowKeyboardForOverlay")] @@ -393,6 +405,8 @@ class VRNativeEntrypoints internal static extern uint VR_IVRRenderModels_GetComponentRenderModelName(IntPtr instancePtr, string pchRenderModelName, string pchComponentName, System.Text.StringBuilder pchComponentRenderModelName, uint unComponentRenderModelNameLen); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_GetComponentState")] internal static extern bool VR_IVRRenderModels_GetComponentState(IntPtr instancePtr, string pchRenderModelName, string pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ComponentState_t pComponentState); + [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_RenderModelHasComponent")] + internal static extern bool VR_IVRRenderModels_RenderModelHasComponent(IntPtr instancePtr, string pchRenderModelName, string pchComponentName); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRNotifications_CreateNotification")] internal static extern EVRNotificationError VR_IVRNotifications_CreateNotification(IntPtr instancePtr, ulong ulOverlayHandle, ulong ulUserValue, EVRNotificationType type, string pchText, EVRNotificationStyle style, ref NotificationBitmap_t pImage, ref uint pNotificationId); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRNotifications_RemoveNotification")] @@ -434,9 +448,7 @@ class VRNativeEntrypoints [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_StopVideoStream")] internal static extern bool VR_IVRTrackedCamera_StopVideoStream(IntPtr instancePtr, uint nDeviceIndex); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_IsVideoStreamActive")] - internal static extern bool VR_IVRTrackedCamera_IsVideoStreamActive(IntPtr instancePtr, uint nDeviceIndex); - [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_GetVideoStreamElapsedTime")] - internal static extern float VR_IVRTrackedCamera_GetVideoStreamElapsedTime(IntPtr instancePtr, uint nDeviceIndex); + internal static extern bool VR_IVRTrackedCamera_IsVideoStreamActive(IntPtr instancePtr, uint nDeviceIndex, ref bool pbPaused, ref float pflElapsedTime); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_GetVideoStreamFrame")] internal static extern IntPtr VR_IVRTrackedCamera_GetVideoStreamFrame(IntPtr instancePtr, uint nDeviceIndex); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_ReleaseVideoStreamFrame")] @@ -447,8 +459,6 @@ class VRNativeEntrypoints internal static extern bool VR_IVRTrackedCamera_PauseVideoStream(IntPtr instancePtr, uint nDeviceIndex); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_ResumeVideoStream")] internal static extern bool VR_IVRTrackedCamera_ResumeVideoStream(IntPtr instancePtr, uint nDeviceIndex); - [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_IsVideoStreamPaused")] - internal static extern bool VR_IVRTrackedCamera_IsVideoStreamPaused(IntPtr instancePtr, uint nDeviceIndex); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_GetCameraDistortion")] internal static extern bool VR_IVRTrackedCamera_GetCameraDistortion(IntPtr instancePtr, uint nDeviceIndex, float flInputU, float flInputV, ref float pflOutputU, ref float pflOutputV); [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_GetCameraProjection")] @@ -492,8 +502,8 @@ public abstract class IVRSystem public abstract HmdMatrix34_t GetMatrix34TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError); public abstract uint GetStringTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,System.Text.StringBuilder pchValue,uint unBufferSize,ref ETrackedPropertyError pError); public abstract string GetPropErrorNameFromEnum(ETrackedPropertyError error); - public abstract bool PollNextEvent(ref VREvent_t pEvent); - public abstract bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,ref TrackedDevicePose_t pTrackedDevicePose); + public abstract bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent); + public abstract bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose); public abstract string GetEventTypeNameFromEnum(EVREventType eType); public abstract HiddenAreaMesh_t GetHiddenAreaMesh(EVREye eEye); public abstract bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerState_t pControllerState); @@ -538,6 +548,7 @@ public abstract class IVRApplications public abstract string GetApplicationsErrorNameFromEnum(EVRApplicationError error); public abstract uint GetApplicationPropertyString(string pchAppKey,EVRApplicationProperty eProperty,string pchPropertyValueBuffer,uint unPropertyValueBufferLen,ref EVRApplicationError peError); public abstract bool GetApplicationPropertyBool(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError); + public abstract ulong GetApplicationPropertyUint64(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError); public abstract EVRApplicationError SetApplicationAutoLaunch(string pchAppKey,bool bAutoLaunch); public abstract bool GetApplicationAutoLaunch(string pchAppKey); public abstract EVRApplicationError GetStartingApplication(string pchAppKeyBuffer,uint unAppKeyBufferLen); @@ -579,8 +590,10 @@ public abstract class IVRChaperoneSetup public abstract void SetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose); public abstract void ReloadFromDisk(EChaperoneConfigFile configFile); public abstract bool GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose); - public abstract void SetWorkingWallTagInfo(byte [] pTagsBuffer); - public abstract bool GetLiveWallTagInfo(out byte [] pTagsBuffer); + public abstract void SetWorkingCollisionBoundsTagsInfo(byte [] pTagsBuffer); + public abstract bool GetLiveCollisionBoundsTagsInfo(out byte [] pTagsBuffer); + public abstract bool SetWorkingPhysicalBoundsInfo(HmdQuad_t [] pQuadsBuffer); + public abstract bool GetLivePhysicalBoundsInfo(out HmdQuad_t [] pQuadsBuffer); } @@ -645,11 +658,13 @@ public abstract class IVROverlay public abstract EVROverlayError GetOverlayTransformAbsolute(ulong ulOverlayHandle,ref ETrackingUniverseOrigin peTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform); public abstract EVROverlayError SetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle,uint unTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform); public abstract EVROverlayError GetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle,ref uint punTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform); + public abstract EVROverlayError SetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,uint unDeviceIndex,string pchComponentName); + public abstract EVROverlayError GetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,ref uint punDeviceIndex,string pchComponentName,uint unComponentNameSize); public abstract EVROverlayError ShowOverlay(ulong ulOverlayHandle); public abstract EVROverlayError HideOverlay(ulong ulOverlayHandle); public abstract bool IsOverlayVisible(ulong ulOverlayHandle); public abstract EVROverlayError GetTransformForOverlayCoordinates(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,HmdVector2_t coordinatesInOverlay,ref HmdMatrix34_t pmatTransform); - public abstract bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent); + public abstract bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint uncbVREvent); public abstract EVROverlayError GetOverlayInputMethod(ulong ulOverlayHandle,ref VROverlayInputMethod peInputMethod); public abstract EVROverlayError SetOverlayInputMethod(ulong ulOverlayHandle,VROverlayInputMethod eInputMethod); public abstract EVROverlayError GetOverlayMouseScale(ulong ulOverlayHandle,ref HmdVector2_t pvecMouseScale); @@ -671,6 +686,7 @@ public abstract class IVROverlay public abstract EVROverlayError SetDashboardOverlaySceneProcess(ulong ulOverlayHandle,uint unProcessId); public abstract EVROverlayError GetDashboardOverlaySceneProcess(ulong ulOverlayHandle,ref uint punProcessId); public abstract void ShowDashboard(string pchOverlayToShow); + public abstract uint GetPrimaryDashboardDevice(); public abstract EVROverlayError ShowKeyboard(int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue); public abstract EVROverlayError ShowKeyboardForOverlay(ulong ulOverlayHandle,int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue); public abstract uint GetKeyboardText(System.Text.StringBuilder pchText,uint cchText); @@ -694,6 +710,7 @@ public abstract class IVRRenderModels public abstract ulong GetComponentButtonMask(string pchRenderModelName,string pchComponentName); public abstract uint GetComponentRenderModelName(string pchRenderModelName,string pchComponentName,System.Text.StringBuilder pchComponentRenderModelName,uint unComponentRenderModelNameLen); public abstract bool GetComponentState(string pchRenderModelName,string pchComponentName,ref VRControllerState_t pControllerState,ref RenderModel_ComponentState_t pComponentState); + public abstract bool RenderModelHasComponent(string pchRenderModelName,string pchComponentName); } @@ -732,14 +749,12 @@ public abstract class IVRTrackedCamera public abstract bool EnableCameraForStreaming(uint nDeviceIndex,bool bEnable); public abstract bool StartVideoStream(uint nDeviceIndex); public abstract bool StopVideoStream(uint nDeviceIndex); - public abstract bool IsVideoStreamActive(uint nDeviceIndex); - public abstract float GetVideoStreamElapsedTime(uint nDeviceIndex); + public abstract bool IsVideoStreamActive(uint nDeviceIndex,ref bool pbPaused,ref float pflElapsedTime); public abstract CameraVideoStreamFrame_t GetVideoStreamFrame(uint nDeviceIndex); public abstract bool ReleaseVideoStreamFrame(uint nDeviceIndex,ref CameraVideoStreamFrame_t pFrameImage); public abstract bool SetAutoExposure(uint nDeviceIndex,bool bEnable); public abstract bool PauseVideoStream(uint nDeviceIndex); public abstract bool ResumeVideoStream(uint nDeviceIndex); - public abstract bool IsVideoStreamPaused(uint nDeviceIndex); public abstract bool GetCameraDistortion(uint nDeviceIndex,float flInputU,float flInputV,ref float pflOutputU,ref float pflOutputV); public abstract bool GetCameraProjection(uint nDeviceIndex,float flWidthPixels,float flHeightPixels,float flZNear,float flZFar,ref HmdMatrix44_t pProjection); } @@ -933,16 +948,16 @@ public override string GetPropErrorNameFromEnum(ETrackedPropertyError error) IntPtr result = VRNativeEntrypoints.VR_IVRSystem_GetPropErrorNameFromEnum(m_pVRSystem,error); return (string) Marshal.PtrToStructure(result, typeof(string)); } - public override bool PollNextEvent(ref VREvent_t pEvent) + public override bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent) { CheckIfUsable(); - bool result = VRNativeEntrypoints.VR_IVRSystem_PollNextEvent(m_pVRSystem,ref pEvent); + bool result = VRNativeEntrypoints.VR_IVRSystem_PollNextEvent(m_pVRSystem,ref pEvent,uncbVREvent); return result; } - public override bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,ref TrackedDevicePose_t pTrackedDevicePose) + public override bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose) { CheckIfUsable(); - bool result = VRNativeEntrypoints.VR_IVRSystem_PollNextEventWithPose(m_pVRSystem,eOrigin,ref pEvent,ref pTrackedDevicePose); + bool result = VRNativeEntrypoints.VR_IVRSystem_PollNextEventWithPose(m_pVRSystem,eOrigin,ref pEvent,uncbVREvent,ref pTrackedDevicePose); return result; } public override string GetEventTypeNameFromEnum(EVREventType eType) @@ -1178,6 +1193,12 @@ public override bool GetApplicationPropertyBool(string pchAppKey,EVRApplicationP bool result = VRNativeEntrypoints.VR_IVRApplications_GetApplicationPropertyBool(m_pVRApplications,pchAppKey,eProperty,ref peError); return result; } + public override ulong GetApplicationPropertyUint64(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError) + { + CheckIfUsable(); + ulong result = VRNativeEntrypoints.VR_IVRApplications_GetApplicationPropertyUint64(m_pVRApplications,pchAppKey,eProperty,ref peError); + return result; + } public override EVRApplicationError SetApplicationAutoLaunch(string pchAppKey,bool bAutoLaunch) { CheckIfUsable(); @@ -1392,18 +1413,33 @@ public override bool GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pm bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLiveSeatedZeroPoseToRawTrackingPose(m_pVRChaperoneSetup,ref pmatSeatedZeroPoseToRawTrackingPose); return result; } - public override void SetWorkingWallTagInfo(byte [] pTagsBuffer) + public override void SetWorkingCollisionBoundsTagsInfo(byte [] pTagsBuffer) { CheckIfUsable(); - VRNativeEntrypoints.VR_IVRChaperoneSetup_SetWorkingWallTagInfo(m_pVRChaperoneSetup,pTagsBuffer,(uint) pTagsBuffer.Length); + VRNativeEntrypoints.VR_IVRChaperoneSetup_SetWorkingCollisionBoundsTagsInfo(m_pVRChaperoneSetup,pTagsBuffer,(uint) pTagsBuffer.Length); } - public override bool GetLiveWallTagInfo(out byte [] pTagsBuffer) + public override bool GetLiveCollisionBoundsTagsInfo(out byte [] pTagsBuffer) { CheckIfUsable(); uint punTagCount = 0; - bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLiveWallTagInfo(m_pVRChaperoneSetup,null,ref punTagCount); + bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLiveCollisionBoundsTagsInfo(m_pVRChaperoneSetup,null,ref punTagCount); pTagsBuffer= new byte[punTagCount]; - result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLiveWallTagInfo(m_pVRChaperoneSetup,pTagsBuffer,ref punTagCount); + result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLiveCollisionBoundsTagsInfo(m_pVRChaperoneSetup,pTagsBuffer,ref punTagCount); + return result; + } + public override bool SetWorkingPhysicalBoundsInfo(HmdQuad_t [] pQuadsBuffer) + { + CheckIfUsable(); + bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_SetWorkingPhysicalBoundsInfo(m_pVRChaperoneSetup,pQuadsBuffer,(uint) pQuadsBuffer.Length); + return result; + } + public override bool GetLivePhysicalBoundsInfo(out HmdQuad_t [] pQuadsBuffer) + { + CheckIfUsable(); + uint punQuadsCount = 0; + bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLivePhysicalBoundsInfo(m_pVRChaperoneSetup,null,ref punQuadsCount); + pQuadsBuffer= new HmdQuad_t[punQuadsCount]; + result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLivePhysicalBoundsInfo(m_pVRChaperoneSetup,pQuadsBuffer,ref punQuadsCount); return result; } } @@ -1759,6 +1795,19 @@ public override EVROverlayError GetOverlayTransformTrackedDeviceRelative(ulong u EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayTransformTrackedDeviceRelative(m_pVROverlay,ulOverlayHandle,ref punTrackedDevice,ref pmatTrackedDeviceToOverlayTransform); return result; } + public override EVROverlayError SetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,uint unDeviceIndex,string pchComponentName) + { + CheckIfUsable(); + EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayTransformTrackedDeviceComponent(m_pVROverlay,ulOverlayHandle,unDeviceIndex,pchComponentName); + return result; + } + public override EVROverlayError GetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,ref uint punDeviceIndex,string pchComponentName,uint unComponentNameSize) + { + CheckIfUsable(); + punDeviceIndex = 0; + EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayTransformTrackedDeviceComponent(m_pVROverlay,ulOverlayHandle,ref punDeviceIndex,pchComponentName,unComponentNameSize); + return result; + } public override EVROverlayError ShowOverlay(ulong ulOverlayHandle) { CheckIfUsable(); @@ -1783,10 +1832,10 @@ public override EVROverlayError GetTransformForOverlayCoordinates(ulong ulOverla EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetTransformForOverlayCoordinates(m_pVROverlay,ulOverlayHandle,eTrackingOrigin,coordinatesInOverlay,ref pmatTransform); return result; } - public override bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent) + public override bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint uncbVREvent) { CheckIfUsable(); - bool result = VRNativeEntrypoints.VR_IVROverlay_PollNextOverlayEvent(m_pVROverlay,ulOverlayHandle,ref pEvent); + bool result = VRNativeEntrypoints.VR_IVROverlay_PollNextOverlayEvent(m_pVROverlay,ulOverlayHandle,ref pEvent,uncbVREvent); return result; } public override EVROverlayError GetOverlayInputMethod(ulong ulOverlayHandle,ref VROverlayInputMethod peInputMethod) @@ -1917,6 +1966,12 @@ public override void ShowDashboard(string pchOverlayToShow) CheckIfUsable(); VRNativeEntrypoints.VR_IVROverlay_ShowDashboard(m_pVROverlay,pchOverlayToShow); } + public override uint GetPrimaryDashboardDevice() + { + CheckIfUsable(); + uint result = VRNativeEntrypoints.VR_IVROverlay_GetPrimaryDashboardDevice(m_pVROverlay); + return result; + } public override EVROverlayError ShowKeyboard(int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue) { CheckIfUsable(); @@ -2034,6 +2089,12 @@ public override bool GetComponentState(string pchRenderModelName,string pchCompo bool result = VRNativeEntrypoints.VR_IVRRenderModels_GetComponentState(m_pVRRenderModels,pchRenderModelName,pchComponentName,ref pControllerState,ref pComponentState); return result; } + public override bool RenderModelHasComponent(string pchRenderModelName,string pchComponentName) + { + CheckIfUsable(); + bool result = VRNativeEntrypoints.VR_IVRRenderModels_RenderModelHasComponent(m_pVRRenderModels,pchRenderModelName,pchComponentName); + return result; + } } @@ -2211,16 +2272,12 @@ public override bool StopVideoStream(uint nDeviceIndex) bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_StopVideoStream(m_pVRTrackedCamera,nDeviceIndex); return result; } - public override bool IsVideoStreamActive(uint nDeviceIndex) + public override bool IsVideoStreamActive(uint nDeviceIndex,ref bool pbPaused,ref float pflElapsedTime) { CheckIfUsable(); - bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_IsVideoStreamActive(m_pVRTrackedCamera,nDeviceIndex); - return result; - } - public override float GetVideoStreamElapsedTime(uint nDeviceIndex) - { - CheckIfUsable(); - float result = VRNativeEntrypoints.VR_IVRTrackedCamera_GetVideoStreamElapsedTime(m_pVRTrackedCamera,nDeviceIndex); + pbPaused = false; + pflElapsedTime = 0; + bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_IsVideoStreamActive(m_pVRTrackedCamera,nDeviceIndex,ref pbPaused,ref pflElapsedTime); return result; } public override CameraVideoStreamFrame_t GetVideoStreamFrame(uint nDeviceIndex) @@ -2253,12 +2310,6 @@ public override bool ResumeVideoStream(uint nDeviceIndex) bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_ResumeVideoStream(m_pVRTrackedCamera,nDeviceIndex); return result; } - public override bool IsVideoStreamPaused(uint nDeviceIndex) - { - CheckIfUsable(); - bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_IsVideoStreamPaused(m_pVRTrackedCamera,nDeviceIndex); - return result; - } public override bool GetCameraDistortion(uint nDeviceIndex,float flInputU,float flInputV,ref float pflOutputU,ref float pflOutputV) { CheckIfUsable(); @@ -2367,13 +2418,14 @@ public enum ETrackedDeviceProperty Prop_ContainsProximitySensor_Bool = 1025, Prop_DeviceProvidesBatteryStatus_Bool = 1026, Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, 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_DisplayFirmwareVersion_Uint64 = 2006, Prop_IsOnDesktop_Bool = 2007, Prop_DisplayMCType_Int32 = 2008, Prop_DisplayMCOffset_Float = 2009, @@ -2395,6 +2447,8 @@ public enum ETrackedDeviceProperty Prop_LensCenterRightV_Float = 2025, Prop_UserHeadToEyeDepthMeters_Float = 2026, Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, Prop_AttachedDeviceId_String = 3000, Prop_SupportedButtons_Uint64 = 3001, Prop_Axis0Type_Int32 = 3002, @@ -2408,6 +2462,7 @@ public enum ETrackedDeviceProperty Prop_FieldOfViewBottomDegrees_Float = 4003, Prop_TrackingRangeMinimumMeters_Float = 4004, Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, Prop_VendorSpecific_Reserved_Start = 10000, Prop_VendorSpecific_Reserved_End = 10999, } @@ -2460,6 +2515,8 @@ public enum EVREventType VREvent_MouseButtonUp = 302, VREvent_FocusEnter = 303, VREvent_FocusLeave = 304, + VREvent_Scroll = 305, + VREvent_TouchPadMove = 306, VREvent_InputFocusCaptured = 400, VREvent_InputFocusReleased = 401, VREvent_SceneFocusLost = 402, @@ -2655,7 +2712,6 @@ public enum EVRInitError IPC_MutexInitFailed = 304, IPC_Failed = 305, VendorSpecific_UnableToConnectToOculusRuntime = 1000, - VendorSpecific_HmdFound_But = 1100, VendorSpecific_HmdFound_CantOpenDevice = 1101, VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, VendorSpecific_HmdFound_NoStoredConfig = 1103, @@ -2705,6 +2761,7 @@ public enum EVRApplicationProperty ImagePath_String = 52, Source_String = 53, IsDashboardOverlay_Bool = 60, + LastLaunchTime_Uint64 = 70, } public enum EVRApplicationTransitionState { @@ -2752,6 +2809,7 @@ public enum VROverlayTransformType VROverlayTransform_Absolute = 0, VROverlayTransform_TrackedDeviceRelative = 1, VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, } public enum VROverlayFlags { @@ -2761,11 +2819,14 @@ public enum VROverlayFlags NoDashboardTab = 3, AcceptsGamepadEvents = 4, ShowGamepadFocus = 5, + SendVRScrollEvents = 6, + SendVRTouchpadEvents = 7, } public enum EGamepadTextInputMode { k_EGamepadTextInputModeNormal = 0, k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, } public enum EGamepadTextInputLineMode { @@ -2821,6 +2882,7 @@ public enum ECameraVideoStreamFormat [FieldOffset(0)] public VREvent_Reserved_t reserved; [FieldOffset(0)] public VREvent_Controller_t controller; [FieldOffset(0)] public VREvent_Mouse_t mouse; + [FieldOffset(0)] public VREvent_Scroll_t scroll; [FieldOffset(0)] public VREvent_Process_t process; [FieldOffset(0)] public VREvent_Notification_t notification; [FieldOffset(0)] public VREvent_Overlay_t overlay; @@ -2917,13 +2979,29 @@ public enum ECameraVideoStreamFormat } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Controller_t { - public EVRButtonId button; + public uint button; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Mouse_t { public float x; public float y; - public EVRMouseButton button; + public uint button; +} +[StructLayout(LayoutKind.Sequential)] public struct VREvent_Scroll_t +{ + public float xdelta; + public float ydelta; + public uint repeatCount; +} +[StructLayout(LayoutKind.Sequential)] public struct VREvent_TouchPadMove_t +{ + [MarshalAs(UnmanagedType.I1)] + public bool bFingerDown; + public float flSecondsFingerDown; + public float fValueXFirst; + public float fValueYFirst; + public float fValueXRaw; + public float fValueYRaw; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Notification_t { @@ -2943,7 +3021,7 @@ public enum ECameraVideoStreamFormat } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Status_t { - public EVRState statusState; + public uint statusState; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Keyboard_t { @@ -2971,10 +3049,10 @@ public enum ECameraVideoStreamFormat } [StructLayout(LayoutKind.Sequential)] public struct VREvent_t { - public EVREventType eventType; + public uint eventType; public uint trackedDeviceIndex; - public VREvent_Data_t data; public float eventAgeSeconds; + public VREvent_Data_t data; } [StructLayout(LayoutKind.Sequential)] public struct HiddenAreaMesh_t { @@ -3015,24 +3093,28 @@ public enum ECameraVideoStreamFormat } [StructLayout(LayoutKind.Sequential)] public struct Compositor_FrameTiming { - public uint size; - public double frameStart; - public float frameVSync; - public uint droppedFrames; - public uint frameIndex; - public TrackedDevicePose_t pose; - public float prediction; - public float m_flFrameIntervalMs; - public float m_flSceneRenderCpuMs; + public uint m_nSize; + public uint m_nFrameIndex; + public uint m_nNumFramePresents; + public uint m_nNumDroppedFrames; + public double m_flSystemTimeInSeconds; public float m_flSceneRenderGpuMs; - public float m_flCompositorRenderCpuMs; + public float m_flTotalRenderGpuMs; public float m_flCompositorRenderGpuMs; + public float m_flCompositorRenderCpuMs; + public float m_flCompositorIdleCpuMs; + public float m_flClientFrameIntervalMs; public float m_flPresentCallCpuMs; - public float m_flRunningStartMs; - public float m_flHandoffStartMs; - public float m_flHandoffEndMs; - public float m_flCompositorUpdateCpuMs; - public uint m_nPresents; + public float m_flWaitForPresentCpuMs; + public float m_flSubmitFrameMs; + public float m_flWaitGetPosesCalledMs; + public float m_flNewPosesReadyMs; + public float m_flNewFrameReadyMs; + public float m_flCompositorUpdateStartMs; + public float m_flCompositorUpdateEndMs; + public float m_flCompositorRenderStartMs; + public TrackedDevicePose_t m_HmdPose; + public int m_nFidelityLevel; } [StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionParams_t { @@ -3140,21 +3222,22 @@ public static string GetStringForHmdError(EVRInitError error) public const uint k_unMaxPropertyStringSize = 32768; public const uint k_unControllerStateAxisCount = 5; public const ulong k_ulOverlayHandleInvalid = 0; - public const string IVRSystem_Version = "IVRSystem_010"; + public const string IVRSystem_Version = "IVRSystem_011"; public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; public const uint k_unMaxApplicationKeyLength = 128; - public const string IVRApplications_Version = "IVRApplications_002"; + public const string IVRApplications_Version = "IVRApplications_003"; public const string IVRChaperone_Version = "IVRChaperone_003"; - public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_004"; - public const string IVRCompositor_Version = "IVRCompositor_010"; + public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + public const string IVRCompositor_Version = "IVRCompositor_011"; public const uint k_unVROverlayMaxKeyLength = 128; public const uint k_unVROverlayMaxNameLength = 128; public const uint k_unMaxOverlayCount = 32; - public const string IVROverlay_Version = "IVROverlay_008"; + public const string IVROverlay_Version = "IVROverlay_010"; public const string k_pch_Controller_Component_GDC2015 = "gdc2015"; public const string k_pch_Controller_Component_Base = "base"; public const string k_pch_Controller_Component_Tip = "tip"; public const string k_pch_Controller_Component_HandGrip = "handgrip"; + public const string k_pch_Controller_Component_Status = "status"; public const string IVRRenderModels_Version = "IVRRenderModels_002"; public const uint k_unNotificationTextMaxSize = 256; public const string IVRNotifications_Version = "IVRNotifications_002"; @@ -3203,8 +3286,12 @@ public static string GetStringForHmdError(EVRInitError error) 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_UserInterface_Section = "userinterface"; + public const string k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; public const string k_pch_Notifications_Section = "notifications"; public const string k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + public const string k_pch_Keyboard_Section = "keyboard"; + public const string k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; public const string k_pch_Perf_Section = "perfcheck"; public const string k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; public const string k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; diff --git a/headers/openvr_api.json b/headers/openvr_api.json index ecb95e71..ecd0b84e 100644 --- a/headers/openvr_api.json +++ b/headers/openvr_api.json @@ -91,13 +91,14 @@ ,{"name": "Prop_ContainsProximitySensor_Bool","value": "1025"} ,{"name": "Prop_DeviceProvidesBatteryStatus_Bool","value": "1026"} ,{"name": "Prop_DeviceCanPowerOff_Bool","value": "1027"} + ,{"name": "Prop_Firmware_ProgrammingTarget_String","value": "1028"} ,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"} ,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"} ,{"name": "Prop_DisplayFrequency_Float","value": "2002"} ,{"name": "Prop_UserIpdMeters_Float","value": "2003"} ,{"name": "Prop_CurrentUniverseId_Uint64","value": "2004"} ,{"name": "Prop_PreviousUniverseId_Uint64","value": "2005"} - ,{"name": "Prop_DisplayFirmwareVersion_String","value": "2006"} + ,{"name": "Prop_DisplayFirmwareVersion_Uint64","value": "2006"} ,{"name": "Prop_IsOnDesktop_Bool","value": "2007"} ,{"name": "Prop_DisplayMCType_Int32","value": "2008"} ,{"name": "Prop_DisplayMCOffset_Float","value": "2009"} @@ -119,6 +120,8 @@ ,{"name": "Prop_LensCenterRightV_Float","value": "2025"} ,{"name": "Prop_UserHeadToEyeDepthMeters_Float","value": "2026"} ,{"name": "Prop_CameraFirmwareVersion_Uint64","value": "2027"} + ,{"name": "Prop_CameraFirmwareDescription_String","value": "2028"} + ,{"name": "Prop_DisplayFPGAVersion_Uint64","value": "2029"} ,{"name": "Prop_AttachedDeviceId_String","value": "3000"} ,{"name": "Prop_SupportedButtons_Uint64","value": "3001"} ,{"name": "Prop_Axis0Type_Int32","value": "3002"} @@ -132,6 +135,7 @@ ,{"name": "Prop_FieldOfViewBottomDegrees_Float","value": "4003"} ,{"name": "Prop_TrackingRangeMinimumMeters_Float","value": "4004"} ,{"name": "Prop_TrackingRangeMaximumMeters_Float","value": "4005"} + ,{"name": "Prop_ModeLabel_String","value": "4006"} ,{"name": "Prop_VendorSpecific_Reserved_Start","value": "10000"} ,{"name": "Prop_VendorSpecific_Reserved_End","value": "10999"} ]} @@ -180,6 +184,8 @@ ,{"name": "VREvent_MouseButtonUp","value": "302"} ,{"name": "VREvent_FocusEnter","value": "303"} ,{"name": "VREvent_FocusLeave","value": "304"} + ,{"name": "VREvent_Scroll","value": "305"} + ,{"name": "VREvent_TouchPadMove","value": "306"} ,{"name": "VREvent_InputFocusCaptured","value": "400"} ,{"name": "VREvent_InputFocusReleased","value": "401"} ,{"name": "VREvent_SceneFocusLost","value": "402"} @@ -364,7 +370,6 @@ ,{"name": "VRInitError_IPC_MutexInitFailed","value": "304"} ,{"name": "VRInitError_IPC_Failed","value": "305"} ,{"name": "VRInitError_VendorSpecific_UnableToConnectToOculusRuntime","value": "1000"} - ,{"name": "VRInitError_VendorSpecific_HmdFound_But","value": "1100"} ,{"name": "VRInitError_VendorSpecific_HmdFound_CantOpenDevice","value": "1101"} ,{"name": "VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart","value": "1102"} ,{"name": "VRInitError_VendorSpecific_HmdFound_NoStoredConfig","value": "1103"} @@ -412,6 +417,7 @@ ,{"name": "VRApplicationProperty_ImagePath_String","value": "52"} ,{"name": "VRApplicationProperty_Source_String","value": "53"} ,{"name": "VRApplicationProperty_IsDashboardOverlay_Bool","value": "60"} + ,{"name": "VRApplicationProperty_LastLaunchTime_Uint64","value": "70"} ]} , {"enumname": "vr::EVRApplicationTransitionState","values": [ {"name": "VRApplicationTransition_None","value": "0"} @@ -453,6 +459,7 @@ {"name": "VROverlayTransform_Absolute","value": "0"} ,{"name": "VROverlayTransform_TrackedDeviceRelative","value": "1"} ,{"name": "VROverlayTransform_SystemOverlay","value": "2"} + ,{"name": "VROverlayTransform_TrackedComponent","value": "3"} ]} , {"enumname": "vr::VROverlayFlags","values": [ {"name": "VROverlayFlags_None","value": "0"} @@ -461,10 +468,13 @@ ,{"name": "VROverlayFlags_NoDashboardTab","value": "3"} ,{"name": "VROverlayFlags_AcceptsGamepadEvents","value": "4"} ,{"name": "VROverlayFlags_ShowGamepadFocus","value": "5"} + ,{"name": "VROverlayFlags_SendVRScrollEvents","value": "6"} + ,{"name": "VROverlayFlags_SendVRTouchpadEvents","value": "7"} ]} , {"enumname": "vr::EGamepadTextInputMode","values": [ {"name": "k_EGamepadTextInputModeNormal","value": "0"} ,{"name": "k_EGamepadTextInputModePassword","value": "1"} + ,{"name": "k_EGamepadTextInputModeSubmit","value": "2"} ]} , {"enumname": "vr::EGamepadTextInputLineMode","values": [ {"name": "k_EGamepadTextInputLineModeSingleLine","value": "0"} @@ -525,19 +535,19 @@ ,{ "constname": "k_ulOverlayHandleInvalid","consttype": "const VROverlayHandle_t", "constval": "0"} ,{ - "constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_010"} + "constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_011"} ,{ "constname": "IVRExtendedDisplay_Version","consttype": "const char *const", "constval": "IVRExtendedDisplay_001"} ,{ "constname": "k_unMaxApplicationKeyLength","consttype": "const uint32_t", "constval": "128"} ,{ - "constname": "IVRApplications_Version","consttype": "const char *const", "constval": "IVRApplications_002"} + "constname": "IVRApplications_Version","consttype": "const char *const", "constval": "IVRApplications_003"} ,{ "constname": "IVRChaperone_Version","consttype": "const char *const", "constval": "IVRChaperone_003"} ,{ - "constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_004"} + "constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_005"} ,{ - "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_010"} + "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_011"} ,{ "constname": "k_unVROverlayMaxKeyLength","consttype": "const uint32_t", "constval": "128"} ,{ @@ -545,7 +555,7 @@ ,{ "constname": "k_unMaxOverlayCount","consttype": "const uint32_t", "constval": "32"} ,{ - "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_008"} + "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_010"} ,{ "constname": "k_pch_Controller_Component_GDC2015","consttype": "const char *const", "constval": "gdc2015"} ,{ @@ -554,6 +564,8 @@ "constname": "k_pch_Controller_Component_Tip","consttype": "const char *const", "constval": "tip"} ,{ "constname": "k_pch_Controller_Component_HandGrip","consttype": "const char *const", "constval": "handgrip"} +,{ + "constname": "k_pch_Controller_Component_Status","consttype": "const char *const", "constval": "status"} ,{ "constname": "IVRRenderModels_Version","consttype": "const char *const", "constval": "IVRRenderModels_002"} ,{ @@ -650,10 +662,18 @@ "constname": "k_pch_Null_SecondsFromVsyncToPhotons_Float","consttype": "const char *const", "constval": "secondsFromVsyncToPhotons"} ,{ "constname": "k_pch_Null_DisplayFrequency_Float","consttype": "const char *const", "constval": "displayFrequency"} +,{ + "constname": "k_pch_UserInterface_Section","consttype": "const char *const", "constval": "userinterface"} +,{ + "constname": "k_pch_UserInterface_StatusAlwaysOnTop_Bool","consttype": "const char *const", "constval": "StatusAlwaysOnTop"} ,{ "constname": "k_pch_Notifications_Section","consttype": "const char *const", "constval": "notifications"} ,{ "constname": "k_pch_Notifications_DoNotDisturb_Bool","consttype": "const char *const", "constval": "DoNotDisturb"} +,{ + "constname": "k_pch_Keyboard_Section","consttype": "const char *const", "constval": "keyboard"} +,{ + "constname": "k_pch_Keyboard_TutorialCompletions","consttype": "const char *const", "constval": "TutorialCompletions"} ,{ "constname": "k_pch_Perf_Section","consttype": "const char *const", "constval": "perfcheck"} ,{ @@ -719,11 +739,22 @@ { "fieldname": "uMax", "fieldtype": "float"}, { "fieldname": "vMax", "fieldtype": "float"}]} ,{"struct": "vr::VREvent_Controller_t","fields": [ -{ "fieldname": "button", "fieldtype": "enum vr::EVRButtonId"}]} +{ "fieldname": "button", "fieldtype": "uint32_t"}]} ,{"struct": "vr::VREvent_Mouse_t","fields": [ { "fieldname": "x", "fieldtype": "float"}, { "fieldname": "y", "fieldtype": "float"}, -{ "fieldname": "button", "fieldtype": "enum vr::EVRMouseButton"}]} +{ "fieldname": "button", "fieldtype": "uint32_t"}]} +,{"struct": "vr::VREvent_Scroll_t","fields": [ +{ "fieldname": "xdelta", "fieldtype": "float"}, +{ "fieldname": "ydelta", "fieldtype": "float"}, +{ "fieldname": "repeatCount", "fieldtype": "uint32_t"}]} +,{"struct": "vr::VREvent_TouchPadMove_t","fields": [ +{ "fieldname": "bFingerDown", "fieldtype": "_Bool"}, +{ "fieldname": "flSecondsFingerDown", "fieldtype": "float"}, +{ "fieldname": "fValueXFirst", "fieldtype": "float"}, +{ "fieldname": "fValueYFirst", "fieldtype": "float"}, +{ "fieldname": "fValueXRaw", "fieldtype": "float"}, +{ "fieldname": "fValueYRaw", "fieldtype": "float"}]} ,{"struct": "vr::VREvent_Notification_t","fields": [ { "fieldname": "ulUserValue", "fieldtype": "uint64_t"}, { "fieldname": "notificationId", "fieldtype": "uint32_t"}]} @@ -734,7 +765,7 @@ ,{"struct": "vr::VREvent_Overlay_t","fields": [ { "fieldname": "overlayHandle", "fieldtype": "uint64_t"}]} ,{"struct": "vr::VREvent_Status_t","fields": [ -{ "fieldname": "statusState", "fieldtype": "enum vr::EVRState"}]} +{ "fieldname": "statusState", "fieldtype": "uint32_t"}]} ,{"struct": "vr::VREvent_Keyboard_t","fields": [ { "fieldname": "cNewInput", "fieldtype": "char [8]"}, { "fieldname": "uUserValue", "fieldtype": "uint64_t"}]} @@ -752,6 +783,7 @@ { "fieldname": "reserved", "fieldtype": "struct vr::VREvent_Reserved_t"}, { "fieldname": "controller", "fieldtype": "struct vr::VREvent_Controller_t"}, { "fieldname": "mouse", "fieldtype": "struct vr::VREvent_Mouse_t"}, +{ "fieldname": "scroll", "fieldtype": "struct vr::VREvent_Scroll_t"}, { "fieldname": "process", "fieldtype": "struct vr::VREvent_Process_t"}, { "fieldname": "notification", "fieldtype": "struct vr::VREvent_Notification_t"}, { "fieldname": "overlay", "fieldtype": "struct vr::VREvent_Overlay_t"}, @@ -759,12 +791,13 @@ { "fieldname": "keyboard", "fieldtype": "struct vr::VREvent_Keyboard_t"}, { "fieldname": "ipd", "fieldtype": "struct vr::VREvent_Ipd_t"}, { "fieldname": "chaperone", "fieldtype": "struct vr::VREvent_Chaperone_t"}, -{ "fieldname": "performanceTest", "fieldtype": "struct vr::VREvent_PerformanceTest_t"}]} +{ "fieldname": "performanceTest", "fieldtype": "struct vr::VREvent_PerformanceTest_t"}, +{ "fieldname": "touchPadMove", "fieldtype": "struct vr::VREvent_TouchPadMove_t"}]} ,{"struct": "vr::VREvent_t","fields": [ -{ "fieldname": "eventType", "fieldtype": "enum vr::EVREventType"}, +{ "fieldname": "eventType", "fieldtype": "uint32_t"}, { "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"}, -{ "fieldname": "data", "fieldtype": "VREvent_Data_t"}, -{ "fieldname": "eventAgeSeconds", "fieldtype": "float"}]} +{ "fieldname": "eventAgeSeconds", "fieldtype": "float"}, +{ "fieldname": "data", "fieldtype": "VREvent_Data_t"}]} ,{"struct": "vr::HiddenAreaMesh_t","fields": [ { "fieldname": "pVertexData", "fieldtype": "const struct vr::HmdVector2_t *"}, { "fieldname": "unTriangleCount", "fieldtype": "uint32_t"}]} @@ -792,24 +825,28 @@ { "fieldname": "gridScale", "fieldtype": "float"}, { "fieldname": "transform", "fieldtype": "struct vr::HmdMatrix44_t"}]} ,{"struct": "vr::Compositor_FrameTiming","fields": [ -{ "fieldname": "size", "fieldtype": "uint32_t"}, -{ "fieldname": "frameStart", "fieldtype": "double"}, -{ "fieldname": "frameVSync", "fieldtype": "float"}, -{ "fieldname": "droppedFrames", "fieldtype": "uint32_t"}, -{ "fieldname": "frameIndex", "fieldtype": "uint32_t"}, -{ "fieldname": "pose", "fieldtype": "vr::TrackedDevicePose_t"}, -{ "fieldname": "prediction", "fieldtype": "float"}, -{ "fieldname": "m_flFrameIntervalMs", "fieldtype": "float"}, -{ "fieldname": "m_flSceneRenderCpuMs", "fieldtype": "float"}, +{ "fieldname": "m_nSize", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nFrameIndex", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nNumDroppedFrames", "fieldtype": "uint32_t"}, +{ "fieldname": "m_flSystemTimeInSeconds", "fieldtype": "double"}, { "fieldname": "m_flSceneRenderGpuMs", "fieldtype": "float"}, -{ "fieldname": "m_flCompositorRenderCpuMs", "fieldtype": "float"}, +{ "fieldname": "m_flTotalRenderGpuMs", "fieldtype": "float"}, { "fieldname": "m_flCompositorRenderGpuMs", "fieldtype": "float"}, +{ "fieldname": "m_flCompositorRenderCpuMs", "fieldtype": "float"}, +{ "fieldname": "m_flCompositorIdleCpuMs", "fieldtype": "float"}, +{ "fieldname": "m_flClientFrameIntervalMs", "fieldtype": "float"}, { "fieldname": "m_flPresentCallCpuMs", "fieldtype": "float"}, -{ "fieldname": "m_flRunningStartMs", "fieldtype": "float"}, -{ "fieldname": "m_flHandoffStartMs", "fieldtype": "float"}, -{ "fieldname": "m_flHandoffEndMs", "fieldtype": "float"}, -{ "fieldname": "m_flCompositorUpdateCpuMs", "fieldtype": "float"}, -{ "fieldname": "m_nPresents", "fieldtype": "uint32_t"}]} +{ "fieldname": "m_flWaitForPresentCpuMs", "fieldtype": "float"}, +{ "fieldname": "m_flSubmitFrameMs", "fieldtype": "float"}, +{ "fieldname": "m_flWaitGetPosesCalledMs", "fieldtype": "float"}, +{ "fieldname": "m_flNewPosesReadyMs", "fieldtype": "float"}, +{ "fieldname": "m_flNewFrameReadyMs", "fieldtype": "float"}, +{ "fieldname": "m_flCompositorUpdateStartMs", "fieldtype": "float"}, +{ "fieldname": "m_flCompositorUpdateEndMs", "fieldtype": "float"}, +{ "fieldname": "m_flCompositorRenderStartMs", "fieldtype": "float"}, +{ "fieldname": "m_HmdPose", "fieldtype": "vr::TrackedDevicePose_t"}, +{ "fieldname": "m_nFidelityLevel", "fieldtype": "int32_t"}]} ,{"struct": "vr::VROverlayIntersectionParams_t","fields": [ { "fieldname": "vSource", "fieldtype": "struct vr::HmdVector3_t"}, { "fieldname": "vDirection", "fieldtype": "struct vr::HmdVector3_t"}, @@ -1109,7 +1146,8 @@ "methodname": "PollNextEvent", "returntype": "bool", "params": [ -{ "paramname": "pEvent" ,"paramtype": "struct vr::VREvent_t *"} +{ "paramname": "pEvent" ,"paramtype": "struct vr::VREvent_t *"}, +{ "paramname": "uncbVREvent" ,"paramtype": "uint32_t"} ] } ,{ @@ -1119,6 +1157,7 @@ "params": [ { "paramname": "eOrigin" ,"paramtype": "vr::ETrackingUniverseOrigin"}, { "paramname": "pEvent" ,"paramtype": "vr::VREvent_t *"}, +{ "paramname": "uncbVREvent" ,"paramtype": "uint32_t"}, { "paramname": "pTrackedDevicePose" ,"paramtype": "vr::TrackedDevicePose_t *"} ] } @@ -1389,6 +1428,16 @@ { "paramname": "peError" ,"paramtype": "vr::EVRApplicationError *"} ] } +,{ + "classname": "vr::IVRApplications", + "methodname": "GetApplicationPropertyUint64", + "returntype": "uint64_t", + "params": [ +{ "paramname": "pchAppKey" ,"paramtype": "const char *"}, +{ "paramname": "eProperty" ,"paramtype": "vr::EVRApplicationProperty"}, +{ "paramname": "peError" ,"paramtype": "vr::EVRApplicationError *"} + ] +} ,{ "classname": "vr::IVRApplications", "methodname": "SetApplicationAutoLaunch", @@ -1616,7 +1665,7 @@ } ,{ "classname": "vr::IVRChaperoneSetup", - "methodname": "SetWorkingWallTagInfo", + "methodname": "SetWorkingCollisionBoundsTagsInfo", "returntype": "void", "params": [ { "paramname": "pTagsBuffer" ,"array_count": "unTagCount" ,"paramtype": "uint8_t *"}, @@ -1625,13 +1674,31 @@ } ,{ "classname": "vr::IVRChaperoneSetup", - "methodname": "GetLiveWallTagInfo", + "methodname": "GetLiveCollisionBoundsTagsInfo", "returntype": "bool", "params": [ { "paramname": "pTagsBuffer" ,"out_array_count": "punTagCount" ,"paramtype": "uint8_t *"}, { "paramname": "punTagCount" ,"paramtype": "uint32_t *"} ] } +,{ + "classname": "vr::IVRChaperoneSetup", + "methodname": "SetWorkingPhysicalBoundsInfo", + "returntype": "bool", + "params": [ +{ "paramname": "pQuadsBuffer" ,"array_count": "unQuadsCount" ,"paramtype": "struct vr::HmdQuad_t *"}, +{ "paramname": "unQuadsCount" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRChaperoneSetup", + "methodname": "GetLivePhysicalBoundsInfo", + "returntype": "bool", + "params": [ +{ "paramname": "pQuadsBuffer" ,"out_array_count": "punQuadsCount" ,"paramtype": "struct vr::HmdQuad_t *"}, +{ "paramname": "punQuadsCount" ,"paramtype": "uint32_t *"} + ] +} ,{ "classname": "vr::IVRCompositor", "methodname": "SetTrackingSpace", @@ -2058,6 +2125,27 @@ { "paramname": "pmatTrackedDeviceToOverlayTransform" ,"paramtype": "struct vr::HmdMatrix34_t *"} ] } +,{ + "classname": "vr::IVROverlay", + "methodname": "SetOverlayTransformTrackedDeviceComponent", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "unDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"}, +{ "paramname": "pchComponentName" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "vr::IVROverlay", + "methodname": "GetOverlayTransformTrackedDeviceComponent", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "punDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t *"}, +{ "paramname": "pchComponentName" ,"paramtype": "char *"}, +{ "paramname": "unComponentNameSize" ,"paramtype": "uint32_t"} + ] +} ,{ "classname": "vr::IVROverlay", "methodname": "ShowOverlay", @@ -2099,7 +2187,8 @@ "returntype": "bool", "params": [ { "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, -{ "paramname": "pEvent" ,"paramtype": "struct vr::VREvent_t *"} +{ "paramname": "pEvent" ,"paramtype": "struct vr::VREvent_t *"}, +{ "paramname": "uncbVREvent" ,"paramtype": "uint32_t"} ] } ,{ @@ -2285,6 +2374,11 @@ { "paramname": "pchOverlayToShow" ,"paramtype": "const char *"} ] } +,{ + "classname": "vr::IVROverlay", + "methodname": "GetPrimaryDashboardDevice", + "returntype": "vr::TrackedDeviceIndex_t" +} ,{ "classname": "vr::IVROverlay", "methodname": "ShowKeyboard", @@ -2445,6 +2539,15 @@ { "paramname": "pComponentState" ,"paramtype": "struct vr::RenderModel_ComponentState_t *"} ] } +,{ + "classname": "vr::IVRRenderModels", + "methodname": "RenderModelHasComponent", + "returntype": "bool", + "params": [ +{ "paramname": "pchRenderModelName" ,"paramtype": "const char *"}, +{ "paramname": "pchComponentName" ,"paramtype": "const char *"} + ] +} ,{ "classname": "vr::IVRNotifications", "methodname": "CreateNotification", @@ -2649,15 +2752,9 @@ "methodname": "IsVideoStreamActive", "returntype": "bool", "params": [ -{ "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"} - ] -} -,{ - "classname": "vr::IVRTrackedCamera", - "methodname": "GetVideoStreamElapsedTime", - "returntype": "float", - "params": [ -{ "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"} +{ "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"}, +{ "paramname": "pbPaused" ,"paramtype": "bool *"}, +{ "paramname": "pflElapsedTime" ,"paramtype": "float *"} ] } ,{ @@ -2702,14 +2799,6 @@ { "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"} ] } -,{ - "classname": "vr::IVRTrackedCamera", - "methodname": "IsVideoStreamPaused", - "returntype": "bool", - "params": [ -{ "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"} - ] -} ,{ "classname": "vr::IVRTrackedCamera", "methodname": "GetCameraDistortion", diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h index 50580562..e27d4ed8 100644 --- a/headers/openvr_capi.h +++ b/headers/openvr_capi.h @@ -109,21 +109,22 @@ unsigned int k_unTrackedDeviceIndexInvalid = 4294967295; unsigned int k_unMaxPropertyStringSize = 32768; unsigned int k_unControllerStateAxisCount = 5; unsigned long k_ulOverlayHandleInvalid = 0; -char * IVRSystem_Version = "IVRSystem_010"; +char * IVRSystem_Version = "IVRSystem_011"; char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; unsigned int k_unMaxApplicationKeyLength = 128; -char * IVRApplications_Version = "IVRApplications_002"; +char * IVRApplications_Version = "IVRApplications_003"; char * IVRChaperone_Version = "IVRChaperone_003"; -char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_004"; -char * IVRCompositor_Version = "IVRCompositor_010"; +char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; +char * IVRCompositor_Version = "IVRCompositor_011"; unsigned int k_unVROverlayMaxKeyLength = 128; unsigned int k_unVROverlayMaxNameLength = 128; unsigned int k_unMaxOverlayCount = 32; -char * IVROverlay_Version = "IVROverlay_008"; +char * IVROverlay_Version = "IVROverlay_010"; char * k_pch_Controller_Component_GDC2015 = "gdc2015"; char * k_pch_Controller_Component_Base = "base"; char * k_pch_Controller_Component_Tip = "tip"; char * k_pch_Controller_Component_HandGrip = "handgrip"; +char * k_pch_Controller_Component_Status = "status"; char * IVRRenderModels_Version = "IVRRenderModels_002"; unsigned int k_unNotificationTextMaxSize = 256; char * IVRNotifications_Version = "IVRNotifications_002"; @@ -172,8 +173,12 @@ 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_UserInterface_Section = "userinterface"; +char * k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; char * k_pch_Notifications_Section = "notifications"; char * k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; +char * k_pch_Keyboard_Section = "keyboard"; +char * k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; char * k_pch_Perf_Section = "perfcheck"; char * k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; char * k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; @@ -267,13 +272,14 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_ContainsProximitySensor_Bool = 1025, ETrackedDeviceProperty_Prop_DeviceProvidesBatteryStatus_Bool = 1026, ETrackedDeviceProperty_Prop_DeviceCanPowerOff_Bool = 1027, + ETrackedDeviceProperty_Prop_Firmware_ProgrammingTarget_String = 1028, ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000, ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001, ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002, ETrackedDeviceProperty_Prop_UserIpdMeters_Float = 2003, ETrackedDeviceProperty_Prop_CurrentUniverseId_Uint64 = 2004, ETrackedDeviceProperty_Prop_PreviousUniverseId_Uint64 = 2005, - ETrackedDeviceProperty_Prop_DisplayFirmwareVersion_String = 2006, + ETrackedDeviceProperty_Prop_DisplayFirmwareVersion_Uint64 = 2006, ETrackedDeviceProperty_Prop_IsOnDesktop_Bool = 2007, ETrackedDeviceProperty_Prop_DisplayMCType_Int32 = 2008, ETrackedDeviceProperty_Prop_DisplayMCOffset_Float = 2009, @@ -295,6 +301,8 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_LensCenterRightV_Float = 2025, ETrackedDeviceProperty_Prop_UserHeadToEyeDepthMeters_Float = 2026, ETrackedDeviceProperty_Prop_CameraFirmwareVersion_Uint64 = 2027, + ETrackedDeviceProperty_Prop_CameraFirmwareDescription_String = 2028, + ETrackedDeviceProperty_Prop_DisplayFPGAVersion_Uint64 = 2029, ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000, ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001, ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002, @@ -308,6 +316,7 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_FieldOfViewBottomDegrees_Float = 4003, ETrackedDeviceProperty_Prop_TrackingRangeMinimumMeters_Float = 4004, ETrackedDeviceProperty_Prop_TrackingRangeMaximumMeters_Float = 4005, + ETrackedDeviceProperty_Prop_ModeLabel_String = 4006, ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_Start = 10000, ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_End = 10999, } ETrackedDeviceProperty; @@ -364,6 +373,8 @@ typedef enum EVREventType EVREventType_VREvent_MouseButtonUp = 302, EVREventType_VREvent_FocusEnter = 303, EVREventType_VREvent_FocusLeave = 304, + EVREventType_VREvent_Scroll = 305, + EVREventType_VREvent_TouchPadMove = 306, EVREventType_VREvent_InputFocusCaptured = 400, EVREventType_VREvent_InputFocusReleased = 401, EVREventType_VREvent_SceneFocusLost = 402, @@ -570,7 +581,6 @@ typedef enum EVRInitError EVRInitError_VRInitError_IPC_MutexInitFailed = 304, EVRInitError_VRInitError_IPC_Failed = 305, EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, - EVRInitError_VRInitError_VendorSpecific_HmdFound_But = 1100, EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, EVRInitError_VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, @@ -622,6 +632,7 @@ typedef enum EVRApplicationProperty EVRApplicationProperty_VRApplicationProperty_ImagePath_String = 52, EVRApplicationProperty_VRApplicationProperty_Source_String = 53, EVRApplicationProperty_VRApplicationProperty_IsDashboardOverlay_Bool = 60, + EVRApplicationProperty_VRApplicationProperty_LastLaunchTime_Uint64 = 70, } EVRApplicationProperty; typedef enum EVRApplicationTransitionState @@ -675,6 +686,7 @@ typedef enum VROverlayTransformType VROverlayTransformType_VROverlayTransform_Absolute = 0, VROverlayTransformType_VROverlayTransform_TrackedDeviceRelative = 1, VROverlayTransformType_VROverlayTransform_SystemOverlay = 2, + VROverlayTransformType_VROverlayTransform_TrackedComponent = 3, } VROverlayTransformType; typedef enum VROverlayFlags @@ -685,12 +697,15 @@ typedef enum VROverlayFlags VROverlayFlags_NoDashboardTab = 3, VROverlayFlags_AcceptsGamepadEvents = 4, VROverlayFlags_ShowGamepadFocus = 5, + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, } VROverlayFlags; typedef enum EGamepadTextInputMode { EGamepadTextInputMode_k_EGamepadTextInputModeNormal = 0, EGamepadTextInputMode_k_EGamepadTextInputModePassword = 1, + EGamepadTextInputMode_k_EGamepadTextInputModeSubmit = 2, } EGamepadTextInputMode; typedef enum EGamepadTextInputLineMode @@ -878,24 +893,28 @@ typedef struct Compositor_OverlaySettings typedef struct Compositor_FrameTiming { - uint32_t size; - double frameStart; - float frameVSync; - uint32_t droppedFrames; - uint32_t frameIndex; - TrackedDevicePose_t pose; - float prediction; - float m_flFrameIntervalMs; - float m_flSceneRenderCpuMs; + uint32_t m_nSize; + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; + uint32_t m_nNumDroppedFrames; + double m_flSystemTimeInSeconds; float m_flSceneRenderGpuMs; - float m_flCompositorRenderCpuMs; + float m_flTotalRenderGpuMs; float m_flCompositorRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorIdleCpuMs; + float m_flClientFrameIntervalMs; float m_flPresentCallCpuMs; - float m_flRunningStartMs; - float m_flHandoffStartMs; - float m_flHandoffEndMs; - float m_flCompositorUpdateCpuMs; - uint32_t m_nPresents; + float m_flWaitForPresentCpuMs; + float m_flSubmitFrameMs; + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + TrackedDevicePose_t m_HmdPose; + int32_t m_nFidelityLevel; } Compositor_FrameTiming; typedef struct VROverlayIntersectionParams_t @@ -1004,8 +1023,8 @@ S_API uint64_t VR_IVRSystem_GetUint64TrackedDeviceProperty(intptr_t instancePtr, S_API struct HmdMatrix34_t VR_IVRSystem_GetMatrix34TrackedDeviceProperty(intptr_t instancePtr, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError); S_API uint32_t VR_IVRSystem_GetStringTrackedDeviceProperty(intptr_t instancePtr, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError); S_API char * VR_IVRSystem_GetPropErrorNameFromEnum(intptr_t instancePtr, ETrackedPropertyError error); -S_API bool VR_IVRSystem_PollNextEvent(intptr_t instancePtr, struct VREvent_t * pEvent); -S_API bool VR_IVRSystem_PollNextEventWithPose(intptr_t instancePtr, ETrackingUniverseOrigin eOrigin, VREvent_t * pEvent, TrackedDevicePose_t * pTrackedDevicePose); +S_API bool VR_IVRSystem_PollNextEvent(intptr_t instancePtr, struct VREvent_t * pEvent, uint32_t uncbVREvent); +S_API bool VR_IVRSystem_PollNextEventWithPose(intptr_t instancePtr, ETrackingUniverseOrigin eOrigin, VREvent_t * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose); S_API char * VR_IVRSystem_GetEventTypeNameFromEnum(intptr_t instancePtr, EVREventType eType); S_API struct HiddenAreaMesh_t VR_IVRSystem_GetHiddenAreaMesh(intptr_t instancePtr, EVREye eEye); S_API bool VR_IVRSystem_GetControllerState(intptr_t instancePtr, TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState); @@ -1038,6 +1057,7 @@ S_API uint32_t VR_IVRApplications_GetApplicationProcessId(intptr_t instancePtr, S_API char * VR_IVRApplications_GetApplicationsErrorNameFromEnum(intptr_t instancePtr, EVRApplicationError error); S_API uint32_t VR_IVRApplications_GetApplicationPropertyString(intptr_t instancePtr, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError); S_API bool VR_IVRApplications_GetApplicationPropertyBool(intptr_t instancePtr, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError); +S_API uint64_t VR_IVRApplications_GetApplicationPropertyUint64(intptr_t instancePtr, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError); S_API EVRApplicationError VR_IVRApplications_SetApplicationAutoLaunch(intptr_t instancePtr, const char * pchAppKey, bool bAutoLaunch); S_API bool VR_IVRApplications_GetApplicationAutoLaunch(intptr_t instancePtr, const char * pchAppKey); S_API EVRApplicationError VR_IVRApplications_GetStartingApplication(intptr_t instancePtr, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen); @@ -1067,8 +1087,10 @@ S_API void VR_IVRChaperoneSetup_SetWorkingSeatedZeroPoseToRawTrackingPose(intptr S_API void VR_IVRChaperoneSetup_SetWorkingStandingZeroPoseToRawTrackingPose(intptr_t instancePtr, const struct HmdMatrix34_t * pMatStandingZeroPoseToRawTrackingPose); S_API void VR_IVRChaperoneSetup_ReloadFromDisk(intptr_t instancePtr, EChaperoneConfigFile configFile); S_API bool VR_IVRChaperoneSetup_GetLiveSeatedZeroPoseToRawTrackingPose(intptr_t instancePtr, struct HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose); -S_API void VR_IVRChaperoneSetup_SetWorkingWallTagInfo(intptr_t instancePtr, uint8_t * pTagsBuffer, uint32_t unTagCount); -S_API bool VR_IVRChaperoneSetup_GetLiveWallTagInfo(intptr_t instancePtr, uint8_t * pTagsBuffer, uint32_t * punTagCount); +S_API void VR_IVRChaperoneSetup_SetWorkingCollisionBoundsTagsInfo(intptr_t instancePtr, uint8_t * pTagsBuffer, uint32_t unTagCount); +S_API bool VR_IVRChaperoneSetup_GetLiveCollisionBoundsTagsInfo(intptr_t instancePtr, uint8_t * pTagsBuffer, uint32_t * punTagCount); +S_API bool VR_IVRChaperoneSetup_SetWorkingPhysicalBoundsInfo(intptr_t instancePtr, struct HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount); +S_API bool VR_IVRChaperoneSetup_GetLivePhysicalBoundsInfo(intptr_t instancePtr, struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount); S_API void VR_IVRCompositor_SetTrackingSpace(intptr_t instancePtr, ETrackingUniverseOrigin eOrigin); S_API ETrackingUniverseOrigin VR_IVRCompositor_GetTrackingSpace(intptr_t instancePtr); S_API EVRCompositorError VR_IVRCompositor_WaitGetPoses(intptr_t instancePtr, struct TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, struct TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); @@ -1121,11 +1143,13 @@ S_API EVROverlayError VR_IVROverlay_SetOverlayTransformAbsolute(intptr_t instanc S_API EVROverlayError VR_IVROverlay_GetOverlayTransformAbsolute(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform); S_API EVROverlayError VR_IVROverlay_SetOverlayTransformTrackedDeviceRelative(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const struct HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform); S_API EVROverlayError VR_IVROverlay_GetOverlayTransformTrackedDeviceRelative(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, struct HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform); +S_API EVROverlayError VR_IVROverlay_SetOverlayTransformTrackedDeviceComponent(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName); +S_API EVROverlayError VR_IVROverlay_GetOverlayTransformTrackedDeviceComponent(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize); S_API EVROverlayError VR_IVROverlay_ShowOverlay(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle); S_API EVROverlayError VR_IVROverlay_HideOverlay(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle); S_API bool VR_IVROverlay_IsOverlayVisible(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle); S_API EVROverlayError VR_IVROverlay_GetTransformForOverlayCoordinates(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdVector2_t coordinatesInOverlay, struct HmdMatrix34_t * pmatTransform); -S_API bool VR_IVROverlay_PollNextOverlayEvent(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, struct VREvent_t * pEvent); +S_API bool VR_IVROverlay_PollNextOverlayEvent(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, struct VREvent_t * pEvent, uint32_t uncbVREvent); S_API EVROverlayError VR_IVROverlay_GetOverlayInputMethod(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod); S_API EVROverlayError VR_IVROverlay_SetOverlayInputMethod(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod); S_API EVROverlayError VR_IVROverlay_GetOverlayMouseScale(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvecMouseScale); @@ -1147,6 +1171,7 @@ S_API bool VR_IVROverlay_IsActiveDashboardOverlay(intptr_t instancePtr, VROverla S_API EVROverlayError VR_IVROverlay_SetDashboardOverlaySceneProcess(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId); S_API EVROverlayError VR_IVROverlay_GetDashboardOverlaySceneProcess(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId); S_API void VR_IVROverlay_ShowDashboard(intptr_t instancePtr, const char * pchOverlayToShow); +S_API TrackedDeviceIndex_t VR_IVROverlay_GetPrimaryDashboardDevice(intptr_t instancePtr); S_API EVROverlayError VR_IVROverlay_ShowKeyboard(intptr_t instancePtr, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue); S_API EVROverlayError VR_IVROverlay_ShowKeyboardForOverlay(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue); S_API uint32_t VR_IVROverlay_GetKeyboardText(intptr_t instancePtr, char * pchText, uint32_t cchText); @@ -1164,6 +1189,7 @@ S_API uint32_t VR_IVRRenderModels_GetComponentName(intptr_t instancePtr, const c S_API uint64_t VR_IVRRenderModels_GetComponentButtonMask(intptr_t instancePtr, const char * pchRenderModelName, const char * pchComponentName); S_API uint32_t VR_IVRRenderModels_GetComponentRenderModelName(intptr_t instancePtr, const char * pchRenderModelName, const char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen); S_API bool VR_IVRRenderModels_GetComponentState(intptr_t instancePtr, const char * pchRenderModelName, const char * pchComponentName, const VRControllerState_t * pControllerState, struct RenderModel_ComponentState_t * pComponentState); +S_API bool VR_IVRRenderModels_RenderModelHasComponent(intptr_t instancePtr, const char * pchRenderModelName, const char * pchComponentName); S_API EVRNotificationError VR_IVRNotifications_CreateNotification(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char * pchText, EVRNotificationStyle style, const struct NotificationBitmap_t * pImage, VRNotificationId * pNotificationId); S_API EVRNotificationError VR_IVRNotifications_RemoveNotification(intptr_t instancePtr, VRNotificationId notificationId); S_API char * VR_IVRSettings_GetSettingsErrorNameFromEnum(intptr_t instancePtr, EVRSettingsError eError); @@ -1184,14 +1210,12 @@ S_API ECameraVideoStreamFormat VR_IVRTrackedCamera_GetCameraVideoStreamFormat(in S_API bool VR_IVRTrackedCamera_EnableCameraForStreaming(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex, bool bEnable); S_API bool VR_IVRTrackedCamera_StartVideoStream(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex); S_API bool VR_IVRTrackedCamera_StopVideoStream(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex); -S_API bool VR_IVRTrackedCamera_IsVideoStreamActive(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex); -S_API float VR_IVRTrackedCamera_GetVideoStreamElapsedTime(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex); +S_API bool VR_IVRTrackedCamera_IsVideoStreamActive(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex, bool * pbPaused, float * pflElapsedTime); S_API CameraVideoStreamFrame_t * VR_IVRTrackedCamera_GetVideoStreamFrame(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex); S_API bool VR_IVRTrackedCamera_ReleaseVideoStreamFrame(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex, const CameraVideoStreamFrame_t * pFrameImage); S_API bool VR_IVRTrackedCamera_SetAutoExposure(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex, bool bEnable); S_API bool VR_IVRTrackedCamera_PauseVideoStream(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex); S_API bool VR_IVRTrackedCamera_ResumeVideoStream(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex); -S_API bool VR_IVRTrackedCamera_IsVideoStreamPaused(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex); S_API bool VR_IVRTrackedCamera_GetCameraDistortion(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex, float flInputU, float flInputV, float * pflOutputU, float * pflOutputV); S_API bool VR_IVRTrackedCamera_GetCameraProjection(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex, float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, HmdMatrix44_t * pProjection); S_API bool VR_IVRTrackedCamera_GetRecommendedCameraUndistortion(intptr_t instancePtr, TrackedDeviceIndex_t nDeviceIndex, uint32_t * pUndistortionWidthPixels, uint32_t * pUndistortionHeightPixels); diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h index d4441969..1c762d38 100644 --- a/headers/openvr_driver.h +++ b/headers/openvr_driver.h @@ -223,6 +223,7 @@ enum ETrackedDeviceProperty Prop_ContainsProximitySensor_Bool = 1025, Prop_DeviceProvidesBatteryStatus_Bool = 1026, Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -231,7 +232,7 @@ enum ETrackedDeviceProperty Prop_UserIpdMeters_Float = 2003, Prop_CurrentUniverseId_Uint64 = 2004, Prop_PreviousUniverseId_Uint64 = 2005, - Prop_DisplayFirmwareVersion_String = 2006, + Prop_DisplayFirmwareVersion_Uint64 = 2006, Prop_IsOnDesktop_Bool = 2007, Prop_DisplayMCType_Int32 = 2008, Prop_DisplayMCOffset_Float = 2009, @@ -253,6 +254,8 @@ enum ETrackedDeviceProperty Prop_LensCenterRightV_Float = 2025, Prop_UserHeadToEyeDepthMeters_Float = 2026, Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, // Properties that are unique to TrackedDeviceClass_Controller Prop_AttachedDeviceId_String = 3000, @@ -270,6 +273,7 @@ enum ETrackedDeviceProperty Prop_FieldOfViewBottomDegrees_Float = 4003, Prop_TrackingRangeMinimumMeters_Float = 4004, Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, // Vendors are free to expose private debug data in this reserved region Prop_VendorSpecific_Reserved_Start = 10000, @@ -355,6 +359,8 @@ enum EVREventType VREvent_MouseButtonUp = 302, // data is mouse VREvent_FocusEnter = 303, // data is overlay VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse VREvent_InputFocusCaptured = 400, // data is process VREvent_InputFocusReleased = 401, // data is process @@ -469,7 +475,7 @@ inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } /** used for controller button events */ struct VREvent_Controller_t { - EVRButtonId button; + uint32_t button; // EVRButtonId enum }; @@ -485,8 +491,35 @@ enum EVRMouseButton /** used for simulated mouse events in overlay space */ struct VREvent_Mouse_t { - float x, y; - EVRMouseButton button; + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; }; /** notification related events. Details will still change at this point */ @@ -496,7 +529,6 @@ struct VREvent_Notification_t uint32_t notificationId; }; - /** Used for events about processes */ struct VREvent_Process_t { @@ -516,7 +548,7 @@ struct VREvent_Overlay_t /** Used for a few events about overlays */ struct VREvent_Status_t { - EVRState statusState; + uint32_t statusState; // EVRState enum }; /** Used for keyboard events **/ @@ -537,8 +569,7 @@ struct VREvent_Chaperone_t uint64_t m_nCurrentUniverse; }; -/** Not actually used for any events. It is just used to reserve -* space in the union for future event types */ +/** Not actually used for any events */ struct VREvent_Reserved_t { uint64_t reserved0; @@ -556,6 +587,7 @@ typedef union VREvent_Reserved_t reserved; VREvent_Controller_t controller; VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; VREvent_Process_t process; VREvent_Notification_t notification; VREvent_Overlay_t overlay; @@ -564,15 +596,17 @@ typedef union VREvent_Ipd_t ipd; VREvent_Chaperone_t chaperone; VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; } VREvent_Data_t; /** An event posted by the server to all running applications */ struct VREvent_t { - EVREventType eventType; + uint32_t eventType; // EVREventType enum TrackedDeviceIndex_t trackedDeviceIndex; - VREvent_Data_t data; float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; }; @@ -779,7 +813,6 @@ enum EVRInitError VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, - VRInitError_VendorSpecific_HmdFound_But = 1100, VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, @@ -993,11 +1026,21 @@ namespace vr static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + //----------------------------------------------------------------------------- // notification keys static const char * const k_pch_Notifications_Section = "notifications"; static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + //----------------------------------------------------------------------------- // perf keys static const char * const k_pch_Perf_Section = "perfcheck"; diff --git a/lib/linux32/libopenvr_api.so b/lib/linux32/libopenvr_api.so index 9ab2a839..27da01cb 100755 Binary files a/lib/linux32/libopenvr_api.so and b/lib/linux32/libopenvr_api.so differ diff --git a/lib/linux64/libopenvr_api.so b/lib/linux64/libopenvr_api.so index b28d467c..68fb66b2 100755 Binary files a/lib/linux64/libopenvr_api.so and b/lib/linux64/libopenvr_api.so differ diff --git a/lib/win32/openvr_api.lib b/lib/win32/openvr_api.lib index 062d6f5b..4a07e507 100644 Binary files a/lib/win32/openvr_api.lib and b/lib/win32/openvr_api.lib differ diff --git a/lib/win64/openvr_api.lib b/lib/win64/openvr_api.lib index b87f6896..93a0eda5 100644 Binary files a/lib/win64/openvr_api.lib and b/lib/win64/openvr_api.lib differ diff --git a/samples/bin/win32/openvr_api.dll b/samples/bin/win32/openvr_api.dll index d917770d..cee55bee 100644 Binary files a/samples/bin/win32/openvr_api.dll and b/samples/bin/win32/openvr_api.dll differ diff --git a/samples/bin/win64/openvr_api.dll b/samples/bin/win64/openvr_api.dll index b042a269..47557af4 100644 Binary files a/samples/bin/win64/openvr_api.dll and b/samples/bin/win64/openvr_api.dll differ diff --git a/samples/hellovr_opengl/hellovr_opengl_main.cpp b/samples/hellovr_opengl/hellovr_opengl_main.cpp index 97db0ba6..74598e4f 100644 --- a/samples/hellovr_opengl/hellovr_opengl_main.cpp +++ b/samples/hellovr_opengl/hellovr_opengl_main.cpp @@ -595,7 +595,7 @@ bool CMainApplication::HandleInput() // Process SteamVR events vr::VREvent_t event; - while( m_pHMD->PollNextEvent( &event ) ) + while( m_pHMD->PollNextEvent( &event, sizeof( event ) ) ) { ProcessVREvent( event ); } diff --git a/samples/helloworldoverlay/openvroverlaycontroller.cpp b/samples/helloworldoverlay/openvroverlaycontroller.cpp index 114a4851..f447b81e 100644 --- a/samples/helloworldoverlay/openvroverlaycontroller.cpp +++ b/samples/helloworldoverlay/openvroverlaycontroller.cpp @@ -221,7 +221,7 @@ void COpenVROverlayController::OnTimeoutPumpEvents() } vr::VREvent_t vrEvent; - while( vr::VROverlay()->PollNextOverlayEvent( m_ulOverlayHandle, &vrEvent ) ) + while( vr::VROverlay()->PollNextOverlayEvent( m_ulOverlayHandle, &vrEvent, sizeof( vrEvent ) ) ) { switch( vrEvent.eventType ) { @@ -313,7 +313,7 @@ void COpenVROverlayController::OnTimeoutPumpEvents() if( m_ulOverlayThumbnailHandle != vr::k_ulOverlayHandleInvalid ) { - while( vr::VROverlay()->PollNextOverlayEvent( m_ulOverlayThumbnailHandle, &vrEvent ) ) + while( vr::VROverlay()->PollNextOverlayEvent( m_ulOverlayThumbnailHandle, &vrEvent, sizeof( vrEvent) ) ) { switch( vrEvent.eventType ) {