Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/openvr.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Ludwig <joe@valvesoftware.com>2016-07-06 02:53:53 +0300
committerJoe Ludwig <joe@valvesoftware.com>2016-07-06 02:53:53 +0300
commitb20b25705d8dd82be221fe68a61db36ae7e2608e (patch)
treebaf91ff7bd62207e521c730089a37ec874e81124 /headers
parente1507a27547d22a680153862865d40b90fad8c75 (diff)
OpenVR SDK 1.0.2:v1.0.2
General: * Split several VR_Init error return values out into unique causes. * Added Prop_ControllerRoleHint_Int32, which a controller driver can optionally use to return the best matching ETrackedControllerRole type for the controller. Use this to specify a controller that is physically shaped for one hand only or when the driver is able to determine which hand is holding the controller through sensors or other means. * Added VREvent_OverlayFocusChanged, which is sent when an overlay was under the laser mouse and isn’t anymore or when there was no overlay under the laser mouse and now there is. IVRApplications: * Added LaunchApplicationFromMimeType. This allows the caller (usually Steam) to start the application that is associated with that mime type if it is not already running. If the application is not running it will be started with the specified arguments appended to existing arguments for the app. If the application is already running it will receive VREvent_ApplicationMimeTypeLoad and can retrieve the arguments by passing event.applicationLaunch.unArgsHandle to IVRApplications:: GetApplicationLaunchArguments. * Added other support functions for mime types. IVRCompositor: * Split out Compositor_FrameTiming's m_flSceneRenderGpuMs into m_flPreSubmitGpuMs and m_flPostSubmitGpuMs. Post-Submit time was not previously being recorded. IVROverlay: * Added VROverlayFlags_SortWithNonSceneOverlays. This allows the scene application's overlays to sort with other non-scene overlays. * Added SetOverlayTexelAspect/GetOverlayTexelAspect. This allows an overlay to control the aspect ratio of its texels. By default all overlay texels are square (i.e. 1.0) * Added SetOverlaySortOrder/GetOverlaySortOrder. This allows an overlay to be force to be sorted above or below other overlays. It is most useful for overlays from the scene application that want to explicitly control their draw order. IVRTrackedCamera: * Added accessors to work with tracked camera gpu resources: ** GetVideoStreamTextureSize ** GetVideoStreamTextureD3D11 ** GetVideoStreamTextureGL ** ReleaseVideoStreamTextureGL IVRResources: * New interface to allow access to resource files in the runtime or user-installed drivers. IVRCameraComponent: * Simplified interface by removing duplicate functions already provided by properties and deprecating the arbitrary distortion methods. IClientDriverHost: * Added WatchdogWakeUp. When a client driver is in Watchdog mode it should call this if a hardware event happens that should cause the system to wake up. The Lighthouse driver, for instance, calls this method when a system button is pressed or a controller is turned on. IClientTrackedDeviceProvider: * Added eDriverMode argument to Init. When this is passed as ClientDriverMode_Watchdog the driver should enter a low-power state where hardware is being monitored. If the driver does not support watchdog mode it should return VRInitError_Init_LowPowerWatchdogNotSupported. [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 3525698]
Diffstat (limited to 'headers')
-rw-r--r--headers/openvr.h171
-rw-r--r--headers/openvr_api.cs278
-rw-r--r--headers/openvr_api.json239
-rw-r--r--headers/openvr_capi.h80
-rw-r--r--headers/openvr_driver.h98
5 files changed, 757 insertions, 109 deletions
diff --git a/headers/openvr.h b/headers/openvr.h
index df727a3..deb3142 100644
--- a/headers/openvr.h
+++ b/headers/openvr.h
@@ -277,6 +277,7 @@ enum ETrackedDeviceProperty
Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType
Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType
Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType
+ Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole
// Properties that are unique to TrackedDeviceClass_TrackingReference
Prop_FieldOfViewLeftDegrees_Float = 4000,
@@ -346,6 +347,7 @@ enum EVRState
VRState_Ready_Alert = 4,
VRState_NotReady = 5,
VRState_Standby = 6,
+ VRState_Ready_Alert_Low = 7,
};
/** The types of events that could be posted (and what the parameters mean for each event type) */
@@ -362,6 +364,7 @@ enum EVREventType
VREvent_EnterStandbyMode = 106,
VREvent_LeaveStandbyMode = 107,
VREvent_TrackedDeviceRoleChanged = 108,
+ VREvent_WatchdogWakeUpRequested = 109,
VREvent_ButtonPress = 200, // data is controller
VREvent_ButtonUnpress = 201, // data is controller
@@ -375,6 +378,7 @@ enum EVREventType
VREvent_FocusLeave = 304, // data is overlay
VREvent_Scroll = 305, // data is mouse
VREvent_TouchPadMove = 306, // data is mouse
+ VREvent_OverlayFocusChanged = 307, // data is overlay, global event
VREvent_InputFocusCaptured = 400, // data is process DEPRECATED
VREvent_InputFocusReleased = 401, // data is process DEPRECATED
@@ -412,6 +416,7 @@ enum EVREventType
VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken
VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken
VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted
+ VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted
VREvent_Notification_Shown = 600,
VREvent_Notification_Hidden = 601,
@@ -453,6 +458,7 @@ enum EVREventType
VREvent_ApplicationTransitionAborted = 1301,
VREvent_ApplicationTransitionNewAppStarted = 1302,
VREvent_ApplicationListUpdated = 1303,
+ VREvent_ApplicationMimeTypeLoad = 1304,
VREvent_Compositor_MirrorWindowShown = 1400,
VREvent_Compositor_MirrorWindowHidden = 1401,
@@ -634,6 +640,17 @@ struct VREvent_Screenshot_t
uint32_t type;
};
+struct VREvent_ScreenshotProgress_t
+{
+ float progress;
+};
+
+struct VREvent_ApplicationLaunch_t
+{
+ uint32_t pid;
+ uint32_t unArgsHandle;
+};
+
/** If you change this you must manually update openvr_interop.cs.py */
typedef union
{
@@ -652,6 +669,8 @@ typedef union
VREvent_TouchPadMove_t touchPadMove;
VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
VREvent_Screenshot_t screenshot;
+ VREvent_ScreenshotProgress_t screenshotProgress;
+ VREvent_ApplicationLaunch_t applicationLaunch;
} VREvent_Data_t;
/** An event posted by the server to all running applications */
@@ -795,6 +814,9 @@ enum EVRApplicationType
VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility
// interfaces (like IVRSettings and IVRApplications) but not hardware.
VRApplication_VRMonitor = 5, // Reserved for vrmonitor
+ VRApplication_SteamWatchdog = 6,// Reserved for Steam
+
+ VRApplication_Max
};
@@ -851,6 +873,14 @@ enum EVRInitError
VRInitError_Init_NotSupportedWithCompositor = 122,
VRInitError_Init_NotAvailableToUtilityApps = 123,
VRInitError_Init_Internal = 124,
+ VRInitError_Init_HmdDriverIdIsNone = 125,
+ VRInitError_Init_HmdNotFoundPresenceFailed = 126,
+ VRInitError_Init_VRMonitorNotFound = 127,
+ VRInitError_Init_VRMonitorStartupFailed = 128,
+ VRInitError_Init_LowPowerWatchdogNotSupported = 129,
+ VRInitError_Init_InvalidApplicationType = 130,
+ VRInitError_Init_NotAvailableToWatchdogApps = 131,
+ VRInitError_Init_WatchdogDisabledInSettings = 132,
VRInitError_Driver_Failed = 200,
VRInitError_Driver_Unknown = 201,
@@ -861,13 +891,20 @@ enum EVRInitError
VRInitError_Driver_NotCalibrated = 206,
VRInitError_Driver_CalibrationInvalid = 207,
VRInitError_Driver_HmdDisplayNotFound = 208,
-
+ VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209,
+ // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons
+ VRInitError_Driver_HmdDriverIdOutOfBounds = 211,
+ VRInitError_Driver_HmdDisplayMirrored = 212,
+
VRInitError_IPC_ServerInitFailed = 300,
VRInitError_IPC_ConnectFailed = 301,
VRInitError_IPC_SharedStateInitFailed = 302,
VRInitError_IPC_CompositorInitFailed = 303,
VRInitError_IPC_MutexInitFailed = 304,
VRInitError_IPC_Failed = 305,
+ VRInitError_IPC_CompositorConnectFailed = 306,
+ VRInitError_IPC_CompositorInvalidConnectResponse = 307,
+ VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308,
VRInitError_Compositor_Failed = 400,
VRInitError_Compositor_D3D11HardwareRequired = 401,
@@ -971,7 +1008,7 @@ static const uint32_t k_unScreenshotHandleInvalid = 0;
#define VR_INTERFACE extern "C" __declspec( dllimport )
#endif
-#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__)
+#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__)
#ifdef VR_API_EXPORT
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
@@ -1398,6 +1435,9 @@ namespace vr
*/
virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0;
+ /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */
+ virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0;
+
/** Launches the dashboard overlay application if it is not already running. This call is only valid for
* dashboard overlay applications. */
virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0;
@@ -1434,6 +1474,21 @@ namespace vr
/** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */
virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0;
+ /** Adds this mime-type to the list of supported mime types for this application*/
+ virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0;
+
+ /** return the app key that will open this mime type */
+ virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0;
+
+ /** Get the list of supported mime types for this application, comma-delimited */
+ virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0;
+
+ /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */
+ virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0;
+
+ /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */
+ virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) = 0;
+
// --------------- Transition methods --------------- //
/** Returns the app key for the application that is starting up */
@@ -1467,7 +1522,7 @@ namespace vr
virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0;
};
- static const char * const IVRApplications_Version = "IVRApplications_005";
+ static const char * const IVRApplications_Version = "IVRApplications_006";
} // namespace vr
@@ -1499,7 +1554,7 @@ namespace vr
virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0;
- virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
+ virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0;
virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0;
@@ -1548,6 +1603,10 @@ namespace vr
static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
+ static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
+ static const char * const k_pch_SteamVR_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
+ static const char * const k_pch_SteamVR_UseGenericGraphcisDevice_Bool = "useGenericGraphicsDevice";
+
//-----------------------------------------------------------------------------
// lighthouse keys
@@ -1583,7 +1642,8 @@ namespace vr
// user interface keys
static const char * const k_pch_UserInterface_Section = "userinterface";
static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
- static const char * const k_pch_UserInterface_EnableScreenshots_Bool = "EnableScreenshots";
+ static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots";
+ static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
//-----------------------------------------------------------------------------
// notification keys
@@ -1862,6 +1922,7 @@ struct 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
+ uint32_t m_nReprojectionFlags;
/** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */
double m_flSystemTimeInSeconds;
@@ -1870,7 +1931,8 @@ struct Compositor_FrameTiming
* 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_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit)
+ float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window)
float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work
float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc.
float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame
@@ -1891,9 +1953,6 @@ struct Compositor_FrameTiming
float m_flCompositorRenderStartMs;
vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame
- int32_t m_nFidelityLevel; // app reported value
-
- uint32_t m_nReprojectionFlags;
};
/** Cumulative stats for current application. These are not cleared until a new app connects,
@@ -1903,7 +1962,7 @@ struct Compositor_CumulativeStats
uint32_t m_nPid; // Process id associated with these stats (may no longer be running).
uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames)
uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection)
- uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time with reprojection
+ uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection)
/** Values recorded at startup before application has fully faded in the first time. */
uint32_t m_nNumFramePresentsOnStartup;
@@ -2045,14 +2104,6 @@ public:
/** Temporarily suspends rendering (useful for finer control over scene transitions). */
virtual void SuspendRendering( bool bSuspend ) = 0;
- /** Screenshot support */
-
- /** These functions are no longer used and will be removed in
- * a future update. Use the functions via the
- * IVRScreenshots interface */
- virtual vr::EVRCompositorError RequestScreenshot( vr::EVRScreenshotType type, const char *pchDestinationFileName, const char *pchVRDestinationFileName ) = 0;
- virtual vr::EVRScreenshotType GetCurrentScreenshotType() = 0;
-
/** Opens a shared D3D11 texture with the undistorted composited image for each eye. */
virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0;
@@ -2063,7 +2114,7 @@ public:
virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
};
-static const char * const IVRCompositor_Version = "IVRCompositor_015";
+static const char * const IVRCompositor_Version = "IVRCompositor_016";
} // namespace vr
@@ -2178,7 +2229,7 @@ namespace vr
static const uint32_t k_unVROverlayMaxNameLength = 128;
/** The maximum number of overlays that can exist in the system at one time. */
- static const uint32_t k_unMaxOverlayCount = 32;
+ static const uint32_t k_unMaxOverlayCount = 64;
/** Types of input supported by VR Overlays */
enum VROverlayInputMethod
@@ -2232,6 +2283,10 @@ namespace vr
VROverlayFlags_Panorama = 12, // Texture is a panorama
VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama
+
+ // If this is set on an overlay owned by the scene application that overlay
+ // will be sorted with the "Other" overlays on top of all other scene overlays
+ VROverlayFlags_SortWithNonSceneOverlays = 14,
};
struct VROverlayIntersectionParams_t
@@ -2350,6 +2405,26 @@ namespace vr
/** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */
virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0;
+ /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels
+ * are twice as wide as they are tall. Defaults to 1.0. */
+ virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0;
+
+ /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */
+ virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0;
+
+ /** Sets the rendering sort order for the overlay. Overlays are rendered this order:
+ * Overlays owned by the scene application
+ * Overlays owned by some other application
+ *
+ * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same
+ * sort order are rendered back to front base on distance from the HMD.
+ *
+ * Sort order defaults to 0. */
+ virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0;
+
+ /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */
+ virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0;
+
/** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */
virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0;
@@ -2553,7 +2628,7 @@ namespace vr
};
- static const char * const IVROverlay_Version = "IVROverlay_012";
+ static const char * const IVROverlay_Version = "IVROverlay_013";
} // namespace vr
@@ -2758,7 +2833,7 @@ namespace vr
{
/** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use
- * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */
+ * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */
class IVRExtendedDisplay
{
public:
@@ -2815,6 +2890,16 @@ public:
* If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable.
* Ideally a caller should be polling at ~16ms intervals */
virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0;
+
+ /** Gets size of the image frame. */
+ virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
+
+ /** Access a shared D3D11 texture for the specified tracked camera stream */
+ virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0;
+
+ /** Access a shared GL texture for the specified tracked camera stream */
+ virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0;
+ virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0;
};
static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003";
@@ -2929,7 +3014,33 @@ static const char * const IVRScreenshots_Version = "IVRScreenshots_001";
} // namespace vr
-// End
+
+// ivrresources.h
+namespace vr
+{
+
+class IVRResources
+{
+public:
+
+ // ------------------------------------
+ // Shared Resource Methods
+ // ------------------------------------
+
+ /** Loads the specified resource into the provided buffer if large enough.
+ * Returns the size in bytes of the buffer required to hold the specified resource. */
+ virtual uint32_t LoadSharedResource( const char *pchResourceName, char *pchBuffer, uint32_t unBufferLen ) = 0;
+
+ /** Provides the full path to the specified resource. Resource names can include named directories for
+ * drivers and other things, and this resolves all of those and returns the actual physical path.
+ * pchResourceTypeDirectory is the subdirectory of resources to look in. */
+ virtual uint32_t GetResourceFullPath( const char *pchResourceName, const char *pchResourceTypeDirectory, char *pchPathBuffer, uint32_t unBufferLen ) = 0;
+};
+
+static const char * const IVRResources_Version = "IVRResources_001";
+
+
+}// End
#endif // _OPENVR_API
@@ -3074,6 +3185,17 @@ namespace vr
return m_pVROverlay;
}
+ IVRResources *VRResources()
+ {
+ CheckClear();
+ if ( m_pVRResources == nullptr )
+ {
+ EVRInitError eError;
+ m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError );
+ }
+ return m_pVRResources;
+ }
+
IVRScreenshots *VRScreenshots()
{
CheckClear();
@@ -3146,6 +3268,7 @@ namespace vr
IVRChaperoneSetup *m_pVRChaperoneSetup;
IVRCompositor *m_pVRCompositor;
IVROverlay *m_pVROverlay;
+ IVRResources *m_pVRResources;
IVRRenderModels *m_pVRRenderModels;
IVRExtendedDisplay *m_pVRExtendedDisplay;
IVRSettings *m_pVRSettings;
@@ -3169,6 +3292,7 @@ namespace vr
inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); }
inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); }
inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); }
+ inline IVRResources *VR_CALLTYPE VRResources() { return OpenVRInternal_ModuleContext().VRResources(); }
inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); }
inline IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera() { return OpenVRInternal_ModuleContext().VRTrackedCamera(); }
@@ -3184,6 +3308,7 @@ namespace vr
m_pVRSettings = nullptr;
m_pVRApplications = nullptr;
m_pVRTrackedCamera = nullptr;
+ m_pVRResources = nullptr;
m_pVRScreenshots = nullptr;
}
diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs
index a4d71f8..9b04cc3 100644
--- a/headers/openvr_api.cs
+++ b/headers/openvr_api.cs
@@ -300,6 +300,26 @@ public struct IVRTrackedCamera
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetVideoStreamFrameBuffer GetVideoStreamFrameBuffer;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRTrackedCameraError _GetVideoStreamTextureSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref VRTextureBounds_t pTextureBounds, ref uint pnWidth, ref uint pnHeight);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetVideoStreamTextureSize GetVideoStreamTextureSize;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRTrackedCameraError _GetVideoStreamTextureD3D11(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetVideoStreamTextureD3D11 GetVideoStreamTextureD3D11;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRTrackedCameraError _GetVideoStreamTextureGL(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, ref uint pglTextureId, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetVideoStreamTextureGL GetVideoStreamTextureGL;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRTrackedCameraError _ReleaseVideoStreamTextureGL(ulong hTrackedCamera, uint glTextureId);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _ReleaseVideoStreamTextureGL ReleaseVideoStreamTextureGL;
+
}
[StructLayout(LayoutKind.Sequential)]
@@ -346,6 +366,11 @@ public struct IVRApplications
internal _LaunchTemplateApplication LaunchTemplateApplication;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRApplicationError _LaunchApplicationFromMimeType(string pchMimeType, string pchArgs);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _LaunchApplicationFromMimeType LaunchApplicationFromMimeType;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _LaunchDashboardOverlay(string pchAppKey);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _LaunchDashboardOverlay LaunchDashboardOverlay;
@@ -396,6 +421,31 @@ public struct IVRApplications
internal _GetApplicationAutoLaunch GetApplicationAutoLaunch;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRApplicationError _SetDefaultApplicationForMimeType(string pchAppKey, string pchMimeType);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetDefaultApplicationForMimeType SetDefaultApplicationForMimeType;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate bool _GetDefaultApplicationForMimeType(string pchMimeType, string pchAppKeyBuffer, uint unAppKeyBufferLen);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetDefaultApplicationForMimeType GetDefaultApplicationForMimeType;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate bool _GetApplicationSupportedMimeTypes(string pchAppKey, string pchMimeTypesBuffer, uint unMimeTypesBuffer);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetApplicationSupportedMimeTypes GetApplicationSupportedMimeTypes;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate uint _GetApplicationsThatSupportMimeType(string pchMimeType, string pchAppKeysThatSupportBuffer, uint unAppKeysThatSupportBuffer);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetApplicationsThatSupportMimeType GetApplicationsThatSupportMimeType;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate uint _GetApplicationLaunchArguments(uint unHandle, string pchArgs, uint unArgs);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetApplicationLaunchArguments GetApplicationLaunchArguments;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _GetStartingApplication(string pchAppKeyBuffer, uint unAppKeyBufferLen);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetStartingApplication GetStartingApplication;
@@ -731,16 +781,6 @@ public struct IVRCompositor
internal _SuspendRendering SuspendRendering;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVRCompositorError _RequestScreenshot(EVRScreenshotType type, string pchDestinationFileName, string pchVRDestinationFileName);
- [MarshalAs(UnmanagedType.FunctionPtr)]
- internal _RequestScreenshot RequestScreenshot;
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVRScreenshotType _GetCurrentScreenshotType();
- [MarshalAs(UnmanagedType.FunctionPtr)]
- internal _GetCurrentScreenshotType GetCurrentScreenshotType;
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _GetMirrorTextureD3D11(EVREye eEye, IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetMirrorTextureD3D11 GetMirrorTextureD3D11;
@@ -856,6 +896,26 @@ public struct IVROverlay
internal _GetOverlayAlpha GetOverlayAlpha;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _SetOverlayTexelAspect(ulong ulOverlayHandle, float fTexelAspect);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetOverlayTexelAspect SetOverlayTexelAspect;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _GetOverlayTexelAspect(ulong ulOverlayHandle, ref float pfTexelAspect);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetOverlayTexelAspect GetOverlayTexelAspect;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _SetOverlaySortOrder(ulong ulOverlayHandle, uint unSortOrder);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetOverlaySortOrder SetOverlaySortOrder;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _GetOverlaySortOrder(ulong ulOverlayHandle, ref uint punSortOrder);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetOverlaySortOrder GetOverlaySortOrder;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayWidthInMeters(ulong ulOverlayHandle, float fWidthInMeters);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayWidthInMeters SetOverlayWidthInMeters;
@@ -1266,7 +1326,7 @@ public struct IVRSettings
internal _SetFloat SetFloat;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate void _GetString(string pchSection, string pchSettingsKey, string pchValue, uint unValueLen, string pchDefaultValue, ref EVRSettingsError peError);
+ internal delegate void _GetString(string pchSection, string pchSettingsKey, System.Text.StringBuilder pchValue, uint unValueLen, string pchDefaultValue, ref EVRSettingsError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetString GetString;
@@ -1327,6 +1387,21 @@ public struct IVRScreenshots
}
+[StructLayout(LayoutKind.Sequential)]
+public struct IVRResources
+{
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate uint _LoadSharedResource(string pchResourceName, string pchBuffer, uint unBufferLen);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _LoadSharedResource LoadSharedResource;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate uint _GetResourceFullPath(string pchResourceName, string pchResourceTypeDirectory, string pchPathBuffer, uint unBufferLen);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetResourceFullPath GetResourceFullPath;
+
+}
+
public class CVRSystem
{
@@ -1641,6 +1716,29 @@ public class CVRTrackedCamera
EVRTrackedCameraError result = FnTable.GetVideoStreamFrameBuffer(hTrackedCamera,eFrameType,pFrameBuffer,nFrameBufferSize,ref pFrameHeader,nFrameHeaderSize);
return result;
}
+ public EVRTrackedCameraError GetVideoStreamTextureSize(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref VRTextureBounds_t pTextureBounds,ref uint pnWidth,ref uint pnHeight)
+ {
+ pnWidth = 0;
+ pnHeight = 0;
+ EVRTrackedCameraError result = FnTable.GetVideoStreamTextureSize(nDeviceIndex,eFrameType,ref pTextureBounds,ref pnWidth,ref pnHeight);
+ return result;
+ }
+ public EVRTrackedCameraError GetVideoStreamTextureD3D11(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,IntPtr pD3D11DeviceOrResource,ref IntPtr ppD3D11ShaderResourceView,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize)
+ {
+ EVRTrackedCameraError result = FnTable.GetVideoStreamTextureD3D11(hTrackedCamera,eFrameType,pD3D11DeviceOrResource,ref ppD3D11ShaderResourceView,ref pFrameHeader,nFrameHeaderSize);
+ return result;
+ }
+ public EVRTrackedCameraError GetVideoStreamTextureGL(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,ref uint pglTextureId,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize)
+ {
+ pglTextureId = 0;
+ EVRTrackedCameraError result = FnTable.GetVideoStreamTextureGL(hTrackedCamera,eFrameType,ref pglTextureId,ref pFrameHeader,nFrameHeaderSize);
+ return result;
+ }
+ public EVRTrackedCameraError ReleaseVideoStreamTextureGL(ulong hTrackedCamera,uint glTextureId)
+ {
+ EVRTrackedCameraError result = FnTable.ReleaseVideoStreamTextureGL(hTrackedCamera,glTextureId);
+ return result;
+ }
}
@@ -1691,6 +1789,11 @@ public class CVRApplications
EVRApplicationError result = FnTable.LaunchTemplateApplication(pchTemplateAppKey,pchNewAppKey,pKeys,(uint) pKeys.Length);
return result;
}
+ public EVRApplicationError LaunchApplicationFromMimeType(string pchMimeType,string pchArgs)
+ {
+ EVRApplicationError result = FnTable.LaunchApplicationFromMimeType(pchMimeType,pchArgs);
+ return result;
+ }
public EVRApplicationError LaunchDashboardOverlay(string pchAppKey)
{
EVRApplicationError result = FnTable.LaunchDashboardOverlay(pchAppKey);
@@ -1741,6 +1844,31 @@ public class CVRApplications
bool result = FnTable.GetApplicationAutoLaunch(pchAppKey);
return result;
}
+ public EVRApplicationError SetDefaultApplicationForMimeType(string pchAppKey,string pchMimeType)
+ {
+ EVRApplicationError result = FnTable.SetDefaultApplicationForMimeType(pchAppKey,pchMimeType);
+ return result;
+ }
+ public bool GetDefaultApplicationForMimeType(string pchMimeType,string pchAppKeyBuffer,uint unAppKeyBufferLen)
+ {
+ bool result = FnTable.GetDefaultApplicationForMimeType(pchMimeType,pchAppKeyBuffer,unAppKeyBufferLen);
+ return result;
+ }
+ public bool GetApplicationSupportedMimeTypes(string pchAppKey,string pchMimeTypesBuffer,uint unMimeTypesBuffer)
+ {
+ bool result = FnTable.GetApplicationSupportedMimeTypes(pchAppKey,pchMimeTypesBuffer,unMimeTypesBuffer);
+ return result;
+ }
+ public uint GetApplicationsThatSupportMimeType(string pchMimeType,string pchAppKeysThatSupportBuffer,uint unAppKeysThatSupportBuffer)
+ {
+ uint result = FnTable.GetApplicationsThatSupportMimeType(pchMimeType,pchAppKeysThatSupportBuffer,unAppKeysThatSupportBuffer);
+ return result;
+ }
+ public uint GetApplicationLaunchArguments(uint unHandle,string pchArgs,uint unArgs)
+ {
+ uint result = FnTable.GetApplicationLaunchArguments(unHandle,pchArgs,unArgs);
+ return result;
+ }
public EVRApplicationError GetStartingApplication(string pchAppKeyBuffer,uint unAppKeyBufferLen)
{
EVRApplicationError result = FnTable.GetStartingApplication(pchAppKeyBuffer,unAppKeyBufferLen);
@@ -2081,16 +2209,6 @@ public class CVRCompositor
{
FnTable.SuspendRendering(bSuspend);
}
- public EVRCompositorError RequestScreenshot(EVRScreenshotType type,string pchDestinationFileName,string pchVRDestinationFileName)
- {
- EVRCompositorError result = FnTable.RequestScreenshot(type,pchDestinationFileName,pchVRDestinationFileName);
- return result;
- }
- public EVRScreenshotType GetCurrentScreenshotType()
- {
- EVRScreenshotType result = FnTable.GetCurrentScreenshotType();
- return result;
- }
public EVRCompositorError GetMirrorTextureD3D11(EVREye eEye,IntPtr pD3D11DeviceOrResource,ref IntPtr ppD3D11ShaderResourceView)
{
EVRCompositorError result = FnTable.GetMirrorTextureD3D11(eEye,pD3D11DeviceOrResource,ref ppD3D11ShaderResourceView);
@@ -2219,6 +2337,28 @@ public class CVROverlay
EVROverlayError result = FnTable.GetOverlayAlpha(ulOverlayHandle,ref pfAlpha);
return result;
}
+ public EVROverlayError SetOverlayTexelAspect(ulong ulOverlayHandle,float fTexelAspect)
+ {
+ EVROverlayError result = FnTable.SetOverlayTexelAspect(ulOverlayHandle,fTexelAspect);
+ return result;
+ }
+ public EVROverlayError GetOverlayTexelAspect(ulong ulOverlayHandle,ref float pfTexelAspect)
+ {
+ pfTexelAspect = 0;
+ EVROverlayError result = FnTable.GetOverlayTexelAspect(ulOverlayHandle,ref pfTexelAspect);
+ return result;
+ }
+ public EVROverlayError SetOverlaySortOrder(ulong ulOverlayHandle,uint unSortOrder)
+ {
+ EVROverlayError result = FnTable.SetOverlaySortOrder(ulOverlayHandle,unSortOrder);
+ return result;
+ }
+ public EVROverlayError GetOverlaySortOrder(ulong ulOverlayHandle,ref uint punSortOrder)
+ {
+ punSortOrder = 0;
+ EVROverlayError result = FnTable.GetOverlaySortOrder(ulOverlayHandle,ref punSortOrder);
+ return result;
+ }
public EVROverlayError SetOverlayWidthInMeters(ulong ulOverlayHandle,float fWidthInMeters)
{
EVROverlayError result = FnTable.SetOverlayWidthInMeters(ulOverlayHandle,fWidthInMeters);
@@ -2648,7 +2788,7 @@ public class CVRSettings
{
FnTable.SetFloat(pchSection,pchSettingsKey,flValue,ref peError);
}
- public void GetString(string pchSection,string pchSettingsKey,string pchValue,uint unValueLen,string pchDefaultValue,ref EVRSettingsError peError)
+ public void GetString(string pchSection,string pchSettingsKey,System.Text.StringBuilder pchValue,uint unValueLen,string pchDefaultValue,ref EVRSettingsError peError)
{
FnTable.GetString(pchSection,pchSettingsKey,pchValue,unValueLen,pchDefaultValue,ref peError);
}
@@ -2714,6 +2854,26 @@ public class CVRScreenshots
}
+public class CVRResources
+{
+ IVRResources FnTable;
+ internal CVRResources(IntPtr pInterface)
+ {
+ FnTable = (IVRResources)Marshal.PtrToStructure(pInterface, typeof(IVRResources));
+ }
+ public uint LoadSharedResource(string pchResourceName,string pchBuffer,uint unBufferLen)
+ {
+ uint result = FnTable.LoadSharedResource(pchResourceName,pchBuffer,unBufferLen);
+ return result;
+ }
+ public uint GetResourceFullPath(string pchResourceName,string pchResourceTypeDirectory,string pchPathBuffer,uint unBufferLen)
+ {
+ uint result = FnTable.GetResourceFullPath(pchResourceName,pchResourceTypeDirectory,pchPathBuffer,unBufferLen);
+ return result;
+ }
+}
+
+
public class OpenVRInterop
{
[DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal")]
@@ -2858,6 +3018,7 @@ public enum ETrackedDeviceProperty
Prop_Axis2Type_Int32 = 3004,
Prop_Axis3Type_Int32 = 3005,
Prop_Axis4Type_Int32 = 3006,
+ Prop_ControllerRoleHint_Int32 = 3007,
Prop_FieldOfViewLeftDegrees_Float = 4000,
Prop_FieldOfViewRightDegrees_Float = 4001,
Prop_FieldOfViewTopDegrees_Float = 4002,
@@ -2897,6 +3058,7 @@ public enum EVRState
Ready_Alert = 4,
NotReady = 5,
Standby = 6,
+ Ready_Alert_Low = 7,
}
public enum EVREventType
{
@@ -2910,6 +3072,7 @@ public enum EVREventType
VREvent_EnterStandbyMode = 106,
VREvent_LeaveStandbyMode = 107,
VREvent_TrackedDeviceRoleChanged = 108,
+ VREvent_WatchdogWakeUpRequested = 109,
VREvent_ButtonPress = 200,
VREvent_ButtonUnpress = 201,
VREvent_ButtonTouch = 202,
@@ -2921,6 +3084,7 @@ public enum EVREventType
VREvent_FocusLeave = 304,
VREvent_Scroll = 305,
VREvent_TouchPadMove = 306,
+ VREvent_OverlayFocusChanged = 307,
VREvent_InputFocusCaptured = 400,
VREvent_InputFocusReleased = 401,
VREvent_SceneFocusLost = 402,
@@ -2953,6 +3117,7 @@ public enum EVREventType
VREvent_ScreenshotTaken = 521,
VREvent_ScreenshotFailed = 522,
VREvent_SubmitScreenshotToDashboard = 523,
+ VREvent_ScreenshotProgressToDashboard = 524,
VREvent_Notification_Shown = 600,
VREvent_Notification_Hidden = 601,
VREvent_Notification_BeginInteraction = 602,
@@ -2984,6 +3149,7 @@ public enum EVREventType
VREvent_ApplicationTransitionAborted = 1301,
VREvent_ApplicationTransitionNewAppStarted = 1302,
VREvent_ApplicationListUpdated = 1303,
+ VREvent_ApplicationMimeTypeLoad = 1304,
VREvent_Compositor_MirrorWindowShown = 1400,
VREvent_Compositor_MirrorWindowHidden = 1401,
VREvent_Compositor_ChaperoneBoundsShown = 1410,
@@ -3083,6 +3249,8 @@ public enum EVRApplicationType
VRApplication_Background = 3,
VRApplication_Utility = 4,
VRApplication_VRMonitor = 5,
+ VRApplication_SteamWatchdog = 6,
+ VRApplication_Max = 7,
}
public enum EVRFirmwareError
{
@@ -3127,6 +3295,14 @@ public enum EVRInitError
Init_NotSupportedWithCompositor = 122,
Init_NotAvailableToUtilityApps = 123,
Init_Internal = 124,
+ Init_HmdDriverIdIsNone = 125,
+ Init_HmdNotFoundPresenceFailed = 126,
+ Init_VRMonitorNotFound = 127,
+ Init_VRMonitorStartupFailed = 128,
+ Init_LowPowerWatchdogNotSupported = 129,
+ Init_InvalidApplicationType = 130,
+ Init_NotAvailableToWatchdogApps = 131,
+ Init_WatchdogDisabledInSettings = 132,
Driver_Failed = 200,
Driver_Unknown = 201,
Driver_HmdUnknown = 202,
@@ -3136,12 +3312,18 @@ public enum EVRInitError
Driver_NotCalibrated = 206,
Driver_CalibrationInvalid = 207,
Driver_HmdDisplayNotFound = 208,
+ Driver_TrackedDeviceInterfaceUnknown = 209,
+ Driver_HmdDriverIdOutOfBounds = 211,
+ Driver_HmdDisplayMirrored = 212,
IPC_ServerInitFailed = 300,
IPC_ConnectFailed = 301,
IPC_SharedStateInitFailed = 302,
IPC_CompositorInitFailed = 303,
IPC_MutexInitFailed = 304,
IPC_Failed = 305,
+ IPC_CompositorConnectFailed = 306,
+ IPC_CompositorInvalidConnectResponse = 307,
+ IPC_ConnectFailedAfterMultipleAttempts = 308,
Compositor_Failed = 400,
Compositor_D3D11HardwareRequired = 401,
Compositor_FirmwareRequiresUpdate = 402,
@@ -3314,6 +3496,7 @@ public enum VROverlayFlags
SideBySide_Crossed = 11,
Panorama = 12,
StereoPanorama = 13,
+ SortWithNonSceneOverlays = 14,
}
public enum EGamepadTextInputMode
{
@@ -3604,6 +3787,15 @@ public enum EVRScreenshotError
public uint handle;
public uint type;
}
+[StructLayout(LayoutKind.Sequential)] public struct VREvent_ScreenshotProgress_t
+{
+ public float progress;
+}
+[StructLayout(LayoutKind.Sequential)] public struct VREvent_ApplicationLaunch_t
+{
+ public uint pid;
+ public uint unArgsHandle;
+}
[StructLayout(LayoutKind.Sequential)] public struct VREvent_t
{
public uint eventType;
@@ -3671,8 +3863,10 @@ public enum EVRScreenshotError
public uint m_nFrameIndex;
public uint m_nNumFramePresents;
public uint m_nNumDroppedFrames;
+ public uint m_nReprojectionFlags;
public double m_flSystemTimeInSeconds;
- public float m_flSceneRenderGpuMs;
+ public float m_flPreSubmitGpuMs;
+ public float m_flPostSubmitGpuMs;
public float m_flTotalRenderGpuMs;
public float m_flCompositorRenderGpuMs;
public float m_flCompositorRenderCpuMs;
@@ -3688,8 +3882,6 @@ public enum EVRScreenshotError
public float m_flCompositorUpdateEndMs;
public float m_flCompositorRenderStartMs;
public TrackedDevicePose_t m_HmdPose;
- public int m_nFidelityLevel;
- public uint m_nReprojectionFlags;
}
[StructLayout(LayoutKind.Sequential)] public struct Compositor_CumulativeStats
{
@@ -3768,6 +3960,7 @@ public enum EVRScreenshotError
public IntPtr m_pVRChaperoneSetup; // class vr::IVRChaperoneSetup *
public IntPtr m_pVRCompositor; // class vr::IVRCompositor *
public IntPtr m_pVROverlay; // class vr::IVROverlay *
+ public IntPtr m_pVRResources; // class vr::IVRResources *
public IntPtr m_pVRRenderModels; // class vr::IVRRenderModels *
public IntPtr m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay *
public IntPtr m_pVRSettings; // class vr::IVRSettings *
@@ -3833,14 +4026,14 @@ public class OpenVR
public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
public const string IVRTrackedCamera_Version = "IVRTrackedCamera_003";
public const uint k_unMaxApplicationKeyLength = 128;
- public const string IVRApplications_Version = "IVRApplications_005";
+ public const string IVRApplications_Version = "IVRApplications_006";
public const string IVRChaperone_Version = "IVRChaperone_003";
public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
- public const string IVRCompositor_Version = "IVRCompositor_015";
+ public const string IVRCompositor_Version = "IVRCompositor_016";
public const uint k_unVROverlayMaxKeyLength = 128;
public const uint k_unVROverlayMaxNameLength = 128;
- public const uint k_unMaxOverlayCount = 32;
- public const string IVROverlay_Version = "IVROverlay_012";
+ public const uint k_unMaxOverlayCount = 64;
+ public const string IVROverlay_Version = "IVROverlay_013";
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";
@@ -3887,6 +4080,9 @@ public class OpenVR
public const string k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
public const string k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
public const string k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
+ public const string k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
+ public const string k_pch_SteamVR_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
+ public const string k_pch_SteamVR_UseGenericGraphcisDevice_Bool = "useGenericGraphicsDevice";
public const string k_pch_Lighthouse_Section = "driver_lighthouse";
public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
public const string k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
@@ -3910,7 +4106,8 @@ public class OpenVR
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_UserInterface_EnableScreenshots_Bool = "EnableScreenshots";
+ public const string k_pch_UserInterface_Screenshots_Bool = "screenshots";
+ public const string k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
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";
@@ -3956,6 +4153,7 @@ public class OpenVR
public const string k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
public const string k_pch_modelskin_Section = "modelskins";
public const string IVRScreenshots_Version = "IVRScreenshots_001";
+ public const string IVRResources_Version = "IVRResources_001";
static uint VRToken { get; set; }
@@ -3977,6 +4175,7 @@ public class OpenVR
m_pVRSettings = null;
m_pVRApplications = null;
m_pVRScreenshots = null;
+ m_pVRTrackedCamera = null;
}
void CheckClear()
@@ -4118,6 +4317,19 @@ public class OpenVR
return m_pVRScreenshots;
}
+ public CVRTrackedCamera VRTrackedCamera()
+ {
+ CheckClear();
+ if (m_pVRTrackedCamera == null)
+ {
+ var eError = EVRInitError.None;
+ var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRTrackedCamera_Version, ref eError);
+ if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
+ m_pVRTrackedCamera = new CVRTrackedCamera(pInterface);
+ }
+ return m_pVRTrackedCamera;
+ }
+
private CVRSystem m_pVRSystem;
private CVRChaperone m_pVRChaperone;
private CVRChaperoneSetup m_pVRChaperoneSetup;
@@ -4128,6 +4340,7 @@ public class OpenVR
private CVRSettings m_pVRSettings;
private CVRApplications m_pVRApplications;
private CVRScreenshots m_pVRScreenshots;
+ private CVRTrackedCamera m_pVRTrackedCamera;
};
private static COpenVRContext _OpenVRInternal_ModuleContext = null;
@@ -4147,10 +4360,11 @@ public class OpenVR
public static CVRCompositor Compositor { get { return OpenVRInternal_ModuleContext.VRCompositor(); } }
public static CVROverlay Overlay { get { return OpenVRInternal_ModuleContext.VROverlay(); } }
public static CVRRenderModels RenderModels { get { return OpenVRInternal_ModuleContext.VRRenderModels(); } }
- public static CVRApplications Applications { get { return OpenVRInternal_ModuleContext.VRApplications(); } }
- public static CVRSettings Settings { get { return OpenVRInternal_ModuleContext.VRSettings(); } }
public static CVRExtendedDisplay ExtendedDisplay { get { return OpenVRInternal_ModuleContext.VRExtendedDisplay(); } }
+ public static CVRSettings Settings { get { return OpenVRInternal_ModuleContext.VRSettings(); } }
+ public static CVRApplications Applications { get { return OpenVRInternal_ModuleContext.VRApplications(); } }
public static CVRScreenshots Screenshots { get { return OpenVRInternal_ModuleContext.VRScreenshots(); } }
+ public static CVRTrackedCamera TrackedCamera { get { return OpenVRInternal_ModuleContext.VRTrackedCamera(); } }
/** Finds the active installation of vrclient.dll and initializes it */
public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene)
diff --git a/headers/openvr_api.json b/headers/openvr_api.json
index c72b2c4..98f0497 100644
--- a/headers/openvr_api.json
+++ b/headers/openvr_api.json
@@ -143,6 +143,7 @@
,{"name": "Prop_Axis2Type_Int32","value": "3004"}
,{"name": "Prop_Axis3Type_Int32","value": "3005"}
,{"name": "Prop_Axis4Type_Int32","value": "3006"}
+ ,{"name": "Prop_ControllerRoleHint_Int32","value": "3007"}
,{"name": "Prop_FieldOfViewLeftDegrees_Float","value": "4000"}
,{"name": "Prop_FieldOfViewRightDegrees_Float","value": "4001"}
,{"name": "Prop_FieldOfViewTopDegrees_Float","value": "4002"}
@@ -179,6 +180,7 @@
,{"name": "VRState_Ready_Alert","value": "4"}
,{"name": "VRState_NotReady","value": "5"}
,{"name": "VRState_Standby","value": "6"}
+ ,{"name": "VRState_Ready_Alert_Low","value": "7"}
]}
, {"enumname": "vr::EVREventType","values": [
{"name": "VREvent_None","value": "0"}
@@ -191,6 +193,7 @@
,{"name": "VREvent_EnterStandbyMode","value": "106"}
,{"name": "VREvent_LeaveStandbyMode","value": "107"}
,{"name": "VREvent_TrackedDeviceRoleChanged","value": "108"}
+ ,{"name": "VREvent_WatchdogWakeUpRequested","value": "109"}
,{"name": "VREvent_ButtonPress","value": "200"}
,{"name": "VREvent_ButtonUnpress","value": "201"}
,{"name": "VREvent_ButtonTouch","value": "202"}
@@ -202,6 +205,7 @@
,{"name": "VREvent_FocusLeave","value": "304"}
,{"name": "VREvent_Scroll","value": "305"}
,{"name": "VREvent_TouchPadMove","value": "306"}
+ ,{"name": "VREvent_OverlayFocusChanged","value": "307"}
,{"name": "VREvent_InputFocusCaptured","value": "400"}
,{"name": "VREvent_InputFocusReleased","value": "401"}
,{"name": "VREvent_SceneFocusLost","value": "402"}
@@ -234,6 +238,7 @@
,{"name": "VREvent_ScreenshotTaken","value": "521"}
,{"name": "VREvent_ScreenshotFailed","value": "522"}
,{"name": "VREvent_SubmitScreenshotToDashboard","value": "523"}
+ ,{"name": "VREvent_ScreenshotProgressToDashboard","value": "524"}
,{"name": "VREvent_Notification_Shown","value": "600"}
,{"name": "VREvent_Notification_Hidden","value": "601"}
,{"name": "VREvent_Notification_BeginInteraction","value": "602"}
@@ -265,6 +270,7 @@
,{"name": "VREvent_ApplicationTransitionAborted","value": "1301"}
,{"name": "VREvent_ApplicationTransitionNewAppStarted","value": "1302"}
,{"name": "VREvent_ApplicationListUpdated","value": "1303"}
+ ,{"name": "VREvent_ApplicationMimeTypeLoad","value": "1304"}
,{"name": "VREvent_Compositor_MirrorWindowShown","value": "1400"}
,{"name": "VREvent_Compositor_MirrorWindowHidden","value": "1401"}
,{"name": "VREvent_Compositor_ChaperoneBoundsShown","value": "1410"}
@@ -356,6 +362,8 @@
,{"name": "VRApplication_Background","value": "3"}
,{"name": "VRApplication_Utility","value": "4"}
,{"name": "VRApplication_VRMonitor","value": "5"}
+ ,{"name": "VRApplication_SteamWatchdog","value": "6"}
+ ,{"name": "VRApplication_Max","value": "7"}
]}
, {"enumname": "vr::EVRFirmwareError","values": [
{"name": "VRFirmwareError_None","value": "0"}
@@ -397,6 +405,14 @@
,{"name": "VRInitError_Init_NotSupportedWithCompositor","value": "122"}
,{"name": "VRInitError_Init_NotAvailableToUtilityApps","value": "123"}
,{"name": "VRInitError_Init_Internal","value": "124"}
+ ,{"name": "VRInitError_Init_HmdDriverIdIsNone","value": "125"}
+ ,{"name": "VRInitError_Init_HmdNotFoundPresenceFailed","value": "126"}
+ ,{"name": "VRInitError_Init_VRMonitorNotFound","value": "127"}
+ ,{"name": "VRInitError_Init_VRMonitorStartupFailed","value": "128"}
+ ,{"name": "VRInitError_Init_LowPowerWatchdogNotSupported","value": "129"}
+ ,{"name": "VRInitError_Init_InvalidApplicationType","value": "130"}
+ ,{"name": "VRInitError_Init_NotAvailableToWatchdogApps","value": "131"}
+ ,{"name": "VRInitError_Init_WatchdogDisabledInSettings","value": "132"}
,{"name": "VRInitError_Driver_Failed","value": "200"}
,{"name": "VRInitError_Driver_Unknown","value": "201"}
,{"name": "VRInitError_Driver_HmdUnknown","value": "202"}
@@ -406,12 +422,18 @@
,{"name": "VRInitError_Driver_NotCalibrated","value": "206"}
,{"name": "VRInitError_Driver_CalibrationInvalid","value": "207"}
,{"name": "VRInitError_Driver_HmdDisplayNotFound","value": "208"}
+ ,{"name": "VRInitError_Driver_TrackedDeviceInterfaceUnknown","value": "209"}
+ ,{"name": "VRInitError_Driver_HmdDriverIdOutOfBounds","value": "211"}
+ ,{"name": "VRInitError_Driver_HmdDisplayMirrored","value": "212"}
,{"name": "VRInitError_IPC_ServerInitFailed","value": "300"}
,{"name": "VRInitError_IPC_ConnectFailed","value": "301"}
,{"name": "VRInitError_IPC_SharedStateInitFailed","value": "302"}
,{"name": "VRInitError_IPC_CompositorInitFailed","value": "303"}
,{"name": "VRInitError_IPC_MutexInitFailed","value": "304"}
,{"name": "VRInitError_IPC_Failed","value": "305"}
+ ,{"name": "VRInitError_IPC_CompositorConnectFailed","value": "306"}
+ ,{"name": "VRInitError_IPC_CompositorInvalidConnectResponse","value": "307"}
+ ,{"name": "VRInitError_IPC_ConnectFailedAfterMultipleAttempts","value": "308"}
,{"name": "VRInitError_Compositor_Failed","value": "400"}
,{"name": "VRInitError_Compositor_D3D11HardwareRequired","value": "401"}
,{"name": "VRInitError_Compositor_FirmwareRequiresUpdate","value": "402"}
@@ -570,6 +592,7 @@
,{"name": "VROverlayFlags_SideBySide_Crossed","value": "11"}
,{"name": "VROverlayFlags_Panorama","value": "12"}
,{"name": "VROverlayFlags_StereoPanorama","value": "13"}
+ ,{"name": "VROverlayFlags_SortWithNonSceneOverlays","value": "14"}
]}
, {"enumname": "vr::EGamepadTextInputMode","values": [
{"name": "k_EGamepadTextInputModeNormal","value": "0"}
@@ -665,21 +688,21 @@
,{
"constname": "k_unMaxApplicationKeyLength","consttype": "const uint32_t", "constval": "128"}
,{
- "constname": "IVRApplications_Version","consttype": "const char *const", "constval": "IVRApplications_005"}
+ "constname": "IVRApplications_Version","consttype": "const char *const", "constval": "IVRApplications_006"}
,{
"constname": "IVRChaperone_Version","consttype": "const char *const", "constval": "IVRChaperone_003"}
,{
"constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_005"}
,{
- "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_015"}
+ "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_016"}
,{
"constname": "k_unVROverlayMaxKeyLength","consttype": "const uint32_t", "constval": "128"}
,{
"constname": "k_unVROverlayMaxNameLength","consttype": "const uint32_t", "constval": "128"}
,{
- "constname": "k_unMaxOverlayCount","consttype": "const uint32_t", "constval": "32"}
+ "constname": "k_unMaxOverlayCount","consttype": "const uint32_t", "constval": "64"}
,{
- "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_012"}
+ "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_013"}
,{
"constname": "k_pch_Controller_Component_GDC2015","consttype": "const char *const", "constval": "gdc2015"}
,{
@@ -773,6 +796,12 @@
,{
"constname": "k_pch_SteamVR_ShowMirrorView_Bool","consttype": "const char *const", "constval": "showMirrorView"}
,{
+ "constname": "k_pch_SteamVR_StartMonitorFromAppLaunch","consttype": "const char *const", "constval": "startMonitorFromAppLaunch"}
+,{
+ "constname": "k_pch_SteamVR_AutoLaunchSteamVROnButtonPress","consttype": "const char *const", "constval": "autoLaunchSteamVROnButtonPress"}
+,{
+ "constname": "k_pch_SteamVR_UseGenericGraphcisDevice_Bool","consttype": "const char *const", "constval": "useGenericGraphicsDevice"}
+,{
"constname": "k_pch_Lighthouse_Section","consttype": "const char *const", "constval": "driver_lighthouse"}
,{
"constname": "k_pch_Lighthouse_DisableIMU_Bool","consttype": "const char *const", "constval": "disableimu"}
@@ -819,7 +848,9 @@
,{
"constname": "k_pch_UserInterface_StatusAlwaysOnTop_Bool","consttype": "const char *const", "constval": "StatusAlwaysOnTop"}
,{
- "constname": "k_pch_UserInterface_EnableScreenshots_Bool","consttype": "const char *const", "constval": "EnableScreenshots"}
+ "constname": "k_pch_UserInterface_Screenshots_Bool","consttype": "const char *const", "constval": "screenshots"}
+,{
+ "constname": "k_pch_UserInterface_ScreenshotType_Int","consttype": "const char *const", "constval": "screenshotType"}
,{
"constname": "k_pch_Notifications_Section","consttype": "const char *const", "constval": "notifications"}
,{
@@ -910,6 +941,8 @@
"constname": "k_pch_modelskin_Section","consttype": "const char *const", "constval": "modelskins"}
,{
"constname": "IVRScreenshots_Version","consttype": "const char *const", "constval": "IVRScreenshots_001"}
+,{
+ "constname": "IVRResources_Version","consttype": "const char *const", "constval": "IVRResources_001"}
],
"structs":[{"struct": "vr::HmdMatrix34_t","fields": [
{ "fieldname": "m", "fieldtype": "float [3][4]"}]}
@@ -1004,6 +1037,11 @@
,{"struct": "vr::VREvent_Screenshot_t","fields": [
{ "fieldname": "handle", "fieldtype": "uint32_t"},
{ "fieldname": "type", "fieldtype": "uint32_t"}]}
+,{"struct": "vr::VREvent_ScreenshotProgress_t","fields": [
+{ "fieldname": "progress", "fieldtype": "float"}]}
+,{"struct": "vr::VREvent_ApplicationLaunch_t","fields": [
+{ "fieldname": "pid", "fieldtype": "uint32_t"},
+{ "fieldname": "unArgsHandle", "fieldtype": "uint32_t"}]}
,{"struct": "vr::(anonymous)","fields": [
{ "fieldname": "reserved", "fieldtype": "struct vr::VREvent_Reserved_t"},
{ "fieldname": "controller", "fieldtype": "struct vr::VREvent_Controller_t"},
@@ -1019,7 +1057,9 @@
{ "fieldname": "performanceTest", "fieldtype": "struct vr::VREvent_PerformanceTest_t"},
{ "fieldname": "touchPadMove", "fieldtype": "struct vr::VREvent_TouchPadMove_t"},
{ "fieldname": "seatedZeroPoseReset", "fieldtype": "struct vr::VREvent_SeatedZeroPoseReset_t"},
-{ "fieldname": "screenshot", "fieldtype": "struct vr::VREvent_Screenshot_t"}]}
+{ "fieldname": "screenshot", "fieldtype": "struct vr::VREvent_Screenshot_t"},
+{ "fieldname": "screenshotProgress", "fieldtype": "struct vr::VREvent_ScreenshotProgress_t"},
+{ "fieldname": "applicationLaunch", "fieldtype": "struct vr::VREvent_ApplicationLaunch_t"}]}
,{"struct": "vr::VREvent_t","fields": [
{ "fieldname": "eventType", "fieldtype": "uint32_t"},
{ "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"},
@@ -1066,8 +1106,10 @@
{ "fieldname": "m_nFrameIndex", "fieldtype": "uint32_t"},
{ "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"},
{ "fieldname": "m_nNumDroppedFrames", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nReprojectionFlags", "fieldtype": "uint32_t"},
{ "fieldname": "m_flSystemTimeInSeconds", "fieldtype": "double"},
-{ "fieldname": "m_flSceneRenderGpuMs", "fieldtype": "float"},
+{ "fieldname": "m_flPreSubmitGpuMs", "fieldtype": "float"},
+{ "fieldname": "m_flPostSubmitGpuMs", "fieldtype": "float"},
{ "fieldname": "m_flTotalRenderGpuMs", "fieldtype": "float"},
{ "fieldname": "m_flCompositorRenderGpuMs", "fieldtype": "float"},
{ "fieldname": "m_flCompositorRenderCpuMs", "fieldtype": "float"},
@@ -1082,9 +1124,7 @@
{ "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"},
-{ "fieldname": "m_nReprojectionFlags", "fieldtype": "uint32_t"}]}
+{ "fieldname": "m_HmdPose", "fieldtype": "vr::TrackedDevicePose_t"}]}
,{"struct": "vr::Compositor_CumulativeStats","fields": [
{ "fieldname": "m_nPid", "fieldtype": "uint32_t"},
{ "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"},
@@ -1141,6 +1181,7 @@
{ "fieldname": "m_pVRChaperoneSetup", "fieldtype": "class vr::IVRChaperoneSetup *"},
{ "fieldname": "m_pVRCompositor", "fieldtype": "class vr::IVRCompositor *"},
{ "fieldname": "m_pVROverlay", "fieldtype": "class vr::IVROverlay *"},
+{ "fieldname": "m_pVRResources", "fieldtype": "class vr::IVRResources *"},
{ "fieldname": "m_pVRRenderModels", "fieldtype": "class vr::IVRRenderModels *"},
{ "fieldname": "m_pVRExtendedDisplay", "fieldtype": "class vr::IVRExtendedDisplay *"},
{ "fieldname": "m_pVRSettings", "fieldtype": "class vr::IVRSettings *"},
@@ -1631,6 +1672,52 @@
]
}
,{
+ "classname": "vr::IVRTrackedCamera",
+ "methodname": "GetVideoStreamTextureSize",
+ "returntype": "vr::EVRTrackedCameraError",
+ "params": [
+{ "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"},
+{ "paramname": "eFrameType" ,"paramtype": "vr::EVRTrackedCameraFrameType"},
+{ "paramname": "pTextureBounds" ,"paramtype": "vr::VRTextureBounds_t *"},
+{ "paramname": "pnWidth" ,"paramtype": "uint32_t *"},
+{ "paramname": "pnHeight" ,"paramtype": "uint32_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVRTrackedCamera",
+ "methodname": "GetVideoStreamTextureD3D11",
+ "returntype": "vr::EVRTrackedCameraError",
+ "params": [
+{ "paramname": "hTrackedCamera" ,"paramtype": "vr::TrackedCameraHandle_t"},
+{ "paramname": "eFrameType" ,"paramtype": "vr::EVRTrackedCameraFrameType"},
+{ "paramname": "pD3D11DeviceOrResource" ,"paramtype": "void *"},
+{ "paramname": "ppD3D11ShaderResourceView" ,"paramtype": "void **"},
+{ "paramname": "pFrameHeader" ,"paramtype": "vr::CameraVideoStreamFrameHeader_t *"},
+{ "paramname": "nFrameHeaderSize" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRTrackedCamera",
+ "methodname": "GetVideoStreamTextureGL",
+ "returntype": "vr::EVRTrackedCameraError",
+ "params": [
+{ "paramname": "hTrackedCamera" ,"paramtype": "vr::TrackedCameraHandle_t"},
+{ "paramname": "eFrameType" ,"paramtype": "vr::EVRTrackedCameraFrameType"},
+{ "paramname": "pglTextureId" ,"paramtype": "vr::glUInt_t *"},
+{ "paramname": "pFrameHeader" ,"paramtype": "vr::CameraVideoStreamFrameHeader_t *"},
+{ "paramname": "nFrameHeaderSize" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRTrackedCamera",
+ "methodname": "ReleaseVideoStreamTextureGL",
+ "returntype": "vr::EVRTrackedCameraError",
+ "params": [
+{ "paramname": "hTrackedCamera" ,"paramtype": "vr::TrackedCameraHandle_t"},
+{ "paramname": "glTextureId" ,"paramtype": "vr::glUInt_t"}
+ ]
+}
+,{
"classname": "vr::IVRApplications",
"methodname": "AddApplicationManifest",
"returntype": "vr::EVRApplicationError",
@@ -1701,6 +1788,15 @@
}
,{
"classname": "vr::IVRApplications",
+ "methodname": "LaunchApplicationFromMimeType",
+ "returntype": "vr::EVRApplicationError",
+ "params": [
+{ "paramname": "pchMimeType" ,"paramtype": "const char *"},
+{ "paramname": "pchArgs" ,"paramtype": "const char *"}
+ ]
+}
+,{
+ "classname": "vr::IVRApplications",
"methodname": "LaunchDashboardOverlay",
"returntype": "vr::EVRApplicationError",
"params": [
@@ -1791,6 +1887,55 @@
}
,{
"classname": "vr::IVRApplications",
+ "methodname": "SetDefaultApplicationForMimeType",
+ "returntype": "vr::EVRApplicationError",
+ "params": [
+{ "paramname": "pchAppKey" ,"paramtype": "const char *"},
+{ "paramname": "pchMimeType" ,"paramtype": "const char *"}
+ ]
+}
+,{
+ "classname": "vr::IVRApplications",
+ "methodname": "GetDefaultApplicationForMimeType",
+ "returntype": "bool",
+ "params": [
+{ "paramname": "pchMimeType" ,"paramtype": "const char *"},
+{ "paramname": "pchAppKeyBuffer" ,"paramtype": "char *"},
+{ "paramname": "unAppKeyBufferLen" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRApplications",
+ "methodname": "GetApplicationSupportedMimeTypes",
+ "returntype": "bool",
+ "params": [
+{ "paramname": "pchAppKey" ,"paramtype": "const char *"},
+{ "paramname": "pchMimeTypesBuffer" ,"paramtype": "char *"},
+{ "paramname": "unMimeTypesBuffer" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRApplications",
+ "methodname": "GetApplicationsThatSupportMimeType",
+ "returntype": "uint32_t",
+ "params": [
+{ "paramname": "pchMimeType" ,"paramtype": "const char *"},
+{ "paramname": "pchAppKeysThatSupportBuffer" ,"paramtype": "char *"},
+{ "paramname": "unAppKeysThatSupportBuffer" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRApplications",
+ "methodname": "GetApplicationLaunchArguments",
+ "returntype": "uint32_t",
+ "params": [
+{ "paramname": "unHandle" ,"paramtype": "uint32_t"},
+{ "paramname": "pchArgs" ,"paramtype": "char *"},
+{ "paramname": "unArgs" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRApplications",
"methodname": "GetStartingApplication",
"returntype": "vr::EVRApplicationError",
"params": [
@@ -2269,21 +2414,6 @@
}
,{
"classname": "vr::IVRCompositor",
- "methodname": "RequestScreenshot",
- "returntype": "vr::EVRCompositorError",
- "params": [
-{ "paramname": "type" ,"paramtype": "vr::EVRScreenshotType"},
-{ "paramname": "pchDestinationFileName" ,"paramtype": "const char *"},
-{ "paramname": "pchVRDestinationFileName" ,"paramtype": "const char *"}
- ]
-}
-,{
- "classname": "vr::IVRCompositor",
- "methodname": "GetCurrentScreenshotType",
- "returntype": "vr::EVRScreenshotType"
-}
-,{
- "classname": "vr::IVRCompositor",
"methodname": "GetMirrorTextureD3D11",
"returntype": "vr::EVRCompositorError",
"params": [
@@ -2488,6 +2618,42 @@
}
,{
"classname": "vr::IVROverlay",
+ "methodname": "SetOverlayTexelAspect",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "fTexelAspect" ,"paramtype": "float"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
+ "methodname": "GetOverlayTexelAspect",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "pfTexelAspect" ,"paramtype": "float *"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
+ "methodname": "SetOverlaySortOrder",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "unSortOrder" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
+ "methodname": "GetOverlaySortOrder",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "punSortOrder" ,"paramtype": "uint32_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
"methodname": "SetOverlayWidthInMeters",
"returntype": "vr::EVROverlayError",
"params": [
@@ -3236,7 +3402,7 @@
"params": [
{ "paramname": "pchSection" ,"paramtype": "const char *"},
{ "paramname": "pchSettingsKey" ,"paramtype": "const char *"},
-{ "paramname": "pchValue" ,"paramtype": "char *"},
+{ "paramname": "pchValue" ,"out_string": " " ,"paramtype": "char *"},
{ "paramname": "unValueLen" ,"paramtype": "uint32_t"},
{ "paramname": "pchDefaultValue" ,"paramtype": "const char *"},
{ "paramname": "peError" ,"paramtype": "vr::EVRSettingsError *"}
@@ -3343,5 +3509,26 @@
{ "paramname": "pchSourceVRFilename" ,"paramtype": "const char *"}
]
}
+,{
+ "classname": "vr::IVRResources",
+ "methodname": "LoadSharedResource",
+ "returntype": "uint32_t",
+ "params": [
+{ "paramname": "pchResourceName" ,"paramtype": "const char *"},
+{ "paramname": "pchBuffer" ,"paramtype": "char *"},
+{ "paramname": "unBufferLen" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRResources",
+ "methodname": "GetResourceFullPath",
+ "returntype": "uint32_t",
+ "params": [
+{ "paramname": "pchResourceName" ,"paramtype": "const char *"},
+{ "paramname": "pchResourceTypeDirectory" ,"paramtype": "const char *"},
+{ "paramname": "pchPathBuffer" ,"paramtype": "char *"},
+{ "paramname": "unBufferLen" ,"paramtype": "uint32_t"}
+ ]
+}
]
} \ No newline at end of file
diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h
index 76eafd4..030517e 100644
--- a/headers/openvr_capi.h
+++ b/headers/openvr_capi.h
@@ -28,7 +28,7 @@
#else
#define S_API extern "C" __declspec( dllimport )
#endif // OPENVR_API_EXPORTS
-#elif defined( GNUC )
+#elif defined( __GNUC__ )
#if defined( OPENVR_API_EXPORTS )
#define S_API EXTERN_C __attribute__ ((visibility("default")))
#else
@@ -65,14 +65,14 @@ static const char * IVRSystem_Version = "IVRSystem_012";
static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_003";
static const unsigned int k_unMaxApplicationKeyLength = 128;
-static const char * IVRApplications_Version = "IVRApplications_005";
+static const char * IVRApplications_Version = "IVRApplications_006";
static const char * IVRChaperone_Version = "IVRChaperone_003";
static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
-static const char * IVRCompositor_Version = "IVRCompositor_015";
+static const char * IVRCompositor_Version = "IVRCompositor_016";
static const unsigned int k_unVROverlayMaxKeyLength = 128;
static const unsigned int k_unVROverlayMaxNameLength = 128;
-static const unsigned int k_unMaxOverlayCount = 32;
-static const char * IVROverlay_Version = "IVROverlay_012";
+static const unsigned int k_unMaxOverlayCount = 64;
+static const char * IVROverlay_Version = "IVROverlay_013";
static const char * k_pch_Controller_Component_GDC2015 = "gdc2015";
static const char * k_pch_Controller_Component_Base = "base";
static const char * k_pch_Controller_Component_Tip = "tip";
@@ -119,6 +119,9 @@ static const char * k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
static const char * k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
static const char * k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
static const char * k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
+static const char * k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
+static const char * k_pch_SteamVR_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
+static const char * k_pch_SteamVR_UseGenericGraphcisDevice_Bool = "useGenericGraphicsDevice";
static const char * k_pch_Lighthouse_Section = "driver_lighthouse";
static const char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
static const char * k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
@@ -142,7 +145,8 @@ static const char * k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsy
static const char * k_pch_Null_DisplayFrequency_Float = "displayFrequency";
static const char * k_pch_UserInterface_Section = "userinterface";
static const char * k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
-static const char * k_pch_UserInterface_EnableScreenshots_Bool = "EnableScreenshots";
+static const char * k_pch_UserInterface_Screenshots_Bool = "screenshots";
+static const char * k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
static const char * k_pch_Notifications_Section = "notifications";
static const char * k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
static const char * k_pch_Keyboard_Section = "keyboard";
@@ -188,6 +192,7 @@ static const char * k_pch_audio_OffRecordDevice_String = "offRecordDevice";
static const char * k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
static const char * k_pch_modelskin_Section = "modelskins";
static const char * IVRScreenshots_Version = "IVRScreenshots_001";
+static const char * IVRResources_Version = "IVRResources_001";
// OpenVR Enums
@@ -321,6 +326,7 @@ typedef enum ETrackedDeviceProperty
ETrackedDeviceProperty_Prop_Axis2Type_Int32 = 3004,
ETrackedDeviceProperty_Prop_Axis3Type_Int32 = 3005,
ETrackedDeviceProperty_Prop_Axis4Type_Int32 = 3006,
+ ETrackedDeviceProperty_Prop_ControllerRoleHint_Int32 = 3007,
ETrackedDeviceProperty_Prop_FieldOfViewLeftDegrees_Float = 4000,
ETrackedDeviceProperty_Prop_FieldOfViewRightDegrees_Float = 4001,
ETrackedDeviceProperty_Prop_FieldOfViewTopDegrees_Float = 4002,
@@ -363,6 +369,7 @@ typedef enum EVRState
EVRState_VRState_Ready_Alert = 4,
EVRState_VRState_NotReady = 5,
EVRState_VRState_Standby = 6,
+ EVRState_VRState_Ready_Alert_Low = 7,
} EVRState;
typedef enum EVREventType
@@ -377,6 +384,7 @@ typedef enum EVREventType
EVREventType_VREvent_EnterStandbyMode = 106,
EVREventType_VREvent_LeaveStandbyMode = 107,
EVREventType_VREvent_TrackedDeviceRoleChanged = 108,
+ EVREventType_VREvent_WatchdogWakeUpRequested = 109,
EVREventType_VREvent_ButtonPress = 200,
EVREventType_VREvent_ButtonUnpress = 201,
EVREventType_VREvent_ButtonTouch = 202,
@@ -388,6 +396,7 @@ typedef enum EVREventType
EVREventType_VREvent_FocusLeave = 304,
EVREventType_VREvent_Scroll = 305,
EVREventType_VREvent_TouchPadMove = 306,
+ EVREventType_VREvent_OverlayFocusChanged = 307,
EVREventType_VREvent_InputFocusCaptured = 400,
EVREventType_VREvent_InputFocusReleased = 401,
EVREventType_VREvent_SceneFocusLost = 402,
@@ -420,6 +429,7 @@ typedef enum EVREventType
EVREventType_VREvent_ScreenshotTaken = 521,
EVREventType_VREvent_ScreenshotFailed = 522,
EVREventType_VREvent_SubmitScreenshotToDashboard = 523,
+ EVREventType_VREvent_ScreenshotProgressToDashboard = 524,
EVREventType_VREvent_Notification_Shown = 600,
EVREventType_VREvent_Notification_Hidden = 601,
EVREventType_VREvent_Notification_BeginInteraction = 602,
@@ -451,6 +461,7 @@ typedef enum EVREventType
EVREventType_VREvent_ApplicationTransitionAborted = 1301,
EVREventType_VREvent_ApplicationTransitionNewAppStarted = 1302,
EVREventType_VREvent_ApplicationListUpdated = 1303,
+ EVREventType_VREvent_ApplicationMimeTypeLoad = 1304,
EVREventType_VREvent_Compositor_MirrorWindowShown = 1400,
EVREventType_VREvent_Compositor_MirrorWindowHidden = 1401,
EVREventType_VREvent_Compositor_ChaperoneBoundsShown = 1410,
@@ -558,6 +569,8 @@ typedef enum EVRApplicationType
EVRApplicationType_VRApplication_Background = 3,
EVRApplicationType_VRApplication_Utility = 4,
EVRApplicationType_VRApplication_VRMonitor = 5,
+ EVRApplicationType_VRApplication_SteamWatchdog = 6,
+ EVRApplicationType_VRApplication_Max = 7,
} EVRApplicationType;
typedef enum EVRFirmwareError
@@ -605,6 +618,14 @@ typedef enum EVRInitError
EVRInitError_VRInitError_Init_NotSupportedWithCompositor = 122,
EVRInitError_VRInitError_Init_NotAvailableToUtilityApps = 123,
EVRInitError_VRInitError_Init_Internal = 124,
+ EVRInitError_VRInitError_Init_HmdDriverIdIsNone = 125,
+ EVRInitError_VRInitError_Init_HmdNotFoundPresenceFailed = 126,
+ EVRInitError_VRInitError_Init_VRMonitorNotFound = 127,
+ EVRInitError_VRInitError_Init_VRMonitorStartupFailed = 128,
+ EVRInitError_VRInitError_Init_LowPowerWatchdogNotSupported = 129,
+ EVRInitError_VRInitError_Init_InvalidApplicationType = 130,
+ EVRInitError_VRInitError_Init_NotAvailableToWatchdogApps = 131,
+ EVRInitError_VRInitError_Init_WatchdogDisabledInSettings = 132,
EVRInitError_VRInitError_Driver_Failed = 200,
EVRInitError_VRInitError_Driver_Unknown = 201,
EVRInitError_VRInitError_Driver_HmdUnknown = 202,
@@ -614,12 +635,18 @@ typedef enum EVRInitError
EVRInitError_VRInitError_Driver_NotCalibrated = 206,
EVRInitError_VRInitError_Driver_CalibrationInvalid = 207,
EVRInitError_VRInitError_Driver_HmdDisplayNotFound = 208,
+ EVRInitError_VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209,
+ EVRInitError_VRInitError_Driver_HmdDriverIdOutOfBounds = 211,
+ EVRInitError_VRInitError_Driver_HmdDisplayMirrored = 212,
EVRInitError_VRInitError_IPC_ServerInitFailed = 300,
EVRInitError_VRInitError_IPC_ConnectFailed = 301,
EVRInitError_VRInitError_IPC_SharedStateInitFailed = 302,
EVRInitError_VRInitError_IPC_CompositorInitFailed = 303,
EVRInitError_VRInitError_IPC_MutexInitFailed = 304,
EVRInitError_VRInitError_IPC_Failed = 305,
+ EVRInitError_VRInitError_IPC_CompositorConnectFailed = 306,
+ EVRInitError_VRInitError_IPC_CompositorInvalidConnectResponse = 307,
+ EVRInitError_VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308,
EVRInitError_VRInitError_Compositor_Failed = 400,
EVRInitError_VRInitError_Compositor_D3D11HardwareRequired = 401,
EVRInitError_VRInitError_Compositor_FirmwareRequiresUpdate = 402,
@@ -806,6 +833,7 @@ typedef enum VROverlayFlags
VROverlayFlags_SideBySide_Crossed = 11,
VROverlayFlags_Panorama = 12,
VROverlayFlags_StereoPanorama = 13,
+ VROverlayFlags_SortWithNonSceneOverlays = 14,
} VROverlayFlags;
typedef enum EGamepadTextInputMode
@@ -1105,6 +1133,17 @@ typedef struct VREvent_Screenshot_t
uint32_t type;
} VREvent_Screenshot_t;
+typedef struct VREvent_ScreenshotProgress_t
+{
+ float progress;
+} VREvent_ScreenshotProgress_t;
+
+typedef struct VREvent_ApplicationLaunch_t
+{
+ uint32_t pid;
+ uint32_t unArgsHandle;
+} VREvent_ApplicationLaunch_t;
+
typedef struct HiddenAreaMesh_t
{
struct HmdVector2_t * pVertexData; // const struct vr::HmdVector2_t *
@@ -1165,8 +1204,10 @@ typedef struct Compositor_FrameTiming
uint32_t m_nFrameIndex;
uint32_t m_nNumFramePresents;
uint32_t m_nNumDroppedFrames;
+ uint32_t m_nReprojectionFlags;
double m_flSystemTimeInSeconds;
- float m_flSceneRenderGpuMs;
+ float m_flPreSubmitGpuMs;
+ float m_flPostSubmitGpuMs;
float m_flTotalRenderGpuMs;
float m_flCompositorRenderGpuMs;
float m_flCompositorRenderCpuMs;
@@ -1182,8 +1223,6 @@ typedef struct Compositor_FrameTiming
float m_flCompositorUpdateEndMs;
float m_flCompositorRenderStartMs;
TrackedDevicePose_t m_HmdPose;
- int32_t m_nFidelityLevel;
- uint32_t m_nReprojectionFlags;
} Compositor_FrameTiming;
typedef struct Compositor_CumulativeStats
@@ -1270,6 +1309,7 @@ typedef struct COpenVRContext
intptr_t m_pVRChaperoneSetup; // class vr::IVRChaperoneSetup *
intptr_t m_pVRCompositor; // class vr::IVRCompositor *
intptr_t m_pVROverlay; // class vr::IVROverlay *
+ intptr_t m_pVRResources; // class vr::IVRResources *
intptr_t m_pVRRenderModels; // class vr::IVRRenderModels *
intptr_t m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay *
intptr_t m_pVRSettings; // class vr::IVRSettings *
@@ -1375,6 +1415,10 @@ struct VR_IVRTrackedCamera_FnTable
EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *AcquireVideoStreamingService)(TrackedDeviceIndex_t nDeviceIndex, TrackedCameraHandle_t * pHandle);
EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *ReleaseVideoStreamingService)(TrackedCameraHandle_t hTrackedCamera);
EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamFrameBuffer)(TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pFrameBuffer, uint32_t nFrameBufferSize, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize);
+ EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamTextureSize)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, VRTextureBounds_t * pTextureBounds, uint32_t * pnWidth, uint32_t * pnHeight);
+ EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamTextureD3D11)(TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize);
+ EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamTextureGL)(TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, glUInt_t * pglTextureId, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize);
+ EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *ReleaseVideoStreamTextureGL)(TrackedCameraHandle_t hTrackedCamera, glUInt_t glTextureId);
};
struct VR_IVRApplications_FnTable
@@ -1387,6 +1431,7 @@ struct VR_IVRApplications_FnTable
EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetApplicationKeyByProcessId)(uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchApplication)(char * pchAppKey);
EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchTemplateApplication)(char * pchTemplateAppKey, char * pchNewAppKey, struct AppOverrideKeys_t * pKeys, uint32_t unKeys);
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchApplicationFromMimeType)(char * pchMimeType, char * pchArgs);
EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchDashboardOverlay)(char * pchAppKey);
bool (OPENVR_FNTABLE_CALLTYPE *CancelApplicationLaunch)(char * pchAppKey);
EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *IdentifyApplication)(uint32_t unProcessId, char * pchAppKey);
@@ -1397,6 +1442,11 @@ struct VR_IVRApplications_FnTable
uint64_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyUint64)(char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError);
EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *SetApplicationAutoLaunch)(char * pchAppKey, bool bAutoLaunch);
bool (OPENVR_FNTABLE_CALLTYPE *GetApplicationAutoLaunch)(char * pchAppKey);
+ EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *SetDefaultApplicationForMimeType)(char * pchAppKey, char * pchMimeType);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetDefaultApplicationForMimeType)(char * pchMimeType, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
+ bool (OPENVR_FNTABLE_CALLTYPE *GetApplicationSupportedMimeTypes)(char * pchAppKey, char * pchMimeTypesBuffer, uint32_t unMimeTypesBuffer);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationsThatSupportMimeType)(char * pchMimeType, char * pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationLaunchArguments)(uint32_t unHandle, char * pchArgs, uint32_t unArgs);
EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetStartingApplication)(char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
EVRApplicationTransitionState (OPENVR_FNTABLE_CALLTYPE *GetTransitionState)();
EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *PerformApplicationPrelaunchCheck)(char * pchAppKey);
@@ -1473,8 +1523,6 @@ struct VR_IVRCompositor_FnTable
void (OPENVR_FNTABLE_CALLTYPE *ForceInterleavedReprojectionOn)(bool bOverride);
void (OPENVR_FNTABLE_CALLTYPE *ForceReconnectProcess)();
void (OPENVR_FNTABLE_CALLTYPE *SuspendRendering)(bool bSuspend);
- EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *RequestScreenshot)(EVRScreenshotType type, char * pchDestinationFileName, char * pchVRDestinationFileName);
- EVRScreenshotType (OPENVR_FNTABLE_CALLTYPE *GetCurrentScreenshotType)();
EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetMirrorTextureD3D11)(EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView);
EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetMirrorTextureGL)(EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle);
bool (OPENVR_FNTABLE_CALLTYPE *ReleaseSharedGLTexture)(glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle);
@@ -1501,6 +1549,10 @@ struct VR_IVROverlay_FnTable
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float fAlpha);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float * pfAlpha);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float fTexelAspect);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float fWidthInMeters);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayAutoCurveDistanceRangeInMeters)(VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters);
@@ -1609,6 +1661,12 @@ struct VR_IVRScreenshots_FnTable
EVRScreenshotError (OPENVR_FNTABLE_CALLTYPE *SubmitScreenshot)(ScreenshotHandle_t screenshotHandle, EVRScreenshotType type, char * pchSourcePreviewFilename, char * pchSourceVRFilename);
};
+struct VR_IVRResources_FnTable
+{
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *LoadSharedResource)(char * pchResourceName, char * pchBuffer, uint32_t unBufferLen);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetResourceFullPath)(char * pchResourceName, char * pchResourceTypeDirectory, char * pchPathBuffer, uint32_t unBufferLen);
+};
+
#if 0
// Global entry points
diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h
index 3f2a21d..c5e37e8 100644
--- a/headers/openvr_driver.h
+++ b/headers/openvr_driver.h
@@ -277,6 +277,7 @@ enum ETrackedDeviceProperty
Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType
Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType
Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType
+ Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole
// Properties that are unique to TrackedDeviceClass_TrackingReference
Prop_FieldOfViewLeftDegrees_Float = 4000,
@@ -346,6 +347,7 @@ enum EVRState
VRState_Ready_Alert = 4,
VRState_NotReady = 5,
VRState_Standby = 6,
+ VRState_Ready_Alert_Low = 7,
};
/** The types of events that could be posted (and what the parameters mean for each event type) */
@@ -362,6 +364,7 @@ enum EVREventType
VREvent_EnterStandbyMode = 106,
VREvent_LeaveStandbyMode = 107,
VREvent_TrackedDeviceRoleChanged = 108,
+ VREvent_WatchdogWakeUpRequested = 109,
VREvent_ButtonPress = 200, // data is controller
VREvent_ButtonUnpress = 201, // data is controller
@@ -375,6 +378,7 @@ enum EVREventType
VREvent_FocusLeave = 304, // data is overlay
VREvent_Scroll = 305, // data is mouse
VREvent_TouchPadMove = 306, // data is mouse
+ VREvent_OverlayFocusChanged = 307, // data is overlay, global event
VREvent_InputFocusCaptured = 400, // data is process DEPRECATED
VREvent_InputFocusReleased = 401, // data is process DEPRECATED
@@ -412,6 +416,7 @@ enum EVREventType
VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken
VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken
VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted
+ VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted
VREvent_Notification_Shown = 600,
VREvent_Notification_Hidden = 601,
@@ -453,6 +458,7 @@ enum EVREventType
VREvent_ApplicationTransitionAborted = 1301,
VREvent_ApplicationTransitionNewAppStarted = 1302,
VREvent_ApplicationListUpdated = 1303,
+ VREvent_ApplicationMimeTypeLoad = 1304,
VREvent_Compositor_MirrorWindowShown = 1400,
VREvent_Compositor_MirrorWindowHidden = 1401,
@@ -634,6 +640,17 @@ struct VREvent_Screenshot_t
uint32_t type;
};
+struct VREvent_ScreenshotProgress_t
+{
+ float progress;
+};
+
+struct VREvent_ApplicationLaunch_t
+{
+ uint32_t pid;
+ uint32_t unArgsHandle;
+};
+
/** If you change this you must manually update openvr_interop.cs.py */
typedef union
{
@@ -652,6 +669,8 @@ typedef union
VREvent_TouchPadMove_t touchPadMove;
VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
VREvent_Screenshot_t screenshot;
+ VREvent_ScreenshotProgress_t screenshotProgress;
+ VREvent_ApplicationLaunch_t applicationLaunch;
} VREvent_Data_t;
/** An event posted by the server to all running applications */
@@ -795,6 +814,9 @@ enum EVRApplicationType
VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility
// interfaces (like IVRSettings and IVRApplications) but not hardware.
VRApplication_VRMonitor = 5, // Reserved for vrmonitor
+ VRApplication_SteamWatchdog = 6,// Reserved for Steam
+
+ VRApplication_Max
};
@@ -851,6 +873,14 @@ enum EVRInitError
VRInitError_Init_NotSupportedWithCompositor = 122,
VRInitError_Init_NotAvailableToUtilityApps = 123,
VRInitError_Init_Internal = 124,
+ VRInitError_Init_HmdDriverIdIsNone = 125,
+ VRInitError_Init_HmdNotFoundPresenceFailed = 126,
+ VRInitError_Init_VRMonitorNotFound = 127,
+ VRInitError_Init_VRMonitorStartupFailed = 128,
+ VRInitError_Init_LowPowerWatchdogNotSupported = 129,
+ VRInitError_Init_InvalidApplicationType = 130,
+ VRInitError_Init_NotAvailableToWatchdogApps = 131,
+ VRInitError_Init_WatchdogDisabledInSettings = 132,
VRInitError_Driver_Failed = 200,
VRInitError_Driver_Unknown = 201,
@@ -861,13 +891,20 @@ enum EVRInitError
VRInitError_Driver_NotCalibrated = 206,
VRInitError_Driver_CalibrationInvalid = 207,
VRInitError_Driver_HmdDisplayNotFound = 208,
-
+ VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209,
+ // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons
+ VRInitError_Driver_HmdDriverIdOutOfBounds = 211,
+ VRInitError_Driver_HmdDisplayMirrored = 212,
+
VRInitError_IPC_ServerInitFailed = 300,
VRInitError_IPC_ConnectFailed = 301,
VRInitError_IPC_SharedStateInitFailed = 302,
VRInitError_IPC_CompositorInitFailed = 303,
VRInitError_IPC_MutexInitFailed = 304,
VRInitError_IPC_Failed = 305,
+ VRInitError_IPC_CompositorConnectFailed = 306,
+ VRInitError_IPC_CompositorInvalidConnectResponse = 307,
+ VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308,
VRInitError_Compositor_Failed = 400,
VRInitError_Compositor_D3D11HardwareRequired = 401,
@@ -971,7 +1008,7 @@ static const uint32_t k_unScreenshotHandleInvalid = 0;
#define VR_INTERFACE extern "C" __declspec( dllimport )
#endif
-#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__)
+#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__)
#ifdef VR_API_EXPORT
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
@@ -995,6 +1032,25 @@ static const uint32_t k_unScreenshotHandleInvalid = 0;
#endif // _INCLUDE_VRTYPES_H
+// vrannotation.h
+#ifdef API_GEN
+# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
+#else
+# define VR_CLANG_ATTR(ATTR)
+#endif
+
+#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" )
+#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" )
+#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" )
+#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" )
+#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" )
+#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" )
+#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" )
+#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC )
+#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" )
+#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
@@ -1121,7 +1177,7 @@ namespace vr
virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0;
- virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
+ virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0;
virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0;
@@ -1170,6 +1226,10 @@ namespace vr
static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
+ static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
+ static const char * const k_pch_SteamVR_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
+ static const char * const k_pch_SteamVR_UseGenericGraphcisDevice_Bool = "useGenericGraphicsDevice";
+
//-----------------------------------------------------------------------------
// lighthouse keys
@@ -1205,7 +1265,8 @@ namespace vr
// user interface keys
static const char * const k_pch_UserInterface_Section = "userinterface";
static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
- static const char * const k_pch_UserInterface_EnableScreenshots_Bool = "EnableScreenshots";
+ static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots";
+ static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
//-----------------------------------------------------------------------------
// notification keys
@@ -1543,7 +1604,6 @@ namespace vr
// ivrcameracomponent.h
namespace vr
{
-
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
class ICameraVideoSinkCallback
@@ -1561,8 +1621,6 @@ namespace vr
// ------------------------------------
// Camera Methods
// ------------------------------------
- virtual bool HasCamera() = 0;
- virtual bool GetCameraFirmwareDescription( char *pBuffer, uint32_t nBufferLen ) = 0;
virtual bool GetCameraFrameDimensions( vr::ECameraVideoStreamFormat nVideoStreamFormat, uint32_t *pWidth, uint32_t *pHeight ) = 0;
virtual bool GetCameraFrameBufferingRequirements( int *pDefaultFrameQueueSize, uint32_t *pFrameBufferDataSize ) = 0;
virtual bool SetCameraFrameBuffering( int nFrameBufferCount, void **ppFrameBuffers, uint32_t nFrameBufferDataSize ) = 0;
@@ -1570,19 +1628,14 @@ namespace vr
virtual vr::ECameraVideoStreamFormat GetCameraVideoStreamFormat() = 0;
virtual bool StartVideoStream() = 0;
virtual void StopVideoStream() = 0;
- virtual bool IsVideoStreamActive() = 0;
- virtual float GetVideoStreamElapsedTime() = 0;
+ virtual bool IsVideoStreamActive( bool *pbPaused, float *pflElapsedTime ) = 0;
virtual const vr::CameraVideoStreamFrame_t *GetVideoStreamFrame() = 0;
virtual void ReleaseVideoStreamFrame( const vr::CameraVideoStreamFrame_t *pFrameImage ) = 0;
virtual bool SetAutoExposure( bool bEnable ) = 0;
virtual bool PauseVideoStream() = 0;
virtual bool ResumeVideoStream() = 0;
- virtual bool IsVideoStreamPaused() = 0;
virtual bool GetCameraDistortion( float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0;
- virtual bool GetCameraProjection( float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0;
- virtual bool GetRecommendedCameraUndistortion( uint32_t *pUndistortionWidthPixels, uint32_t *pUndistortionHeightPixels ) = 0;
- virtual bool SetCameraUndistortion( uint32_t nUndistortionWidthPixels, uint32_t nUndistortionHeightPixels ) = 0;
- virtual bool GetCameraFirmwareVersion( uint64_t *pFirmwareVersion ) = 0;
+ virtual bool GetCameraProjection( vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0;
virtual bool SetFrameRate( int nISPFrameRate, int nSensorFrameRate ) = 0;
virtual bool SetCameraVideoSinkCallback( vr::ICameraVideoSinkCallback *pCameraVideoSinkCallback ) = 0;
virtual bool GetCameraCompatibilityMode( vr::ECameraCompatibilityMode *pCameraCompatibilityMode ) = 0;
@@ -1591,7 +1644,7 @@ namespace vr
virtual bool GetCameraIntrinsics( vr::EVRTrackedCameraFrameType eFrameType, HmdVector2_t *pFocalLength, HmdVector2_t *pCenter ) = 0;
};
- static const char *IVRCameraComponent_Version = "IVRCameraComponent_001";
+ static const char *IVRCameraComponent_Version = "IVRCameraComponent_002";
}
// itrackeddevicedriverprovider.h
namespace vr
@@ -1754,9 +1807,20 @@ public:
/** always returns a pointer to a valid interface pointer of IVRSettings */
virtual IVRSettings *GetSettings( const char *pchInterfaceVersion ) = 0;
+
+ /** Client drivers in watchdog mode should call this when they have received a signal from hardware that should
+ * cause SteamVR to start */
+ virtual void WatchdogWakeUp() = 0;
};
+/** Defines the mode that the client driver should start in. */
+enum EClientDriverMode
+{
+ ClientDriverMode_Normal = 0,
+ ClientDriverMode_Watchdog = 1, // client should return VRInitError_Init_LowPowerWatchdogNotSupported if it can't support this mode
+};
+
/** This interface must be implemented in each driver. It will be loaded in vrclient.dll */
class IClientTrackedDeviceProvider
@@ -1772,7 +1836,7 @@ public:
* config files.
* pchDriverInstallDir - The absolute path of the root directory for the driver.
*/
- virtual EVRInitError Init( IDriverLog *pDriverLog, vr::IClientDriverHost *pDriverHost, const char *pchUserDriverConfigDir, const char *pchDriverInstallDir ) = 0;
+ virtual EVRInitError Init( EClientDriverMode eDriverMode, IDriverLog *pDriverLog, vr::IClientDriverHost *pDriverHost, const char *pchUserDriverConfigDir, const char *pchDriverInstallDir ) = 0;
/** cleans up the driver right before it is unloaded */
virtual void Cleanup() = 0;
@@ -1800,7 +1864,7 @@ public:
virtual uint32_t GetMCImage( uint32_t *pImgWidth, uint32_t *pImgHeight, uint32_t *pChannels, void *pDataBuffer, uint32_t unBufferLen ) = 0;
};
-static const char *IClientTrackedDeviceProvider_Version = "IClientTrackedDeviceProvider_003";
+static const char *IClientTrackedDeviceProvider_Version = "IClientTrackedDeviceProvider_004";
}