Skip to content

Commit 9a27011

Browse files
committed
OpenVR SDK 0.9.10
* Split VREvent_SceneApplicationChanged into two events. SceneApplicationChanged will be sent when switching from one app drawing the 3D scene to another drawing the 3D scene. SceneFocusChanged will be sent when the process that is allowed to draw in 3D has changed. * Added events to notify launchers when about ongoing application transitions. * Added button IDs for DPad and A buttons that will be sent when the user presses on the trackpad while in the VR dashboard. * Added new HmdError_ShuttingDown, with will be returned when a new application calls VR_Init while SteamVR is in the process of shutting down. * Added new Application errors for when an application can't start because another application transition is already in progress. * Added new IVRApplications methods that are intended for launchers, but may be of more general use: * GetTransitionState() - returns what phase of the transition process the system is in * GetStartingApplication() - returns the app key of the application that is starting up * PerformApplicationPrelaunchCheck() - kicks off the application transition process and returns what kind of event the caller should wait for before starting its new application * GetApplicationsTransitionStateNameFromEnum() - Turns the results of GetTransitionState() into a string for logging purposes * Added more const to the settings strings to avoid compiler warnings on some platforms. * Added IVRCompositor methods: * ShowMirrorWindow/HideMirrorWindow - Shows or hides a window that displays the left undistorted eye that the user is seeing in the HMD * CompositorDumpImages - Writes all textures that the compositor knows about (including overlays) to a "screenshots" folder in the root of the runtime * GetFrameTimeRemaining - Returns the time left (in seconds) until the end of the current frame * GetLastFrameRenderer - Returns the process ID of the process that rendered the most recent frame to the HMD. If the compositor is showing its grid, this function will return 0 even if another app has scene focus. * Added preliminary support for controller-based keyboard input * Use IVROverlay::ShowKeyboard() to show the keyboard. * Currently only minimal mode is supported * Listen for KeyboardCharInput events to receive key input while the keyboard is up. The cNewInput buffer will contain input. [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 3016204]
1 parent ee4fac4 commit 9a27011

22 files changed

+735
-143
lines changed

bin/linux32/libopenvr_api.so

42.6 KB
Binary file not shown.

bin/linux32/libopenvr_api.so.dbg

106 KB
Binary file not shown.

bin/linux64/libopenvr_api.so

4.89 KB
Binary file not shown.

bin/linux64/libopenvr_api.so.dbg

19 KB
Binary file not shown.

bin/osx32/libopenvr_api.dylib

-21.9 KB
Binary file not shown.
Binary file not shown.

bin/win32/openvr_api.dll

-512 Bytes
Binary file not shown.

bin/win32/openvr_api.pdb

24 KB
Binary file not shown.

bin/win64/openvr_api.dll

-512 Bytes
Binary file not shown.

bin/win64/openvr_api.pdb

48 KB
Binary file not shown.

headers/openvr.h

+193-59
Large diffs are not rendered by default.

headers/openvr_api.cs

+195-9
Large diffs are not rendered by default.

headers/openvr_api.json

+204-48
Large diffs are not rendered by default.

headers/openvr_capi.h

+76-9
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ typedef union
7373

7474

7575
unsigned int k_unTrackingStringSize = 32;
76-
unsigned int k_unMaxTrackedDeviceCount = 16;
77-
unsigned int k_unTrackedDeviceIndex_Hmd = 0;
7876
unsigned int k_unMaxDriverDebugResponseSize = 32768;
77+
unsigned int k_unTrackedDeviceIndex_Hmd = 0;
78+
unsigned int k_unMaxTrackedDeviceCount = 16;
7979
unsigned int k_unTrackedDeviceIndexInvalid = 4294967295;
8080
unsigned int k_unMaxPropertyStringSize = 32768;
8181
unsigned int k_unControllerStateAxisCount = 5;
@@ -106,6 +106,7 @@ char * k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY";
106106
char * k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps";
107107
char * k_pch_SteamVR_LogLevel_Int32 = "loglevel";
108108
char * k_pch_SteamVR_IPD_Float = "ipd";
109+
char * k_pch_SteamVR_Background_String = "background";
109110
char * k_pch_Lighthouse_Section = "driver_lighthouse";
110111
char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
111112
char * k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
@@ -134,6 +135,12 @@ char * k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons";
134135
char * k_pch_Null_DisplayFrequency_Float = "displayFrequency";
135136
char * k_pch_Notifications_Section = "notifications";
136137
char * k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
138+
char * k_pch_Perf_Section = "perfcheck";
139+
char * k_pch_Perf_HeuristicActive_Bool = "heuristicActive";
140+
char * k_pch_Perf_NotifyInHMD_Bool = "notifyInHMD";
141+
char * k_pch_Perf_NotifyOnlyOnce_Bool = "notifyOnlyOnce";
142+
char * k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
143+
char * k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
137144
char * IVRSettings_Version = "IVRSettings_001";
138145
char * IVRCameraAccess_Version = "IVRCameraAccess_001";
139146
char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_002";
@@ -194,6 +201,7 @@ typedef enum TrackedDeviceProperty
194201
TrackedDeviceProperty_Prop_VRCVersion_Uint64 = 1020,
195202
TrackedDeviceProperty_Prop_RadioVersion_Uint64 = 1021,
196203
TrackedDeviceProperty_Prop_DongleVersion_Uint64 = 1022,
204+
TrackedDeviceProperty_Prop_BlockServerShutdown_Bool = 1023,
197205
TrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000,
198206
TrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001,
199207
TrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002,
@@ -205,6 +213,10 @@ typedef enum TrackedDeviceProperty
205213
TrackedDeviceProperty_Prop_DisplayMCType_Int32 = 2008,
206214
TrackedDeviceProperty_Prop_DisplayMCOffset_Float = 2009,
207215
TrackedDeviceProperty_Prop_DisplayMCScale_Float = 2010,
216+
TrackedDeviceProperty_Prop_VendorID_Int32 = 2011,
217+
TrackedDeviceProperty_Prop_DisplayMCImageLeft_String = 2012,
218+
TrackedDeviceProperty_Prop_DisplayMCImageRight_String = 2013,
219+
TrackedDeviceProperty_Prop_DisplayGCBlackClamp_Float = 2014,
208220
TrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000,
209221
TrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001,
210222
TrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002,
@@ -245,13 +257,15 @@ typedef enum VRSubmitFlags_t
245257
VRSubmitFlags_t_Submit_Default = 0,
246258
VRSubmitFlags_t_Submit_LensDistortionAlreadyApplied = 1,
247259
};
248-
typedef enum VRStatusState_t
249-
{
250-
VRStatusState_t_State_OK = 0,
251-
VRStatusState_t_State_Error = 1,
252-
VRStatusState_t_State_Warning = 2,
253-
VRStatusState_t_State_Undefined = 3,
254-
VRStatusState_t_State_NotSet = 4,
260+
typedef enum VRState_t
261+
{
262+
VRState_t_VRState_Undefined = -1,
263+
VRState_t_VRState_Off = 0,
264+
VRState_t_VRState_Searching = 1,
265+
VRState_t_VRState_Searching_Alert = 2,
266+
VRState_t_VRState_Ready = 3,
267+
VRState_t_VRState_Ready_Alert = 4,
268+
VRState_t_VRState_NotReady = 5,
255269
};
256270
typedef enum EVREventType
257271
{
@@ -275,6 +289,7 @@ typedef enum EVREventType
275289
EVREventType_VREvent_SceneFocusLost = 402,
276290
EVREventType_VREvent_SceneFocusGained = 403,
277291
EVREventType_VREvent_SceneApplicationChanged = 404,
292+
EVREventType_VREvent_SceneFocusChanged = 405,
278293
EVREventType_VREvent_OverlayShown = 500,
279294
EVREventType_VREvent_OverlayHidden = 501,
280295
EVREventType_VREvent_DashboardActivated = 502,
@@ -284,6 +299,7 @@ typedef enum EVREventType
284299
EVREventType_VREvent_ResetDashboard = 506,
285300
EVREventType_VREvent_RenderToast = 507,
286301
EVREventType_VREvent_ImageLoaded = 508,
302+
EVREventType_VREvent_ShowKeyboard = 509,
287303
EVREventType_VREvent_Notification_Show = 600,
288304
EVREventType_VREvent_Notification_Dismissed = 601,
289305
EVREventType_VREvent_Notification_BeginInteraction = 602,
@@ -296,6 +312,11 @@ typedef enum EVREventType
296312
EVREventType_VREvent_MCImageUpdated = 1000,
297313
EVREventType_VREvent_FirmwareUpdateStarted = 1100,
298314
EVREventType_VREvent_FirmwareUpdateFinished = 1101,
315+
EVREventType_VREvent_KeyboardClosed = 1200,
316+
EVREventType_VREvent_KeyboardCharInput = 1201,
317+
EVREventType_VREvent_ApplicationTransitionStarted = 1300,
318+
EVREventType_VREvent_ApplicationTransitionAborted = 1301,
319+
EVREventType_VREvent_ApplicationTransitionNewAppStarted = 1302,
299320
};
300321
typedef enum EDeviceActivityLevel
301322
{
@@ -309,13 +330,19 @@ typedef enum EVRButtonId
309330
EVRButtonId_k_EButton_System = 0,
310331
EVRButtonId_k_EButton_ApplicationMenu = 1,
311332
EVRButtonId_k_EButton_Grip = 2,
333+
EVRButtonId_k_EButton_DPad_Left = 3,
334+
EVRButtonId_k_EButton_DPad_Up = 4,
335+
EVRButtonId_k_EButton_DPad_Right = 5,
336+
EVRButtonId_k_EButton_DPad_Down = 6,
337+
EVRButtonId_k_EButton_A = 7,
312338
EVRButtonId_k_EButton_Axis0 = 32,
313339
EVRButtonId_k_EButton_Axis1 = 33,
314340
EVRButtonId_k_EButton_Axis2 = 34,
315341
EVRButtonId_k_EButton_Axis3 = 35,
316342
EVRButtonId_k_EButton_Axis4 = 36,
317343
EVRButtonId_k_EButton_SteamVR_Touchpad = 32,
318344
EVRButtonId_k_EButton_SteamVR_Trigger = 33,
345+
EVRButtonId_k_EButton_Dashboard_Back = 2,
319346
EVRButtonId_k_EButton_Max = 64,
320347
};
321348
typedef enum EVRMouseButton
@@ -355,6 +382,7 @@ typedef enum VROverlayError
355382
VROverlayError_RequestFailed = 23,
356383
VROverlayError_InvalidTexture = 24,
357384
VROverlayError_UnableToLoadFile = 25,
385+
VROverlayError_VROVerlayError_KeyboardAlreadyInUse = 26,
358386
};
359387
typedef enum EVRApplicationType
360388
{
@@ -391,6 +419,7 @@ typedef enum HmdError
391419
HmdError_Init_InitCanceledByUser = 116,
392420
HmdError_Init_AnotherAppLaunching = 117,
393421
HmdError_Init_SettingsInitFailed = 118,
422+
HmdError_Init_ShuttingDown = 119,
394423
HmdError_Driver_Failed = 200,
395424
HmdError_Driver_Unknown = 201,
396425
HmdError_Driver_HmdUnknown = 202,
@@ -413,6 +442,11 @@ typedef enum HmdError
413442
HmdError_VendorSpecific_HmdFound_ConfigTooSmall = 1105,
414443
HmdError_VendorSpecific_HmdFound_UnableToInitZLib = 1106,
415444
HmdError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107,
445+
HmdError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108,
446+
HmdError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109,
447+
HmdError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110,
448+
HmdError_VendorSpecific_HmdFound_UserDataAddressRange = 1111,
449+
HmdError_VendorSpecific_HmdFound_UserDataError = 1112,
416450
HmdError_Steam_SteamInstallationNotFound = 2000,
417451
};
418452
typedef enum EVRApplicationError
@@ -428,6 +462,9 @@ typedef enum EVRApplicationError
428462
EVRApplicationError_VRApplicationError_InvalidManifest = 107,
429463
EVRApplicationError_VRApplicationError_InvalidApplication = 108,
430464
EVRApplicationError_VRApplicationError_LaunchFailed = 109,
465+
EVRApplicationError_VRApplicationError_ApplicationAlreadyStarting = 110,
466+
EVRApplicationError_VRApplicationError_LaunchInProgress = 111,
467+
EVRApplicationError_VRApplicationError_OldApplicationQuitting = 112,
431468
EVRApplicationError_VRApplicationError_BufferTooSmall = 200,
432469
EVRApplicationError_VRApplicationError_PropertyNotSet = 201,
433470
EVRApplicationError_VRApplicationError_UnknownProperty = 202,
@@ -446,6 +483,12 @@ typedef enum EVRApplicationProperty
446483
EVRApplicationProperty_VRApplicationProperty_Source_String = 53,
447484
EVRApplicationProperty_VRApplicationProperty_IsDashboardOverlay_Bool = 60,
448485
};
486+
typedef enum EVRApplicationTransitionState
487+
{
488+
EVRApplicationTransitionState_VRApplicationTransition_None = 0,
489+
EVRApplicationTransitionState_VRApplicationTransition_OldAppQuitSent = 10,
490+
EVRApplicationTransitionState_VRApplicationTransition_NewAppLaunched = 20,
491+
};
449492
typedef enum ChaperoneCalibrationState
450493
{
451494
ChaperoneCalibrationState_OK = 1,
@@ -485,6 +528,16 @@ typedef enum VROverlayFlags
485528
VROverlayFlags_RGSS4X = 2,
486529
VROverlayFlags_NoDashboardTab = 3,
487530
};
531+
typedef enum EGamepadTextInputMode
532+
{
533+
EGamepadTextInputMode_k_EGamepadTextInputModeNormal = 0,
534+
EGamepadTextInputMode_k_EGamepadTextInputModePassword = 1,
535+
};
536+
typedef enum EGamepadTextInputLineMode
537+
{
538+
EGamepadTextInputLineMode_k_EGamepadTextInputLineModeSingleLine = 0,
539+
EGamepadTextInputLineMode_k_EGamepadTextInputLineModeMultipleLines = 1,
540+
};
488541
typedef enum NotificationError_t
489542
{
490543
NotificationError_t_k_ENotificationError_OK = 0,
@@ -740,6 +793,8 @@ S_API void VR_IVRSystem_ReleaseInputFocus(intptr_t instancePtr);
740793
S_API bool VR_IVRSystem_IsInputFocusCapturedByAnotherProcess(intptr_t instancePtr);
741794
S_API uint32_t VR_IVRSystem_DriverDebugRequest(intptr_t instancePtr, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize);
742795
S_API VRFirmwareError VR_IVRSystem_PerformFirmwareUpdate(intptr_t instancePtr, TrackedDeviceIndex_t unDeviceIndex);
796+
S_API bool VR_IVRSystem_IsDisplayOnDesktop(intptr_t instancePtr);
797+
S_API bool VR_IVRSystem_SetDisplayVisibility(intptr_t instancePtr, bool bIsVisibleOnDesktop);
743798
S_API EVRApplicationError VR_IVRApplications_AddApplicationManifest(intptr_t instancePtr, const char * pchApplicationManifestFullPath, bool bTemporary);
744799
S_API EVRApplicationError VR_IVRApplications_RemoveApplicationManifest(intptr_t instancePtr, const char * pchApplicationManifestFullPath);
745800
S_API bool VR_IVRApplications_IsApplicationInstalled(intptr_t instancePtr, const char * pchAppKey);
@@ -757,6 +812,10 @@ S_API EVRApplicationError VR_IVRApplications_GetHomeApplication(intptr_t instanc
757812
S_API EVRApplicationError VR_IVRApplications_SetHomeApplication(intptr_t instancePtr, const char * pchAppKey);
758813
S_API EVRApplicationError VR_IVRApplications_SetApplicationAutoLaunch(intptr_t instancePtr, const char * pchAppKey, bool bAutoLaunch);
759814
S_API bool VR_IVRApplications_GetApplicationAutoLaunch(intptr_t instancePtr, const char * pchAppKey);
815+
S_API EVRApplicationError VR_IVRApplications_GetStartingApplication(intptr_t instancePtr, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
816+
S_API EVRApplicationTransitionState VR_IVRApplications_GetTransitionState(intptr_t instancePtr);
817+
S_API EVRApplicationError VR_IVRApplications_PerformApplicationPrelaunchCheck(intptr_t instancePtr, const char * pchAppKey);
818+
S_API char * VR_IVRApplications_GetApplicationsTransitionStateNameFromEnum(intptr_t instancePtr, EVRApplicationTransitionState state);
760819
S_API ChaperoneCalibrationState VR_IVRChaperone_GetCalibrationState(intptr_t instancePtr);
761820
S_API bool VR_IVRChaperone_GetSoftBoundsInfo(intptr_t instancePtr, struct ChaperoneSoftBoundsInfo_t * pInfo);
762821
S_API bool VR_IVRChaperone_GetHardBoundsInfo(intptr_t instancePtr, struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount);
@@ -787,6 +846,11 @@ S_API void VR_IVRCompositor_SetTrackingSpace(intptr_t instancePtr, TrackingUnive
787846
S_API TrackingUniverseOrigin VR_IVRCompositor_GetTrackingSpace(intptr_t instancePtr);
788847
S_API uint32_t VR_IVRCompositor_GetCurrentSceneFocusProcess(intptr_t instancePtr);
789848
S_API bool VR_IVRCompositor_CanRenderScene(intptr_t instancePtr);
849+
S_API void VR_IVRCompositor_ShowMirrorWindow(intptr_t instancePtr);
850+
S_API void VR_IVRCompositor_HideMirrorWindow(intptr_t instancePtr);
851+
S_API void VR_IVRCompositor_CompositorDumpImages(intptr_t instancePtr);
852+
S_API float VR_IVRCompositor_GetFrameTimeRemaining(intptr_t instancePtr);
853+
S_API uint32_t VR_IVRCompositor_GetLastFrameRenderer(intptr_t instancePtr);
790854
S_API VROverlayError VR_IVROverlay_FindOverlay(intptr_t instancePtr, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle);
791855
S_API VROverlayError VR_IVROverlay_CreateOverlay(intptr_t instancePtr, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle);
792856
S_API VROverlayError VR_IVROverlay_DestroyOverlay(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle);
@@ -836,6 +900,9 @@ S_API bool VR_IVROverlay_IsActiveDashboardOverlay(intptr_t instancePtr, VROverla
836900
S_API VROverlayError VR_IVROverlay_SetDashboardOverlaySceneProcess(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId);
837901
S_API VROverlayError VR_IVROverlay_GetDashboardOverlaySceneProcess(intptr_t instancePtr, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId);
838902
S_API void VR_IVROverlay_ShowDashboard(intptr_t instancePtr, const char * pchOverlayToShow);
903+
S_API VROverlayError VR_IVROverlay_ShowKeyboard(intptr_t instancePtr, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode);
904+
S_API uint32_t VR_IVROverlay_GetKeyboardText(intptr_t instancePtr, char * pchText, uint32_t cchText);
905+
S_API void VR_IVROverlay_HideKeyboard(intptr_t instancePtr);
839906
S_API bool VR_IVRRenderModels_LoadRenderModel(intptr_t instancePtr, const char * pchRenderModelName, struct RenderModel_t * pRenderModel);
840907
S_API void VR_IVRRenderModels_FreeRenderModel(intptr_t instancePtr, struct RenderModel_t * pRenderModel);
841908
S_API uint32_t VR_IVRRenderModels_GetRenderModelName(intptr_t instancePtr, uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen);

0 commit comments

Comments
 (0)