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-05-24 03:36:52 +0300
committerJoe Ludwig <joe@valvesoftware.com>2016-05-24 03:36:52 +0300
commit35e6fd3e256698df7ec4ac652c50fdb4fd338846 (patch)
treef4aa7081ad63e59f1ec842cb54a8dc19a4c6531f /headers
parent01e9d9a99f9d2230854b960846be8056e6cd9f96 (diff)
SDK Release 0.9.21:
IVRApplications: * Added VREvent_ApplicationListUpdated event. This is sent whenever an application manifest is added, removed, or updated. IVRRenderModels: * Added VREvent_ModelSkinSettingsHaveChanged event. This is sent when the user has selected a new controller or base station/camera replacement model. If your application uses the IVRRenderModel interface to load the user's actual controllers it should reload them after receiving this event. * Added GetRenderModelOriginalPath function. This returns the non-overridden full path to the render model so controller/base station/camera skinning can be avoided if the application requires it. * Added GetRenderModelThumbnailURL function. This returns a URL (usually to a file) for a 4x3 aspect ratio thumbnail image that can be used to preview the render model. * Added GetRenderModelErrorNameFromEnum so applications don't need to provide their own lookup table to interpret these errors. IVRCompositor: * Added cumulative stats tracked per-application and associated accessor. * Added interface to access the mirror textures (per-eye). This is the undistorted view with chaperone and overlays (e.g. dashboard) drawn on top. * Added preliminary support for screenshots. This interface is not stable yet and should be ignored for now. IVRTrackedCamera: * Exposed the initial version. Provides developers access to poll streaming frames from the HMD front facing camera with the associated tracked HMD pose. The image is available as either a pre-corrected distorted view or corrected undistorted view. Added a thin Qt example for getting and showing the camera image/pose. IVROverlay: * Added interface to get size of a texture used by an overlay. This is useful when setting the overlay texture by filename. * Added ability to render side-by-side stereo content and panoramas. Driver Interface: * IVRCameraComponent is still in a development phase. * Added provider method GetInterfaceVersions. This contains all the version numbers of the other interfaces in the driver. Drivers should return vr::k_InterfaceVersions from the version of openvr_driver.h that they were compiled against. * GetTrackedDeviceDriver and FindTrackedDeviceDriver no longer take an interface version. The caller will expect the version of the interface returned in GetInterfaceVesions() HelloVR sample: * Fixed compile error around glDebugMessageCallback that could happen with certain versions of the OpenGL headers. * Fixed compile error from LoadRenderModel->LoadRenderModel_Async name change. * Fixed compile error from LoadTexture->LoadTexture_Async name change. [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 3465769]
Diffstat (limited to 'headers')
-rw-r--r--headers/openvr.h256
-rw-r--r--headers/openvr_api.cs329
-rw-r--r--headers/openvr_api.json309
-rw-r--r--headers/openvr_capi.h140
-rw-r--r--headers/openvr_driver.h125
5 files changed, 1095 insertions, 64 deletions
diff --git a/headers/openvr.h b/headers/openvr.h
index 42c7253..19f4a22 100644
--- a/headers/openvr.h
+++ b/headers/openvr.h
@@ -143,6 +143,7 @@ static const uint32_t k_unMaxDriverDebugResponseSize = 32768;
typedef uint32_t TrackedDeviceIndex_t;
static const uint32_t k_unTrackedDeviceIndex_Hmd = 0;
static const uint32_t k_unMaxTrackedDeviceCount = 16;
+static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE;
static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF;
/** Describes what kind of object is being tracked at a given ID */
@@ -264,6 +265,8 @@ enum ETrackedDeviceProperty
Prop_DisplayHardwareVersion_Uint64 = 2031,
Prop_AudioFirmwareVersion_Uint64 = 2032,
Prop_CameraCompatibilityMode_Int32 = 2033,
+ Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
+ Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
// Properties that are unique to TrackedDeviceClass_Controller
Prop_AttachedDeviceId_String = 3000,
@@ -327,7 +330,11 @@ enum EVRSubmitFlags
Submit_LensDistortionAlreadyApplied = 0x01,
// If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag.
- Submit_GlRenderBuffer = 0x02
+ Submit_GlRenderBuffer = 0x02,
+
+ // If you application receives a screenshot request, submit with this flag to let the compositor this submission
+ // is in the response to the screenshot
+ Submit_Screenshot = 0x04
};
@@ -399,6 +406,12 @@ enum EVREventType
VREvent_OverlaySharedTextureChanged = 513,
VREvent_DashboardGuideButtonDown = 514,
VREvent_DashboardGuideButtonUp = 515,
+ VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot
+
+ // Screenshot API
+ VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot
+ 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_Notification_Shown = 600,
VREvent_Notification_Hidden = 601,
@@ -422,6 +435,8 @@ enum EVREventType
VREvent_BackgroundSettingHasChanged = 850,
VREvent_CameraSettingsHaveChanged = 851,
VREvent_ReprojectionSettingHasChanged = 852,
+ VREvent_ModelSkinSettingsHaveChanged = 853,
+ VREvent_EnvironmentSettingsHaveChanged = 854,
VREvent_StatusUpdate = 900,
@@ -437,6 +452,7 @@ enum EVREventType
VREvent_ApplicationTransitionStarted = 1300,
VREvent_ApplicationTransitionAborted = 1301,
VREvent_ApplicationTransitionNewAppStarted = 1302,
+ VREvent_ApplicationListUpdated = 1303,
VREvent_Compositor_MirrorWindowShown = 1400,
VREvent_Compositor_MirrorWindowHidden = 1401,
@@ -791,6 +807,7 @@ enum EVRNotificationError
VRNotificationError_InvalidNotificationId = 100,
VRNotificationError_NotificationQueueFull = 101,
VRNotificationError_InvalidOverlayHandle = 102,
+ VRNotificationError_SystemWithUserValueAlreadyExists = 103,
};
@@ -868,6 +885,60 @@ enum EVRInitError
VRInitError_Steam_SteamInstallationNotFound = 2000,
};
+enum EVRScreenshotType
+{
+ VRScreenshotType_None = 0,
+ VRScreenshotType_Mono = 1, // left eye only
+ VRScreenshotType_Stereo = 2,
+ VRScreenshotType_Cubemap = 3,
+ VRScreenshotType_StereoPanorama = 4
+};
+
+enum EVRTrackedCameraError
+{
+ VRTrackedCameraError_None = 0,
+ VRTrackedCameraError_OperationFailed = 100,
+ VRTrackedCameraError_InvalidHandle = 101,
+ VRTrackedCameraError_InvalidFrameHeaderVersion = 102,
+ VRTrackedCameraError_OutOfHandles = 103,
+ VRTrackedCameraError_IPCFailure = 104,
+ VRTrackedCameraError_NotSupportedForThisDevice = 105,
+ VRTrackedCameraError_SharedMemoryFailure = 106,
+ VRTrackedCameraError_FrameBufferingFailure = 107,
+ VRTrackedCameraError_StreamSetupFailure = 108,
+ VRTrackedCameraError_InvalidGLTextureId = 109,
+ VRTrackedCameraError_InvalidSharedTextureHandle = 110,
+ VRTrackedCameraError_FailedToGetGLTextureId = 111,
+ VRTrackedCameraError_SharedTextureFailure = 112,
+ VRTrackedCameraError_NoFrameAvailable = 113,
+ VRTrackedCameraError_InvalidArgument = 114,
+ VRTrackedCameraError_InvalidFrameBufferSize = 115,
+};
+
+enum EVRTrackedCameraFrameType
+{
+ VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted.
+ VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly.
+ VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions.
+ MAX_CAMERA_FRAME_TYPES
+};
+
+typedef void* TrackedCameraHandle_t;
+#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0)
+
+struct CameraVideoStreamFrameHeader_t
+{
+ EVRTrackedCameraFrameType eFrameType;
+
+ uint32_t nWidth;
+ uint32_t nHeight;
+ uint32_t nBytesPerPixel;
+
+ uint32_t nFrameSequence;
+
+ TrackedDevicePose_t standingTrackedDevicePose;
+};
+
#pragma pack( pop )
// figure out how to import from the VR API dll
@@ -898,7 +969,7 @@ enum EVRInitError
#define VR_CALLTYPE
#endif
-}
+} // namespace vr
#endif // _INCLUDE_VRTYPES_H
@@ -1433,8 +1504,12 @@ namespace vr
static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel";
static const char * const k_pch_SteamVR_IPD_Float = "ipd";
static const char * const k_pch_SteamVR_Background_String = "background";
+ static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight";
+ static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
+ static const char * const k_pch_SteamVR_Environment_String = "environment";
static const char * const k_pch_SteamVR_GridColor_String = "gridColor";
static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
+ static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage";
static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit";
static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout";
@@ -1462,10 +1537,6 @@ namespace vr
static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees";
static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect";
static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
- static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx";
- static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety";
- static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz";
- static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset";
//-----------------------------------------------------------------------------
// null keys
@@ -1487,6 +1558,7 @@ 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";
//-----------------------------------------------------------------------------
// notification keys
@@ -1549,6 +1621,10 @@ namespace vr
static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice";
static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
+ //-----------------------------------------------------------------------------
+ // model skin keys
+ static const char * const k_pch_modelskin_Section = "modelskins";
+
} // namespace vr
// ivrchaperone.h
@@ -1740,6 +1816,7 @@ namespace vr
enum EVRCompositorError
{
VRCompositorError_None = 0,
+ VRCompositorError_RequestFailed = 1,
VRCompositorError_IncompatibleVersion = 100,
VRCompositorError_DoNotHaveFocus = 101,
VRCompositorError_InvalidTexture = 102,
@@ -1748,6 +1825,7 @@ enum EVRCompositorError
VRCompositorError_TextureUsesUnsupportedFormat = 105,
VRCompositorError_SharedTexturesNotSupported = 106,
VRCompositorError_IndexOutOfRange = 107,
+ VRCompositorError_ScreenshotAlreadyInProgress = 108,
};
const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01;
@@ -1794,9 +1872,37 @@ struct Compositor_FrameTiming
uint32_t m_nReprojectionFlags;
};
+/** Cumulative stats for current application. These are not cleared until a new app connects,
+* but they do stop accumulating once the associated app disconnects. */
+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
-#pragma pack( pop )
+ /** Values recorded at startup before application has fully faded in the first time. */
+ uint32_t m_nNumFramePresentsOnStartup;
+ uint32_t m_nNumDroppedFramesOnStartup;
+ uint32_t m_nNumReprojectedFramesOnStartup;
+ /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes
+ * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */
+ uint32_t m_nNumLoading;
+ uint32_t m_nNumFramePresentsLoading;
+ uint32_t m_nNumDroppedFramesLoading;
+ uint32_t m_nNumReprojectedFramesLoading;
+
+ /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start
+ * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above.
+ * Does not include values recorded during start up or loading. */
+ uint32_t m_nNumTimedOut;
+ uint32_t m_nNumFramePresentsTimedOut;
+ uint32_t m_nNumDroppedFramesTimedOut;
+ uint32_t m_nNumReprojectedFramesTimedOut;
+};
+
+#pragma pack( pop )
/** Allows the application to interact with the compositor */
class IVRCompositor
@@ -1848,6 +1954,9 @@ public:
* Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */
virtual float GetFrameTimeRemaining() = 0;
+ /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */
+ virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0;
+
/** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between
* 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly
* would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */
@@ -1911,9 +2020,35 @@ public:
/** Temporarily suspends rendering (useful for finer control over scene transitions). */
virtual void SuspendRendering( bool bSuspend ) = 0;
+
+ /** Request a screenshot of the requested type, application
+ * will get an event that the screen shot has started. The
+ * application should turn off any stenciling and max out
+ * quality for the next frames and include the Screenshot flag
+ * when calling Submit so that the compositor knows the
+ * screenshot. The application should keep the higher qualtity
+ * and submitted with the ScreenShot flag until gets a
+ * screenshot End event. It can take several frames for a
+ * cubemap to be capture for example. The first file is a
+ * boring 2D view used for preview, the second is the actual
+ * capture of the requested type. They are the same for
+ * VRScreenshotType_Mono */
+ virtual vr::EVRCompositorError RequestScreenshot( vr::EVRScreenshotType type, const char *pchDestinationFileName, const char *pchVRDestinationFileName ) = 0;
+
+ /** Returns the current screenshot type if a screenshot is currently being captured **/
+ 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;
+
+ /** Access to mirror textures from OpenGL. */
+ virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0;
+ virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
+ virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
+ virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
};
-static const char * const IVRCompositor_Version = "IVRCompositor_014";
+static const char * const IVRCompositor_Version = "IVRCompositor_015";
} // namespace vr
@@ -1937,12 +2072,22 @@ namespace vr
// Used for passing graphic data
struct NotificationBitmap_t
{
- void *bytes;
- int32_t width;
- int32_t height;
- int32_t depth;
+ NotificationBitmap_t()
+ : m_pImageData( nullptr )
+ , m_nWidth( 0 )
+ , m_nHeight( 0 )
+ , m_nBytesPerPixel( 0 )
+ {
+ };
+
+ void *m_pImageData;
+ int32_t m_nWidth;
+ int32_t m_nHeight;
+ int32_t m_nBytesPerPixel;
};
+
+/** Be aware that the notification type is used as 'priority' to pick the next notification */
enum EVRNotificationType
{
/** Transient notifications are automatically hidden after a period of time set by the user.
@@ -1952,6 +2097,11 @@ enum EVRNotificationType
/** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification().
* They are used for things like phone calls and alarms that require user interaction. */
EVRNotificationType_Persistent = 1,
+
+ /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID.
+ * If there is already a system notification in the queue with that ID it is not accepted into the queue
+ * to prevent spamming with system notification */
+ EVRNotificationType_Transient_SystemWithUserValue = 2,
};
enum EVRNotificationStyle
@@ -2060,6 +2210,13 @@ namespace vr
// If this is set ownership and render access to the overlay are transferred
// to the new scene process on a call to IVRApplications::LaunchInternalProcess
VROverlayFlags_TransferOwnershipToInternalProcess = 9,
+
+ // If set, renders 50% of the texture in each eye, side by side
+ VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right
+ VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left
+
+ VROverlayFlags_Panorama = 12, // Texture is a panorama
+ VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama
};
struct VROverlayIntersectionParams_t
@@ -2330,6 +2487,8 @@ namespace vr
*/
virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0;
+ /** Get the size of the overlay texture */
+ virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0;
// ----------------------------------------------
// Dashboard Overlay Methods
@@ -2379,7 +2538,7 @@ namespace vr
};
- static const char * const IVROverlay_Version = "IVROverlay_011";
+ static const char * const IVROverlay_Version = "IVROverlay_012";
} // namespace vr
@@ -2414,8 +2573,12 @@ enum EVRRenderModelError
VRRenderModelError_InvalidModel = 301,
VRRenderModelError_NoShapes = 302,
VRRenderModelError_MultipleShapes = 303,
- VRRenderModelError_TooManyIndices = 304,
+ VRRenderModelError_TooManyVertices = 304,
VRRenderModelError_MultipleTextures = 305,
+ VRRenderModelError_BufferTooSmall = 306,
+ VRRenderModelError_NotEnoughNormals = 307,
+ VRRenderModelError_NotEnoughTexCoords = 308,
+
VRRenderModelError_InvalidTexture = 400,
};
@@ -2557,6 +2720,17 @@ public:
/** Returns true if the render model has a component with the specified name */
virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0;
+
+ /** Returns the URL of the thumbnail image for this rendermodel */
+ virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0;
+
+ /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model
+ * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the
+ * model. */
+ virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0;
+
+ /** Returns a string for a render model error */
+ virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0;
};
static const char * const IVRRenderModels_Version = "IVRRenderModels_005";
@@ -2592,6 +2766,46 @@ namespace vr
}
+
+// ivrtrackedcamera.h
+namespace vr
+{
+
+class IVRTrackedCamera
+{
+public:
+ /** Returns a string for an error */
+ virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0;
+
+ /** For convenience, same as tracked property request Prop_HasCamera_Bool */
+ virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0;
+
+ /** Gets size of the image frame. */
+ virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0;
+
+ virtual vr::EVRTrackedCameraError GetCameraIntrinisics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0;
+
+ virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0;
+
+ /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client.
+ * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays.
+ * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller.
+ * The camera may go inactive due to lack of active consumers or headset idleness. */
+ virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0;
+ virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0;
+
+ /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel.
+ * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows
+ * the caller to determine if the frame as advanced per the frame header sequence.
+ * 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;
+};
+
+static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_002";
+
+} // namespace vr
+
// End
#endif // _OPENVR_API
@@ -2780,6 +2994,17 @@ namespace vr
return m_pVRApplications;
}
+ IVRTrackedCamera *VRTrackedCamera()
+ {
+ CheckClear();
+ if ( m_pVRTrackedCamera == nullptr )
+ {
+ EVRInitError eError;
+ m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError );
+ }
+ return m_pVRTrackedCamera;
+ }
+
private:
IVRSystem *m_pVRSystem;
IVRChaperone *m_pVRChaperone;
@@ -2790,6 +3015,7 @@ namespace vr
IVRExtendedDisplay *m_pVRExtendedDisplay;
IVRSettings *m_pVRSettings;
IVRApplications *m_pVRApplications;
+ IVRTrackedCamera *m_pVRTrackedCamera;
};
inline COpenVRContext &OpenVRInternal_ModuleContext()
@@ -2807,6 +3033,7 @@ namespace vr
inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); }
inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); }
inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); }
+ inline IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera() { return OpenVRInternal_ModuleContext().VRTrackedCamera(); }
inline void COpenVRContext::Clear()
{
@@ -2819,6 +3046,7 @@ namespace vr
m_pVRExtendedDisplay = nullptr;
m_pVRSettings = nullptr;
m_pVRApplications = nullptr;
+ m_pVRTrackedCamera = nullptr;
}
VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType );
diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs
index f31b0cd..d4264ee 100644
--- a/headers/openvr_api.cs
+++ b/headers/openvr_api.cs
@@ -258,6 +258,51 @@ public struct IVRExtendedDisplay
}
[StructLayout(LayoutKind.Sequential)]
+public struct IVRTrackedCamera
+{
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate IntPtr _GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraError);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetCameraErrorNameFromEnum GetCameraErrorNameFromEnum;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRTrackedCameraError _HasCamera(uint nDeviceIndex, ref bool pHasCamera);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _HasCamera HasCamera;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRTrackedCameraError _GetCameraFrameSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref uint pnWidth, ref uint pnHeight, ref uint pnFrameBufferSize);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetCameraFrameSize GetCameraFrameSize;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRTrackedCameraError _GetCameraIntrinisics(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetCameraIntrinisics GetCameraIntrinisics;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRTrackedCameraError _GetCameraProjection(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ref HmdMatrix44_t pProjection);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetCameraProjection GetCameraProjection;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRTrackedCameraError _AcquireVideoStreamingService(uint nDeviceIndex, IntPtr pHandle);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _AcquireVideoStreamingService AcquireVideoStreamingService;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRTrackedCameraError _ReleaseVideoStreamingService(IntPtr hTrackedCamera);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _ReleaseVideoStreamingService ReleaseVideoStreamingService;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRTrackedCameraError _GetVideoStreamFrameBuffer(IntPtr hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pFrameBuffer, uint nFrameBufferSize, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetVideoStreamFrameBuffer GetVideoStreamFrameBuffer;
+
+}
+
+[StructLayout(LayoutKind.Sequential)]
public struct IVRApplications
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
@@ -586,6 +631,11 @@ public struct IVRCompositor
internal _GetFrameTimeRemaining GetFrameTimeRemaining;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate void _GetCumulativeStats(ref Compositor_CumulativeStats pStats, uint nStatsSizeInBytes);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetCumulativeStats GetCumulativeStats;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _FadeToColor(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _FadeToColor FadeToColor;
@@ -680,6 +730,41 @@ public struct IVRCompositor
[MarshalAs(UnmanagedType.FunctionPtr)]
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;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRCompositorError _GetMirrorTextureGL(EVREye eEye, ref uint pglTextureId, IntPtr pglSharedTextureHandle);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetMirrorTextureGL GetMirrorTextureGL;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate bool _ReleaseSharedGLTexture(uint glTextureId, IntPtr glSharedTextureHandle);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _ReleaseSharedGLTexture ReleaseSharedGLTexture;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate void _LockGLSharedTextureForAccess(IntPtr glSharedTextureHandle);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _LockGLSharedTextureForAccess LockGLSharedTextureForAccess;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate void _UnlockGLSharedTextureForAccess(IntPtr glSharedTextureHandle);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _UnlockGLSharedTextureForAccess UnlockGLSharedTextureForAccess;
+
}
[StructLayout(LayoutKind.Sequential)]
@@ -956,6 +1041,11 @@ public struct IVROverlay
internal _ReleaseNativeOverlayHandle ReleaseNativeOverlayHandle;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _GetOverlayTextureSize(ulong ulOverlayHandle, ref uint pWidth, ref uint pHeight);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetOverlayTextureSize GetOverlayTextureSize;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _CreateDashboardOverlay(string pchOverlayKey, string pchOverlayFriendlyName, ref ulong pMainHandle, ref ulong pThumbnailHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CreateDashboardOverlay CreateDashboardOverlay;
@@ -1100,6 +1190,21 @@ public struct IVRRenderModels
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _RenderModelHasComponent RenderModelHasComponent;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate uint _GetRenderModelThumbnailURL(string pchRenderModelName, System.Text.StringBuilder pchThumbnailURL, uint unThumbnailURLLen, ref EVRRenderModelError peError);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetRenderModelThumbnailURL GetRenderModelThumbnailURL;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate uint _GetRenderModelOriginalPath(string pchRenderModelName, System.Text.StringBuilder pchOriginalPath, uint unOriginalPathLen, ref EVRRenderModelError peError);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetRenderModelOriginalPath GetRenderModelOriginalPath;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate IntPtr _GetRenderModelErrorNameFromEnum(EVRRenderModelError error);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetRenderModelErrorNameFromEnum GetRenderModelErrorNameFromEnum;
+
}
[StructLayout(LayoutKind.Sequential)]
@@ -1444,6 +1549,60 @@ public class CVRExtendedDisplay
}
+public class CVRTrackedCamera
+{
+ IVRTrackedCamera FnTable;
+ internal CVRTrackedCamera(IntPtr pInterface)
+ {
+ FnTable = (IVRTrackedCamera)Marshal.PtrToStructure(pInterface, typeof(IVRTrackedCamera));
+ }
+ public string GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraError)
+ {
+ IntPtr result = FnTable.GetCameraErrorNameFromEnum(eCameraError);
+ return (string) Marshal.PtrToStructure(result, typeof(string));
+ }
+ public EVRTrackedCameraError HasCamera(uint nDeviceIndex,ref bool pHasCamera)
+ {
+ pHasCamera = false;
+ EVRTrackedCameraError result = FnTable.HasCamera(nDeviceIndex,ref pHasCamera);
+ return result;
+ }
+ public EVRTrackedCameraError GetCameraFrameSize(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref uint pnWidth,ref uint pnHeight,ref uint pnFrameBufferSize)
+ {
+ pnWidth = 0;
+ pnHeight = 0;
+ pnFrameBufferSize = 0;
+ EVRTrackedCameraError result = FnTable.GetCameraFrameSize(nDeviceIndex,eFrameType,ref pnWidth,ref pnHeight,ref pnFrameBufferSize);
+ return result;
+ }
+ public EVRTrackedCameraError GetCameraIntrinisics(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref HmdVector2_t pFocalLength,ref HmdVector2_t pCenter)
+ {
+ EVRTrackedCameraError result = FnTable.GetCameraIntrinisics(nDeviceIndex,eFrameType,ref pFocalLength,ref pCenter);
+ return result;
+ }
+ public EVRTrackedCameraError GetCameraProjection(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,float flZNear,float flZFar,ref HmdMatrix44_t pProjection)
+ {
+ EVRTrackedCameraError result = FnTable.GetCameraProjection(nDeviceIndex,eFrameType,flZNear,flZFar,ref pProjection);
+ return result;
+ }
+ public EVRTrackedCameraError AcquireVideoStreamingService(uint nDeviceIndex,IntPtr pHandle)
+ {
+ EVRTrackedCameraError result = FnTable.AcquireVideoStreamingService(nDeviceIndex,pHandle);
+ return result;
+ }
+ public EVRTrackedCameraError ReleaseVideoStreamingService(IntPtr hTrackedCamera)
+ {
+ EVRTrackedCameraError result = FnTable.ReleaseVideoStreamingService(hTrackedCamera);
+ return result;
+ }
+ public EVRTrackedCameraError GetVideoStreamFrameBuffer(IntPtr hTrackedCamera,EVRTrackedCameraFrameType eFrameType,IntPtr pFrameBuffer,uint nFrameBufferSize,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize)
+ {
+ EVRTrackedCameraError result = FnTable.GetVideoStreamFrameBuffer(hTrackedCamera,eFrameType,pFrameBuffer,nFrameBufferSize,ref pFrameHeader,nFrameHeaderSize);
+ return result;
+ }
+}
+
+
public class CVRApplications
{
IVRApplications FnTable;
@@ -1794,6 +1953,10 @@ public class CVRCompositor
float result = FnTable.GetFrameTimeRemaining();
return result;
}
+ public void GetCumulativeStats(ref Compositor_CumulativeStats pStats,uint nStatsSizeInBytes)
+ {
+ FnTable.GetCumulativeStats(ref pStats,nStatsSizeInBytes);
+ }
public void FadeToColor(float fSeconds,float fRed,float fGreen,float fBlue,float fAlpha,bool bBackground)
{
FnTable.FadeToColor(fSeconds,fRed,fGreen,fBlue,fAlpha,bBackground);
@@ -1877,6 +2040,40 @@ 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);
+ return result;
+ }
+ public EVRCompositorError GetMirrorTextureGL(EVREye eEye,ref uint pglTextureId,IntPtr pglSharedTextureHandle)
+ {
+ pglTextureId = 0;
+ EVRCompositorError result = FnTable.GetMirrorTextureGL(eEye,ref pglTextureId,pglSharedTextureHandle);
+ return result;
+ }
+ public bool ReleaseSharedGLTexture(uint glTextureId,IntPtr glSharedTextureHandle)
+ {
+ bool result = FnTable.ReleaseSharedGLTexture(glTextureId,glSharedTextureHandle);
+ return result;
+ }
+ public void LockGLSharedTextureForAccess(IntPtr glSharedTextureHandle)
+ {
+ FnTable.LockGLSharedTextureForAccess(glSharedTextureHandle);
+ }
+ public void UnlockGLSharedTextureForAccess(IntPtr glSharedTextureHandle)
+ {
+ FnTable.UnlockGLSharedTextureForAccess(glSharedTextureHandle);
+ }
}
@@ -2174,6 +2371,13 @@ public class CVROverlay
EVROverlayError result = FnTable.ReleaseNativeOverlayHandle(ulOverlayHandle,pNativeTextureHandle);
return result;
}
+ public EVROverlayError GetOverlayTextureSize(ulong ulOverlayHandle,ref uint pWidth,ref uint pHeight)
+ {
+ pWidth = 0;
+ pHeight = 0;
+ EVROverlayError result = FnTable.GetOverlayTextureSize(ulOverlayHandle,ref pWidth,ref pHeight);
+ return result;
+ }
public EVROverlayError CreateDashboardOverlay(string pchOverlayKey,string pchOverlayFriendlyName,ref ulong pMainHandle,ref ulong pThumbnailHandle)
{
pMainHandle = 0;
@@ -2320,6 +2524,21 @@ public class CVRRenderModels
bool result = FnTable.RenderModelHasComponent(pchRenderModelName,pchComponentName);
return result;
}
+ public uint GetRenderModelThumbnailURL(string pchRenderModelName,System.Text.StringBuilder pchThumbnailURL,uint unThumbnailURLLen,ref EVRRenderModelError peError)
+ {
+ uint result = FnTable.GetRenderModelThumbnailURL(pchRenderModelName,pchThumbnailURL,unThumbnailURLLen,ref peError);
+ return result;
+ }
+ public uint GetRenderModelOriginalPath(string pchRenderModelName,System.Text.StringBuilder pchOriginalPath,uint unOriginalPathLen,ref EVRRenderModelError peError)
+ {
+ uint result = FnTable.GetRenderModelOriginalPath(pchRenderModelName,pchOriginalPath,unOriginalPathLen,ref peError);
+ return result;
+ }
+ public string GetRenderModelErrorNameFromEnum(EVRRenderModelError error)
+ {
+ IntPtr result = FnTable.GetRenderModelErrorNameFromEnum(error);
+ return (string) Marshal.PtrToStructure(result, typeof(string));
+ }
}
@@ -2541,6 +2760,8 @@ public enum ETrackedDeviceProperty
Prop_DisplayHardwareVersion_Uint64 = 2031,
Prop_AudioFirmwareVersion_Uint64 = 2032,
Prop_CameraCompatibilityMode_Int32 = 2033,
+ Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
+ Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
Prop_AttachedDeviceId_String = 3000,
Prop_SupportedButtons_Uint64 = 3001,
Prop_Axis0Type_Int32 = 3002,
@@ -2576,6 +2797,7 @@ public enum EVRSubmitFlags
Submit_Default = 0,
Submit_LensDistortionAlreadyApplied = 1,
Submit_GlRenderBuffer = 2,
+ Submit_Screenshot = 4,
}
public enum EVRState
{
@@ -2636,6 +2858,10 @@ public enum EVREventType
VREvent_OverlaySharedTextureChanged = 513,
VREvent_DashboardGuideButtonDown = 514,
VREvent_DashboardGuideButtonUp = 515,
+ VREvent_ScreenshotTriggered = 516,
+ VREvent_RequestScreenshot = 520,
+ VREvent_ScreenshotTaken = 521,
+ VREvent_ScreenshotFailed = 522,
VREvent_Notification_Shown = 600,
VREvent_Notification_Hidden = 601,
VREvent_Notification_BeginInteraction = 602,
@@ -2654,6 +2880,8 @@ public enum EVREventType
VREvent_BackgroundSettingHasChanged = 850,
VREvent_CameraSettingsHaveChanged = 851,
VREvent_ReprojectionSettingHasChanged = 852,
+ VREvent_ModelSkinSettingsHaveChanged = 853,
+ VREvent_EnvironmentSettingsHaveChanged = 854,
VREvent_StatusUpdate = 900,
VREvent_MCImageUpdated = 1000,
VREvent_FirmwareUpdateStarted = 1100,
@@ -2664,6 +2892,7 @@ public enum EVREventType
VREvent_ApplicationTransitionStarted = 1300,
VREvent_ApplicationTransitionAborted = 1301,
VREvent_ApplicationTransitionNewAppStarted = 1302,
+ VREvent_ApplicationListUpdated = 1303,
VREvent_Compositor_MirrorWindowShown = 1400,
VREvent_Compositor_MirrorWindowHidden = 1401,
VREvent_Compositor_ChaperoneBoundsShown = 1410,
@@ -2776,6 +3005,7 @@ public enum EVRNotificationError
InvalidNotificationId = 100,
NotificationQueueFull = 101,
InvalidOverlayHandle = 102,
+ SystemWithUserValueAlreadyExists = 103,
}
public enum EVRInitError
{
@@ -2840,6 +3070,41 @@ public enum EVRInitError
VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
Steam_SteamInstallationNotFound = 2000,
}
+public enum EVRScreenshotType
+{
+ None = 0,
+ Mono = 1,
+ Stereo = 2,
+ Cubemap = 3,
+ StereoPanorama = 4,
+}
+public enum EVRTrackedCameraError
+{
+ None = 0,
+ OperationFailed = 100,
+ InvalidHandle = 101,
+ InvalidFrameHeaderVersion = 102,
+ OutOfHandles = 103,
+ IPCFailure = 104,
+ NotSupportedForThisDevice = 105,
+ SharedMemoryFailure = 106,
+ FrameBufferingFailure = 107,
+ StreamSetupFailure = 108,
+ InvalidGLTextureId = 109,
+ InvalidSharedTextureHandle = 110,
+ FailedToGetGLTextureId = 111,
+ SharedTextureFailure = 112,
+ NoFrameAvailable = 113,
+ InvalidArgument = 114,
+ InvalidFrameBufferSize = 115,
+}
+public enum EVRTrackedCameraFrameType
+{
+ Distorted = 0,
+ Undistorted = 1,
+ MaximumUndistorted = 2,
+ MAX_CAMERA_FRAME_TYPES = 3,
+}
public enum EVRApplicationError
{
None = 0,
@@ -2912,6 +3177,7 @@ public enum EChaperoneImportFlags
public enum EVRCompositorError
{
None = 0,
+ RequestFailed = 1,
IncompatibleVersion = 100,
DoNotHaveFocus = 101,
InvalidTexture = 102,
@@ -2920,6 +3186,7 @@ public enum EVRCompositorError
TextureUsesUnsupportedFormat = 105,
SharedTexturesNotSupported = 106,
IndexOutOfRange = 107,
+ ScreenshotAlreadyInProgress = 108,
}
public enum VROverlayInputMethod
{
@@ -2945,6 +3212,10 @@ public enum VROverlayFlags
SendVRTouchpadEvents = 7,
ShowTouchPadScrollWheel = 8,
TransferOwnershipToInternalProcess = 9,
+ SideBySide_Parallel = 10,
+ SideBySide_Crossed = 11,
+ Panorama = 12,
+ StereoPanorama = 13,
}
public enum EGamepadTextInputMode
{
@@ -2974,8 +3245,11 @@ public enum EVRRenderModelError
InvalidModel = 301,
NoShapes = 302,
MultipleShapes = 303,
- TooManyIndices = 304,
+ TooManyVertices = 304,
MultipleTextures = 305,
+ BufferTooSmall = 306,
+ NotEnoughNormals = 307,
+ NotEnoughTexCoords = 308,
InvalidTexture = 400,
}
public enum EVRComponentProperty
@@ -2990,6 +3264,7 @@ public enum EVRNotificationType
{
Transient = 0,
Persistent = 1,
+ Transient_SystemWithUserValue = 2,
}
public enum EVRNotificationStyle
{
@@ -3263,6 +3538,15 @@ public enum EVRSettingsError
public float gridScale;
public HmdMatrix44_t transform;
}
+[StructLayout(LayoutKind.Sequential)] public struct CameraVideoStreamFrameHeader_t
+{
+ public EVRTrackedCameraFrameType eFrameType;
+ public uint nWidth;
+ public uint nHeight;
+ public uint nBytesPerPixel;
+ public uint nFrameSequence;
+ public TrackedDevicePose_t standingTrackedDevicePose;
+}
[StructLayout(LayoutKind.Sequential)] public struct AppOverrideKeys_t
{
public IntPtr pchKey; // const char *
@@ -3294,6 +3578,24 @@ public enum EVRSettingsError
public int m_nFidelityLevel;
public uint m_nReprojectionFlags;
}
+[StructLayout(LayoutKind.Sequential)] public struct Compositor_CumulativeStats
+{
+ public uint m_nPid;
+ public uint m_nNumFramePresents;
+ public uint m_nNumDroppedFrames;
+ public uint m_nNumReprojectedFrames;
+ public uint m_nNumFramePresentsOnStartup;
+ public uint m_nNumDroppedFramesOnStartup;
+ public uint m_nNumReprojectedFramesOnStartup;
+ public uint m_nNumLoading;
+ public uint m_nNumFramePresentsLoading;
+ public uint m_nNumDroppedFramesLoading;
+ public uint m_nNumReprojectedFramesLoading;
+ public uint m_nNumTimedOut;
+ public uint m_nNumFramePresentsTimedOut;
+ public uint m_nNumDroppedFramesTimedOut;
+ public uint m_nNumReprojectedFramesTimedOut;
+}
[StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionParams_t
{
public HmdVector3_t vSource;
@@ -3341,10 +3643,10 @@ public enum EVRSettingsError
}
[StructLayout(LayoutKind.Sequential)] public struct NotificationBitmap_t
{
- public IntPtr bytes; // void *
- public int width;
- public int height;
- public int depth;
+ public IntPtr m_pImageData; // void *
+ public int m_nWidth;
+ public int m_nHeight;
+ public int m_nBytesPerPixel;
}
[StructLayout(LayoutKind.Sequential)] public struct COpenVRContext
{
@@ -3357,6 +3659,7 @@ public enum EVRSettingsError
public IntPtr m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay *
public IntPtr m_pVRSettings; // class vr::IVRSettings *
public IntPtr m_pVRApplications; // class vr::IVRApplications *
+ public IntPtr m_pVRTrackedCamera; // class vr::IVRTrackedCamera *
}
public class OpenVR
@@ -3406,21 +3709,23 @@ public class OpenVR
public const uint k_unMaxDriverDebugResponseSize = 32768;
public const uint k_unTrackedDeviceIndex_Hmd = 0;
public const uint k_unMaxTrackedDeviceCount = 16;
+ public const uint k_unTrackedDeviceIndexOther = 4294967294;
public const uint k_unTrackedDeviceIndexInvalid = 4294967295;
public const uint k_unMaxPropertyStringSize = 32768;
public const uint k_unControllerStateAxisCount = 5;
public const ulong k_ulOverlayHandleInvalid = 0;
public const string IVRSystem_Version = "IVRSystem_012";
public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
+ public const string IVRTrackedCamera_Version = "IVRTrackedCamera_002";
public const uint k_unMaxApplicationKeyLength = 128;
public const string IVRApplications_Version = "IVRApplications_005";
public const string IVRChaperone_Version = "IVRChaperone_003";
public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
- public const string IVRCompositor_Version = "IVRCompositor_014";
+ public const string IVRCompositor_Version = "IVRCompositor_015";
public const uint k_unVROverlayMaxKeyLength = 128;
public const uint k_unVROverlayMaxNameLength = 128;
public const uint k_unMaxOverlayCount = 32;
- public const string IVROverlay_Version = "IVROverlay_011";
+ public const string IVROverlay_Version = "IVROverlay_012";
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";
@@ -3444,8 +3749,12 @@ public class OpenVR
public const string k_pch_SteamVR_LogLevel_Int32 = "loglevel";
public const string k_pch_SteamVR_IPD_Float = "ipd";
public const string k_pch_SteamVR_Background_String = "background";
+ public const string k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight";
+ public const string k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
+ public const string k_pch_SteamVR_Environment_String = "environment";
public const string k_pch_SteamVR_GridColor_String = "gridColor";
public const string k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
+ public const string k_pch_SteamVR_ShowStage_Bool = "showStage";
public const string k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
public const string k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit";
public const string k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout";
@@ -3468,10 +3777,6 @@ public class OpenVR
public const string k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees";
public const string k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect";
public const string k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
- public const string k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx";
- public const string k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety";
- public const string k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz";
- public const string k_pch_Lighthouse_HeadingOffset_Float = "headingoffset";
public const string k_pch_Null_Section = "driver_null";
public const string k_pch_Null_EnableNullDriver_Bool = "enable";
public const string k_pch_Null_SerialNumber_String = "serialNumber";
@@ -3486,6 +3791,7 @@ 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_Notifications_Section = "notifications";
public const string k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
public const string k_pch_Keyboard_Section = "keyboard";
@@ -3529,6 +3835,7 @@ public class OpenVR
public const string k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice";
public const string k_pch_audio_OffRecordDevice_String = "offRecordDevice";
public const string k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
+ public const string k_pch_modelskin_Section = "modelskins";
static uint VRToken { get; set; }
diff --git a/headers/openvr_api.json b/headers/openvr_api.json
index 1f6a76c..e64e945 100644
--- a/headers/openvr_api.json
+++ b/headers/openvr_api.json
@@ -5,6 +5,7 @@
,{"typedef": "vr::VREvent_Data_t","type": "union VREvent_Data_t"}
,{"typedef": "vr::VRControllerState_t","type": "struct vr::VRControllerState001_t"}
,{"typedef": "vr::VROverlayHandle_t","type": "uint64_t"}
+,{"typedef": "vr::TrackedCameraHandle_t","type": "void *"}
,{"typedef": "vr::VRComponentProperties","type": "uint32_t"}
,{"typedef": "vr::TextureID_t","type": "int32_t"}
,{"typedef": "vr::VRNotificationId","type": "uint32_t"}
@@ -130,6 +131,8 @@
,{"name": "Prop_DisplayHardwareVersion_Uint64","value": "2031"}
,{"name": "Prop_AudioFirmwareVersion_Uint64","value": "2032"}
,{"name": "Prop_CameraCompatibilityMode_Int32","value": "2033"}
+ ,{"name": "Prop_ScreenshotHorizontalFieldOfViewDegrees_Float","value": "2034"}
+ ,{"name": "Prop_ScreenshotVerticalFieldOfViewDegrees_Float","value": "2035"}
,{"name": "Prop_AttachedDeviceId_String","value": "3000"}
,{"name": "Prop_SupportedButtons_Uint64","value": "3001"}
,{"name": "Prop_Axis0Type_Int32","value": "3002"}
@@ -163,6 +166,7 @@
{"name": "Submit_Default","value": "0"}
,{"name": "Submit_LensDistortionAlreadyApplied","value": "1"}
,{"name": "Submit_GlRenderBuffer","value": "2"}
+ ,{"name": "Submit_Screenshot","value": "4"}
]}
, {"enumname": "vr::EVRState","values": [
{"name": "VRState_Undefined","value": "-1"}
@@ -221,6 +225,10 @@
,{"name": "VREvent_OverlaySharedTextureChanged","value": "513"}
,{"name": "VREvent_DashboardGuideButtonDown","value": "514"}
,{"name": "VREvent_DashboardGuideButtonUp","value": "515"}
+ ,{"name": "VREvent_ScreenshotTriggered","value": "516"}
+ ,{"name": "VREvent_RequestScreenshot","value": "520"}
+ ,{"name": "VREvent_ScreenshotTaken","value": "521"}
+ ,{"name": "VREvent_ScreenshotFailed","value": "522"}
,{"name": "VREvent_Notification_Shown","value": "600"}
,{"name": "VREvent_Notification_Hidden","value": "601"}
,{"name": "VREvent_Notification_BeginInteraction","value": "602"}
@@ -239,6 +247,8 @@
,{"name": "VREvent_BackgroundSettingHasChanged","value": "850"}
,{"name": "VREvent_CameraSettingsHaveChanged","value": "851"}
,{"name": "VREvent_ReprojectionSettingHasChanged","value": "852"}
+ ,{"name": "VREvent_ModelSkinSettingsHaveChanged","value": "853"}
+ ,{"name": "VREvent_EnvironmentSettingsHaveChanged","value": "854"}
,{"name": "VREvent_StatusUpdate","value": "900"}
,{"name": "VREvent_MCImageUpdated","value": "1000"}
,{"name": "VREvent_FirmwareUpdateStarted","value": "1100"}
@@ -249,6 +259,7 @@
,{"name": "VREvent_ApplicationTransitionStarted","value": "1300"}
,{"name": "VREvent_ApplicationTransitionAborted","value": "1301"}
,{"name": "VREvent_ApplicationTransitionNewAppStarted","value": "1302"}
+ ,{"name": "VREvent_ApplicationListUpdated","value": "1303"}
,{"name": "VREvent_Compositor_MirrorWindowShown","value": "1400"}
,{"name": "VREvent_Compositor_MirrorWindowHidden","value": "1401"}
,{"name": "VREvent_Compositor_ChaperoneBoundsShown","value": "1410"}
@@ -351,6 +362,7 @@
,{"name": "VRNotificationError_InvalidNotificationId","value": "100"}
,{"name": "VRNotificationError_NotificationQueueFull","value": "101"}
,{"name": "VRNotificationError_InvalidOverlayHandle","value": "102"}
+ ,{"name": "VRNotificationError_SystemWithUserValueAlreadyExists","value": "103"}
]}
, {"enumname": "vr::EVRInitError","values": [
{"name": "VRInitError_None","value": "0"}
@@ -414,6 +426,38 @@
,{"name": "VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck","value": "1113"}
,{"name": "VRInitError_Steam_SteamInstallationNotFound","value": "2000"}
]}
+, {"enumname": "vr::EVRScreenshotType","values": [
+ {"name": "VRScreenshotType_None","value": "0"}
+ ,{"name": "VRScreenshotType_Mono","value": "1"}
+ ,{"name": "VRScreenshotType_Stereo","value": "2"}
+ ,{"name": "VRScreenshotType_Cubemap","value": "3"}
+ ,{"name": "VRScreenshotType_StereoPanorama","value": "4"}
+]}
+, {"enumname": "vr::EVRTrackedCameraError","values": [
+ {"name": "VRTrackedCameraError_None","value": "0"}
+ ,{"name": "VRTrackedCameraError_OperationFailed","value": "100"}
+ ,{"name": "VRTrackedCameraError_InvalidHandle","value": "101"}
+ ,{"name": "VRTrackedCameraError_InvalidFrameHeaderVersion","value": "102"}
+ ,{"name": "VRTrackedCameraError_OutOfHandles","value": "103"}
+ ,{"name": "VRTrackedCameraError_IPCFailure","value": "104"}
+ ,{"name": "VRTrackedCameraError_NotSupportedForThisDevice","value": "105"}
+ ,{"name": "VRTrackedCameraError_SharedMemoryFailure","value": "106"}
+ ,{"name": "VRTrackedCameraError_FrameBufferingFailure","value": "107"}
+ ,{"name": "VRTrackedCameraError_StreamSetupFailure","value": "108"}
+ ,{"name": "VRTrackedCameraError_InvalidGLTextureId","value": "109"}
+ ,{"name": "VRTrackedCameraError_InvalidSharedTextureHandle","value": "110"}
+ ,{"name": "VRTrackedCameraError_FailedToGetGLTextureId","value": "111"}
+ ,{"name": "VRTrackedCameraError_SharedTextureFailure","value": "112"}
+ ,{"name": "VRTrackedCameraError_NoFrameAvailable","value": "113"}
+ ,{"name": "VRTrackedCameraError_InvalidArgument","value": "114"}
+ ,{"name": "VRTrackedCameraError_InvalidFrameBufferSize","value": "115"}
+]}
+, {"enumname": "vr::EVRTrackedCameraFrameType","values": [
+ {"name": "VRTrackedCameraFrameType_Distorted","value": "0"}
+ ,{"name": "VRTrackedCameraFrameType_Undistorted","value": "1"}
+ ,{"name": "VRTrackedCameraFrameType_MaximumUndistorted","value": "2"}
+ ,{"name": "MAX_CAMERA_FRAME_TYPES","value": "3"}
+]}
, {"enumname": "vr::EVRApplicationError","values": [
{"name": "VRApplicationError_None","value": "0"}
,{"name": "VRApplicationError_AppKeyAlreadyExists","value": "100"}
@@ -479,6 +523,7 @@
]}
, {"enumname": "vr::EVRCompositorError","values": [
{"name": "VRCompositorError_None","value": "0"}
+ ,{"name": "VRCompositorError_RequestFailed","value": "1"}
,{"name": "VRCompositorError_IncompatibleVersion","value": "100"}
,{"name": "VRCompositorError_DoNotHaveFocus","value": "101"}
,{"name": "VRCompositorError_InvalidTexture","value": "102"}
@@ -487,6 +532,7 @@
,{"name": "VRCompositorError_TextureUsesUnsupportedFormat","value": "105"}
,{"name": "VRCompositorError_SharedTexturesNotSupported","value": "106"}
,{"name": "VRCompositorError_IndexOutOfRange","value": "107"}
+ ,{"name": "VRCompositorError_ScreenshotAlreadyInProgress","value": "108"}
]}
, {"enumname": "vr::VROverlayInputMethod","values": [
{"name": "VROverlayInputMethod_None","value": "0"}
@@ -509,6 +555,10 @@
,{"name": "VROverlayFlags_SendVRTouchpadEvents","value": "7"}
,{"name": "VROverlayFlags_ShowTouchPadScrollWheel","value": "8"}
,{"name": "VROverlayFlags_TransferOwnershipToInternalProcess","value": "9"}
+ ,{"name": "VROverlayFlags_SideBySide_Parallel","value": "10"}
+ ,{"name": "VROverlayFlags_SideBySide_Crossed","value": "11"}
+ ,{"name": "VROverlayFlags_Panorama","value": "12"}
+ ,{"name": "VROverlayFlags_StereoPanorama","value": "13"}
]}
, {"enumname": "vr::EGamepadTextInputMode","values": [
{"name": "k_EGamepadTextInputModeNormal","value": "0"}
@@ -534,8 +584,11 @@
,{"name": "VRRenderModelError_InvalidModel","value": "301"}
,{"name": "VRRenderModelError_NoShapes","value": "302"}
,{"name": "VRRenderModelError_MultipleShapes","value": "303"}
- ,{"name": "VRRenderModelError_TooManyIndices","value": "304"}
+ ,{"name": "VRRenderModelError_TooManyVertices","value": "304"}
,{"name": "VRRenderModelError_MultipleTextures","value": "305"}
+ ,{"name": "VRRenderModelError_BufferTooSmall","value": "306"}
+ ,{"name": "VRRenderModelError_NotEnoughNormals","value": "307"}
+ ,{"name": "VRRenderModelError_NotEnoughTexCoords","value": "308"}
,{"name": "VRRenderModelError_InvalidTexture","value": "400"}
]}
, {"enumname": "vr::EVRComponentProperty","values": [
@@ -548,6 +601,7 @@
, {"enumname": "vr::EVRNotificationType","values": [
{"name": "EVRNotificationType_Transient","value": "0"}
,{"name": "EVRNotificationType_Persistent","value": "1"}
+ ,{"name": "EVRNotificationType_Transient_SystemWithUserValue","value": "2"}
]}
, {"enumname": "vr::EVRNotificationStyle","values": [
{"name": "EVRNotificationStyle_None","value": "0"}
@@ -572,6 +626,8 @@
,{
"constname": "k_unMaxTrackedDeviceCount","consttype": "const uint32_t", "constval": "16"}
,{
+ "constname": "k_unTrackedDeviceIndexOther","consttype": "const uint32_t", "constval": "4294967294"}
+,{
"constname": "k_unTrackedDeviceIndexInvalid","consttype": "const uint32_t", "constval": "4294967295"}
,{
"constname": "k_unMaxPropertyStringSize","consttype": "const uint32_t", "constval": "32768"}
@@ -584,6 +640,8 @@
,{
"constname": "IVRExtendedDisplay_Version","consttype": "const char *const", "constval": "IVRExtendedDisplay_001"}
,{
+ "constname": "IVRTrackedCamera_Version","consttype": "const char *const", "constval": "IVRTrackedCamera_002"}
+,{
"constname": "k_unMaxApplicationKeyLength","consttype": "const uint32_t", "constval": "128"}
,{
"constname": "IVRApplications_Version","consttype": "const char *const", "constval": "IVRApplications_005"}
@@ -592,7 +650,7 @@
,{
"constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_005"}
,{
- "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_014"}
+ "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_015"}
,{
"constname": "k_unVROverlayMaxKeyLength","consttype": "const uint32_t", "constval": "128"}
,{
@@ -600,7 +658,7 @@
,{
"constname": "k_unMaxOverlayCount","consttype": "const uint32_t", "constval": "32"}
,{
- "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_011"}
+ "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_012"}
,{
"constname": "k_pch_Controller_Component_GDC2015","consttype": "const char *const", "constval": "gdc2015"}
,{
@@ -648,10 +706,18 @@
,{
"constname": "k_pch_SteamVR_Background_String","consttype": "const char *const", "constval": "background"}
,{
+ "constname": "k_pch_SteamVR_BackgroundCameraHeight_Float","consttype": "const char *const", "constval": "backgroundCameraHeight"}
+,{
+ "constname": "k_pch_SteamVR_BackgroundDomeRadius_Float","consttype": "const char *const", "constval": "backgroundDomeRadius"}
+,{
+ "constname": "k_pch_SteamVR_Environment_String","consttype": "const char *const", "constval": "environment"}
+,{
"constname": "k_pch_SteamVR_GridColor_String","consttype": "const char *const", "constval": "gridColor"}
,{
"constname": "k_pch_SteamVR_PlayAreaColor_String","consttype": "const char *const", "constval": "playAreaColor"}
,{
+ "constname": "k_pch_SteamVR_ShowStage_Bool","consttype": "const char *const", "constval": "showStage"}
+,{
"constname": "k_pch_SteamVR_ActivateMultipleDrivers_Bool","consttype": "const char *const", "constval": "activateMultipleDrivers"}
,{
"constname": "k_pch_SteamVR_PowerOffOnExit_Bool","consttype": "const char *const", "constval": "powerOffOnExit"}
@@ -696,14 +762,6 @@
,{
"constname": "k_pch_Lighthouse_DBHistory_Bool","consttype": "const char *const", "constval": "dbhistory"}
,{
- "constname": "k_pch_Lighthouse_OriginOffsetX_Float","consttype": "const char *const", "constval": "originoffsetx"}
-,{
- "constname": "k_pch_Lighthouse_OriginOffsetY_Float","consttype": "const char *const", "constval": "originoffsety"}
-,{
- "constname": "k_pch_Lighthouse_OriginOffsetZ_Float","consttype": "const char *const", "constval": "originoffsetz"}
-,{
- "constname": "k_pch_Lighthouse_HeadingOffset_Float","consttype": "const char *const", "constval": "headingoffset"}
-,{
"constname": "k_pch_Null_Section","consttype": "const char *const", "constval": "driver_null"}
,{
"constname": "k_pch_Null_EnableNullDriver_Bool","consttype": "const char *const", "constval": "enable"}
@@ -732,6 +790,8 @@
,{
"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_Notifications_Section","consttype": "const char *const", "constval": "notifications"}
,{
"constname": "k_pch_Notifications_DoNotDisturb_Bool","consttype": "const char *const", "constval": "DoNotDisturb"}
@@ -817,6 +877,8 @@
"constname": "k_pch_audio_OffRecordDevice_String","consttype": "const char *const", "constval": "offRecordDevice"}
,{
"constname": "k_pch_audio_VIVEHDMIGain","consttype": "const char *const", "constval": "viveHDMIGain"}
+,{
+ "constname": "k_pch_modelskin_Section","consttype": "const char *const", "constval": "modelskins"}
],
"structs":[{"struct": "vr::HmdMatrix34_t","fields": [
{ "fieldname": "m", "fieldtype": "float [3][4]"}]}
@@ -954,6 +1016,13 @@
{ "fieldname": "gridWidth", "fieldtype": "float"},
{ "fieldname": "gridScale", "fieldtype": "float"},
{ "fieldname": "transform", "fieldtype": "struct vr::HmdMatrix44_t"}]}
+,{"struct": "vr::CameraVideoStreamFrameHeader_t","fields": [
+{ "fieldname": "eFrameType", "fieldtype": "enum vr::EVRTrackedCameraFrameType"},
+{ "fieldname": "nWidth", "fieldtype": "uint32_t"},
+{ "fieldname": "nHeight", "fieldtype": "uint32_t"},
+{ "fieldname": "nBytesPerPixel", "fieldtype": "uint32_t"},
+{ "fieldname": "nFrameSequence", "fieldtype": "uint32_t"},
+{ "fieldname": "standingTrackedDevicePose", "fieldtype": "struct vr::TrackedDevicePose_t"}]}
,{"struct": "vr::AppOverrideKeys_t","fields": [
{ "fieldname": "pchKey", "fieldtype": "const char *"},
{ "fieldname": "pchValue", "fieldtype": "const char *"}]}
@@ -981,6 +1050,22 @@
{ "fieldname": "m_HmdPose", "fieldtype": "vr::TrackedDevicePose_t"},
{ "fieldname": "m_nFidelityLevel", "fieldtype": "int32_t"},
{ "fieldname": "m_nReprojectionFlags", "fieldtype": "uint32_t"}]}
+,{"struct": "vr::Compositor_CumulativeStats","fields": [
+{ "fieldname": "m_nPid", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumDroppedFrames", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumReprojectedFrames", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumFramePresentsOnStartup", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumDroppedFramesOnStartup", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumReprojectedFramesOnStartup", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumLoading", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumFramePresentsLoading", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumDroppedFramesLoading", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumReprojectedFramesLoading", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumTimedOut", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumFramePresentsTimedOut", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumDroppedFramesTimedOut", "fieldtype": "uint32_t"},
+{ "fieldname": "m_nNumReprojectedFramesTimedOut", "fieldtype": "uint32_t"}]}
,{"struct": "vr::VROverlayIntersectionParams_t","fields": [
{ "fieldname": "vSource", "fieldtype": "struct vr::HmdVector3_t"},
{ "fieldname": "vDirection", "fieldtype": "struct vr::HmdVector3_t"},
@@ -1011,10 +1096,10 @@
,{"struct": "vr::RenderModel_ControllerMode_State_t","fields": [
{ "fieldname": "bScrollWheelVisible", "fieldtype": "_Bool"}]}
,{"struct": "vr::NotificationBitmap_t","fields": [
-{ "fieldname": "bytes", "fieldtype": "void *"},
-{ "fieldname": "width", "fieldtype": "int32_t"},
-{ "fieldname": "height", "fieldtype": "int32_t"},
-{ "fieldname": "depth", "fieldtype": "int32_t"}]}
+{ "fieldname": "m_pImageData", "fieldtype": "void *"},
+{ "fieldname": "m_nWidth", "fieldtype": "int32_t"},
+{ "fieldname": "m_nHeight", "fieldtype": "int32_t"},
+{ "fieldname": "m_nBytesPerPixel", "fieldtype": "int32_t"}]}
,{"struct": "vr::COpenVRContext","fields": [
{ "fieldname": "m_pVRSystem", "fieldtype": "class vr::IVRSystem *"},
{ "fieldname": "m_pVRChaperone", "fieldtype": "class vr::IVRChaperone *"},
@@ -1024,7 +1109,8 @@
{ "fieldname": "m_pVRRenderModels", "fieldtype": "class vr::IVRRenderModels *"},
{ "fieldname": "m_pVRExtendedDisplay", "fieldtype": "class vr::IVRExtendedDisplay *"},
{ "fieldname": "m_pVRSettings", "fieldtype": "class vr::IVRSettings *"},
-{ "fieldname": "m_pVRApplications", "fieldtype": "class vr::IVRApplications *"}]}
+{ "fieldname": "m_pVRApplications", "fieldtype": "class vr::IVRApplications *"},
+{ "fieldname": "m_pVRTrackedCamera", "fieldtype": "class vr::IVRTrackedCamera *"}]}
],
"methods":[{
"classname": "vr::IVRSystem",
@@ -1427,6 +1513,88 @@
]
}
,{
+ "classname": "vr::IVRTrackedCamera",
+ "methodname": "GetCameraErrorNameFromEnum",
+ "returntype": "const char *",
+ "params": [
+{ "paramname": "eCameraError" ,"paramtype": "vr::EVRTrackedCameraError"}
+ ]
+}
+,{
+ "classname": "vr::IVRTrackedCamera",
+ "methodname": "HasCamera",
+ "returntype": "vr::EVRTrackedCameraError",
+ "params": [
+{ "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"},
+{ "paramname": "pHasCamera" ,"paramtype": "bool *"}
+ ]
+}
+,{
+ "classname": "vr::IVRTrackedCamera",
+ "methodname": "GetCameraFrameSize",
+ "returntype": "vr::EVRTrackedCameraError",
+ "params": [
+{ "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"},
+{ "paramname": "eFrameType" ,"paramtype": "vr::EVRTrackedCameraFrameType"},
+{ "paramname": "pnWidth" ,"paramtype": "uint32_t *"},
+{ "paramname": "pnHeight" ,"paramtype": "uint32_t *"},
+{ "paramname": "pnFrameBufferSize" ,"paramtype": "uint32_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVRTrackedCamera",
+ "methodname": "GetCameraIntrinisics",
+ "returntype": "vr::EVRTrackedCameraError",
+ "params": [
+{ "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"},
+{ "paramname": "eFrameType" ,"paramtype": "vr::EVRTrackedCameraFrameType"},
+{ "paramname": "pFocalLength" ,"paramtype": "vr::HmdVector2_t *"},
+{ "paramname": "pCenter" ,"paramtype": "vr::HmdVector2_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVRTrackedCamera",
+ "methodname": "GetCameraProjection",
+ "returntype": "vr::EVRTrackedCameraError",
+ "params": [
+{ "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"},
+{ "paramname": "eFrameType" ,"paramtype": "vr::EVRTrackedCameraFrameType"},
+{ "paramname": "flZNear" ,"paramtype": "float"},
+{ "paramname": "flZFar" ,"paramtype": "float"},
+{ "paramname": "pProjection" ,"paramtype": "vr::HmdMatrix44_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVRTrackedCamera",
+ "methodname": "AcquireVideoStreamingService",
+ "returntype": "vr::EVRTrackedCameraError",
+ "params": [
+{ "paramname": "nDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"},
+{ "paramname": "pHandle" ,"paramtype": "vr::TrackedCameraHandle_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVRTrackedCamera",
+ "methodname": "ReleaseVideoStreamingService",
+ "returntype": "vr::EVRTrackedCameraError",
+ "params": [
+{ "paramname": "hTrackedCamera" ,"paramtype": "vr::TrackedCameraHandle_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRTrackedCamera",
+ "methodname": "GetVideoStreamFrameBuffer",
+ "returntype": "vr::EVRTrackedCameraError",
+ "params": [
+{ "paramname": "hTrackedCamera" ,"paramtype": "vr::TrackedCameraHandle_t"},
+{ "paramname": "eFrameType" ,"paramtype": "vr::EVRTrackedCameraFrameType"},
+{ "paramname": "pFrameBuffer" ,"paramtype": "void *"},
+{ "paramname": "nFrameBufferSize" ,"paramtype": "uint32_t"},
+{ "paramname": "pFrameHeader" ,"paramtype": "vr::CameraVideoStreamFrameHeader_t *"},
+{ "paramname": "nFrameHeaderSize" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
"classname": "vr::IVRApplications",
"methodname": "AddApplicationManifest",
"returntype": "vr::EVRApplicationError",
@@ -1939,6 +2107,15 @@
}
,{
"classname": "vr::IVRCompositor",
+ "methodname": "GetCumulativeStats",
+ "returntype": "void",
+ "params": [
+{ "paramname": "pStats" ,"paramtype": "struct vr::Compositor_CumulativeStats *"},
+{ "paramname": "nStatsSizeInBytes" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRCompositor",
"methodname": "FadeToColor",
"returntype": "void",
"params": [
@@ -2055,6 +2232,66 @@
]
}
,{
+ "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": [
+{ "paramname": "eEye" ,"paramtype": "vr::EVREye"},
+{ "paramname": "pD3D11DeviceOrResource" ,"paramtype": "void *"},
+{ "paramname": "ppD3D11ShaderResourceView" ,"paramtype": "void **"}
+ ]
+}
+,{
+ "classname": "vr::IVRCompositor",
+ "methodname": "GetMirrorTextureGL",
+ "returntype": "vr::EVRCompositorError",
+ "params": [
+{ "paramname": "eEye" ,"paramtype": "vr::EVREye"},
+{ "paramname": "pglTextureId" ,"paramtype": "vr::glUInt_t *"},
+{ "paramname": "pglSharedTextureHandle" ,"paramtype": "vr::glSharedTextureHandle_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVRCompositor",
+ "methodname": "ReleaseSharedGLTexture",
+ "returntype": "bool",
+ "params": [
+{ "paramname": "glTextureId" ,"paramtype": "vr::glUInt_t"},
+{ "paramname": "glSharedTextureHandle" ,"paramtype": "vr::glSharedTextureHandle_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRCompositor",
+ "methodname": "LockGLSharedTextureForAccess",
+ "returntype": "void",
+ "params": [
+{ "paramname": "glSharedTextureHandle" ,"paramtype": "vr::glSharedTextureHandle_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRCompositor",
+ "methodname": "UnlockGLSharedTextureForAccess",
+ "returntype": "void",
+ "params": [
+{ "paramname": "glSharedTextureHandle" ,"paramtype": "vr::glSharedTextureHandle_t"}
+ ]
+}
+,{
"classname": "vr::IVROverlay",
"methodname": "FindOverlay",
"returntype": "vr::EVROverlayError",
@@ -2561,6 +2798,16 @@
}
,{
"classname": "vr::IVROverlay",
+ "methodname": "GetOverlayTextureSize",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "pWidth" ,"paramtype": "uint32_t *"},
+{ "paramname": "pHeight" ,"paramtype": "uint32_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
"methodname": "CreateDashboardOverlay",
"returntype": "vr::EVROverlayError",
"params": [
@@ -2812,6 +3059,36 @@
]
}
,{
+ "classname": "vr::IVRRenderModels",
+ "methodname": "GetRenderModelThumbnailURL",
+ "returntype": "uint32_t",
+ "params": [
+{ "paramname": "pchRenderModelName" ,"paramtype": "const char *"},
+{ "paramname": "pchThumbnailURL" ,"out_string": " " ,"paramtype": "char *"},
+{ "paramname": "unThumbnailURLLen" ,"paramtype": "uint32_t"},
+{ "paramname": "peError" ,"paramtype": "vr::EVRRenderModelError *"}
+ ]
+}
+,{
+ "classname": "vr::IVRRenderModels",
+ "methodname": "GetRenderModelOriginalPath",
+ "returntype": "uint32_t",
+ "params": [
+{ "paramname": "pchRenderModelName" ,"paramtype": "const char *"},
+{ "paramname": "pchOriginalPath" ,"out_string": " " ,"paramtype": "char *"},
+{ "paramname": "unOriginalPathLen" ,"paramtype": "uint32_t"},
+{ "paramname": "peError" ,"paramtype": "vr::EVRRenderModelError *"}
+ ]
+}
+,{
+ "classname": "vr::IVRRenderModels",
+ "methodname": "GetRenderModelErrorNameFromEnum",
+ "returntype": "const char *",
+ "params": [
+{ "paramname": "error" ,"paramtype": "vr::EVRRenderModelError"}
+ ]
+}
+,{
"classname": "vr::IVRNotifications",
"methodname": "CreateNotification",
"returntype": "vr::EVRNotificationError",
diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h
index e5d0772..3f1f58a 100644
--- a/headers/openvr_capi.h
+++ b/headers/openvr_capi.h
@@ -55,21 +55,23 @@ static const unsigned int k_unTrackingStringSize = 32;
static const unsigned int k_unMaxDriverDebugResponseSize = 32768;
static const unsigned int k_unTrackedDeviceIndex_Hmd = 0;
static const unsigned int k_unMaxTrackedDeviceCount = 16;
+static const unsigned int k_unTrackedDeviceIndexOther = 4294967294;
static const unsigned int k_unTrackedDeviceIndexInvalid = 4294967295;
static const unsigned int k_unMaxPropertyStringSize = 32768;
static const unsigned int k_unControllerStateAxisCount = 5;
static const unsigned long k_ulOverlayHandleInvalid = 0;
static const char * IVRSystem_Version = "IVRSystem_012";
static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
+static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_002";
static const unsigned int k_unMaxApplicationKeyLength = 128;
static const char * IVRApplications_Version = "IVRApplications_005";
static const char * IVRChaperone_Version = "IVRChaperone_003";
static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
-static const char * IVRCompositor_Version = "IVRCompositor_014";
+static const char * IVRCompositor_Version = "IVRCompositor_015";
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_011";
+static const char * IVROverlay_Version = "IVROverlay_012";
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";
@@ -93,8 +95,12 @@ static const char * k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemBu
static const char * k_pch_SteamVR_LogLevel_Int32 = "loglevel";
static const char * k_pch_SteamVR_IPD_Float = "ipd";
static const char * k_pch_SteamVR_Background_String = "background";
+static const char * k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight";
+static const char * k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
+static const char * k_pch_SteamVR_Environment_String = "environment";
static const char * k_pch_SteamVR_GridColor_String = "gridColor";
static const char * k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
+static const char * k_pch_SteamVR_ShowStage_Bool = "showStage";
static const char * k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
static const char * k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit";
static const char * k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout";
@@ -117,10 +123,6 @@ static const char * k_pch_Lighthouse_LighthouseName_String = "lighthousename";
static const char * k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees";
static const char * k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect";
static const char * k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
-static const char * k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx";
-static const char * k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety";
-static const char * k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz";
-static const char * k_pch_Lighthouse_HeadingOffset_Float = "headingoffset";
static const char * k_pch_Null_Section = "driver_null";
static const char * k_pch_Null_EnableNullDriver_Bool = "enable";
static const char * k_pch_Null_SerialNumber_String = "serialNumber";
@@ -135,6 +137,7 @@ 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_Notifications_Section = "notifications";
static const char * k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
static const char * k_pch_Keyboard_Section = "keyboard";
@@ -178,6 +181,7 @@ static const char * k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirro
static const char * k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice";
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";
// OpenVR Enums
@@ -301,6 +305,8 @@ typedef enum ETrackedDeviceProperty
ETrackedDeviceProperty_Prop_DisplayHardwareVersion_Uint64 = 2031,
ETrackedDeviceProperty_Prop_AudioFirmwareVersion_Uint64 = 2032,
ETrackedDeviceProperty_Prop_CameraCompatibilityMode_Int32 = 2033,
+ ETrackedDeviceProperty_Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
+ ETrackedDeviceProperty_Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000,
ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001,
ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002,
@@ -338,6 +344,7 @@ typedef enum EVRSubmitFlags
EVRSubmitFlags_Submit_Default = 0,
EVRSubmitFlags_Submit_LensDistortionAlreadyApplied = 1,
EVRSubmitFlags_Submit_GlRenderBuffer = 2,
+ EVRSubmitFlags_Submit_Screenshot = 4,
} EVRSubmitFlags;
typedef enum EVRState
@@ -400,6 +407,10 @@ typedef enum EVREventType
EVREventType_VREvent_OverlaySharedTextureChanged = 513,
EVREventType_VREvent_DashboardGuideButtonDown = 514,
EVREventType_VREvent_DashboardGuideButtonUp = 515,
+ EVREventType_VREvent_ScreenshotTriggered = 516,
+ EVREventType_VREvent_RequestScreenshot = 520,
+ EVREventType_VREvent_ScreenshotTaken = 521,
+ EVREventType_VREvent_ScreenshotFailed = 522,
EVREventType_VREvent_Notification_Shown = 600,
EVREventType_VREvent_Notification_Hidden = 601,
EVREventType_VREvent_Notification_BeginInteraction = 602,
@@ -418,6 +429,8 @@ typedef enum EVREventType
EVREventType_VREvent_BackgroundSettingHasChanged = 850,
EVREventType_VREvent_CameraSettingsHaveChanged = 851,
EVREventType_VREvent_ReprojectionSettingHasChanged = 852,
+ EVREventType_VREvent_ModelSkinSettingsHaveChanged = 853,
+ EVREventType_VREvent_EnvironmentSettingsHaveChanged = 854,
EVREventType_VREvent_StatusUpdate = 900,
EVREventType_VREvent_MCImageUpdated = 1000,
EVREventType_VREvent_FirmwareUpdateStarted = 1100,
@@ -428,6 +441,7 @@ typedef enum EVREventType
EVREventType_VREvent_ApplicationTransitionStarted = 1300,
EVREventType_VREvent_ApplicationTransitionAborted = 1301,
EVREventType_VREvent_ApplicationTransitionNewAppStarted = 1302,
+ EVREventType_VREvent_ApplicationListUpdated = 1303,
EVREventType_VREvent_Compositor_MirrorWindowShown = 1400,
EVREventType_VREvent_Compositor_MirrorWindowHidden = 1401,
EVREventType_VREvent_Compositor_ChaperoneBoundsShown = 1410,
@@ -550,6 +564,7 @@ typedef enum EVRNotificationError
EVRNotificationError_VRNotificationError_InvalidNotificationId = 100,
EVRNotificationError_VRNotificationError_NotificationQueueFull = 101,
EVRNotificationError_VRNotificationError_InvalidOverlayHandle = 102,
+ EVRNotificationError_VRNotificationError_SystemWithUserValueAlreadyExists = 103,
} EVRNotificationError;
typedef enum EVRInitError
@@ -616,6 +631,44 @@ typedef enum EVRInitError
EVRInitError_VRInitError_Steam_SteamInstallationNotFound = 2000,
} EVRInitError;
+typedef enum EVRScreenshotType
+{
+ EVRScreenshotType_VRScreenshotType_None = 0,
+ EVRScreenshotType_VRScreenshotType_Mono = 1,
+ EVRScreenshotType_VRScreenshotType_Stereo = 2,
+ EVRScreenshotType_VRScreenshotType_Cubemap = 3,
+ EVRScreenshotType_VRScreenshotType_StereoPanorama = 4,
+} EVRScreenshotType;
+
+typedef enum EVRTrackedCameraError
+{
+ EVRTrackedCameraError_VRTrackedCameraError_None = 0,
+ EVRTrackedCameraError_VRTrackedCameraError_OperationFailed = 100,
+ EVRTrackedCameraError_VRTrackedCameraError_InvalidHandle = 101,
+ EVRTrackedCameraError_VRTrackedCameraError_InvalidFrameHeaderVersion = 102,
+ EVRTrackedCameraError_VRTrackedCameraError_OutOfHandles = 103,
+ EVRTrackedCameraError_VRTrackedCameraError_IPCFailure = 104,
+ EVRTrackedCameraError_VRTrackedCameraError_NotSupportedForThisDevice = 105,
+ EVRTrackedCameraError_VRTrackedCameraError_SharedMemoryFailure = 106,
+ EVRTrackedCameraError_VRTrackedCameraError_FrameBufferingFailure = 107,
+ EVRTrackedCameraError_VRTrackedCameraError_StreamSetupFailure = 108,
+ EVRTrackedCameraError_VRTrackedCameraError_InvalidGLTextureId = 109,
+ EVRTrackedCameraError_VRTrackedCameraError_InvalidSharedTextureHandle = 110,
+ EVRTrackedCameraError_VRTrackedCameraError_FailedToGetGLTextureId = 111,
+ EVRTrackedCameraError_VRTrackedCameraError_SharedTextureFailure = 112,
+ EVRTrackedCameraError_VRTrackedCameraError_NoFrameAvailable = 113,
+ EVRTrackedCameraError_VRTrackedCameraError_InvalidArgument = 114,
+ EVRTrackedCameraError_VRTrackedCameraError_InvalidFrameBufferSize = 115,
+} EVRTrackedCameraError;
+
+typedef enum EVRTrackedCameraFrameType
+{
+ EVRTrackedCameraFrameType_VRTrackedCameraFrameType_Distorted = 0,
+ EVRTrackedCameraFrameType_VRTrackedCameraFrameType_Undistorted = 1,
+ EVRTrackedCameraFrameType_VRTrackedCameraFrameType_MaximumUndistorted = 2,
+ EVRTrackedCameraFrameType_MAX_CAMERA_FRAME_TYPES = 3,
+} EVRTrackedCameraFrameType;
+
typedef enum EVRApplicationError
{
EVRApplicationError_VRApplicationError_None = 0,
@@ -694,6 +747,7 @@ typedef enum EChaperoneImportFlags
typedef enum EVRCompositorError
{
EVRCompositorError_VRCompositorError_None = 0,
+ EVRCompositorError_VRCompositorError_RequestFailed = 1,
EVRCompositorError_VRCompositorError_IncompatibleVersion = 100,
EVRCompositorError_VRCompositorError_DoNotHaveFocus = 101,
EVRCompositorError_VRCompositorError_InvalidTexture = 102,
@@ -702,6 +756,7 @@ typedef enum EVRCompositorError
EVRCompositorError_VRCompositorError_TextureUsesUnsupportedFormat = 105,
EVRCompositorError_VRCompositorError_SharedTexturesNotSupported = 106,
EVRCompositorError_VRCompositorError_IndexOutOfRange = 107,
+ EVRCompositorError_VRCompositorError_ScreenshotAlreadyInProgress = 108,
} EVRCompositorError;
typedef enum VROverlayInputMethod
@@ -730,6 +785,10 @@ typedef enum VROverlayFlags
VROverlayFlags_SendVRTouchpadEvents = 7,
VROverlayFlags_ShowTouchPadScrollWheel = 8,
VROverlayFlags_TransferOwnershipToInternalProcess = 9,
+ VROverlayFlags_SideBySide_Parallel = 10,
+ VROverlayFlags_SideBySide_Crossed = 11,
+ VROverlayFlags_Panorama = 12,
+ VROverlayFlags_StereoPanorama = 13,
} VROverlayFlags;
typedef enum EGamepadTextInputMode
@@ -763,8 +822,11 @@ typedef enum EVRRenderModelError
EVRRenderModelError_VRRenderModelError_InvalidModel = 301,
EVRRenderModelError_VRRenderModelError_NoShapes = 302,
EVRRenderModelError_VRRenderModelError_MultipleShapes = 303,
- EVRRenderModelError_VRRenderModelError_TooManyIndices = 304,
+ EVRRenderModelError_VRRenderModelError_TooManyVertices = 304,
EVRRenderModelError_VRRenderModelError_MultipleTextures = 305,
+ EVRRenderModelError_VRRenderModelError_BufferTooSmall = 306,
+ EVRRenderModelError_VRRenderModelError_NotEnoughNormals = 307,
+ EVRRenderModelError_VRRenderModelError_NotEnoughTexCoords = 308,
EVRRenderModelError_VRRenderModelError_InvalidTexture = 400,
} EVRRenderModelError;
@@ -781,6 +843,7 @@ typedef enum EVRNotificationType
{
EVRNotificationType_Transient = 0,
EVRNotificationType_Persistent = 1,
+ EVRNotificationType_Transient_SystemWithUserValue = 2,
} EVRNotificationType;
typedef enum EVRNotificationStyle
@@ -811,6 +874,7 @@ typedef int32_t glInt_t;
typedef uint32_t glUInt_t;
typedef uint32_t TrackedDeviceIndex_t;
typedef uint64_t VROverlayHandle_t;
+typedef void * TrackedCameraHandle_t;
typedef uint32_t VRComponentProperties;
typedef int32_t TextureID_t;
typedef uint32_t VRNotificationId;
@@ -1044,6 +1108,16 @@ typedef struct Compositor_OverlaySettings
struct HmdMatrix44_t transform;
} Compositor_OverlaySettings;
+typedef struct CameraVideoStreamFrameHeader_t
+{
+ enum EVRTrackedCameraFrameType eFrameType;
+ uint32_t nWidth;
+ uint32_t nHeight;
+ uint32_t nBytesPerPixel;
+ uint32_t nFrameSequence;
+ struct TrackedDevicePose_t standingTrackedDevicePose;
+} CameraVideoStreamFrameHeader_t;
+
typedef struct AppOverrideKeys_t
{
char * pchKey; // const char *
@@ -1077,6 +1151,25 @@ typedef struct Compositor_FrameTiming
uint32_t m_nReprojectionFlags;
} Compositor_FrameTiming;
+typedef struct Compositor_CumulativeStats
+{
+ uint32_t m_nPid;
+ uint32_t m_nNumFramePresents;
+ uint32_t m_nNumDroppedFrames;
+ uint32_t m_nNumReprojectedFrames;
+ uint32_t m_nNumFramePresentsOnStartup;
+ uint32_t m_nNumDroppedFramesOnStartup;
+ uint32_t m_nNumReprojectedFramesOnStartup;
+ uint32_t m_nNumLoading;
+ uint32_t m_nNumFramePresentsLoading;
+ uint32_t m_nNumDroppedFramesLoading;
+ uint32_t m_nNumReprojectedFramesLoading;
+ uint32_t m_nNumTimedOut;
+ uint32_t m_nNumFramePresentsTimedOut;
+ uint32_t m_nNumDroppedFramesTimedOut;
+ uint32_t m_nNumReprojectedFramesTimedOut;
+} Compositor_CumulativeStats;
+
typedef struct VROverlayIntersectionParams_t
{
struct HmdVector3_t vSource;
@@ -1129,10 +1222,10 @@ typedef struct RenderModel_ControllerMode_State_t
typedef struct NotificationBitmap_t
{
- void * bytes; // void *
- int32_t width;
- int32_t height;
- int32_t depth;
+ void * m_pImageData; // void *
+ int32_t m_nWidth;
+ int32_t m_nHeight;
+ int32_t m_nBytesPerPixel;
} NotificationBitmap_t;
typedef struct COpenVRContext
@@ -1146,6 +1239,7 @@ typedef struct COpenVRContext
intptr_t m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay *
intptr_t m_pVRSettings; // class vr::IVRSettings *
intptr_t m_pVRApplications; // class vr::IVRApplications *
+ intptr_t m_pVRTrackedCamera; // class vr::IVRTrackedCamera *
} COpenVRContext;
@@ -1235,6 +1329,18 @@ struct VR_IVRExtendedDisplay_FnTable
void (OPENVR_FNTABLE_CALLTYPE *GetDXGIOutputInfo)(int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex);
};
+struct VR_IVRTrackedCamera_FnTable
+{
+ char * (OPENVR_FNTABLE_CALLTYPE *GetCameraErrorNameFromEnum)(EVRTrackedCameraError eCameraError);
+ EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *HasCamera)(TrackedDeviceIndex_t nDeviceIndex, bool * pHasCamera);
+ EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraFrameSize)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, uint32_t * pnWidth, uint32_t * pnHeight, uint32_t * pnFrameBufferSize);
+ EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraIntrinisics)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, HmdVector2_t * pFocalLength, HmdVector2_t * pCenter);
+ EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraProjection)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, HmdMatrix44_t * pProjection);
+ 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);
+};
+
struct VR_IVRApplications_FnTable
{
EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *AddApplicationManifest)(char * pchApplicationManifestFullPath, bool bTemporary);
@@ -1311,6 +1417,7 @@ struct VR_IVRCompositor_FnTable
void (OPENVR_FNTABLE_CALLTYPE *PostPresentHandoff)();
bool (OPENVR_FNTABLE_CALLTYPE *GetFrameTiming)(struct Compositor_FrameTiming * pTiming, uint32_t unFramesAgo);
float (OPENVR_FNTABLE_CALLTYPE *GetFrameTimeRemaining)();
+ void (OPENVR_FNTABLE_CALLTYPE *GetCumulativeStats)(struct Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes);
void (OPENVR_FNTABLE_CALLTYPE *FadeToColor)(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground);
void (OPENVR_FNTABLE_CALLTYPE *FadeGrid)(float fSeconds, bool bFadeIn);
EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SetSkyboxOverride)(struct Texture_t * pTextures, uint32_t unTextureCount);
@@ -1330,6 +1437,13 @@ 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);
+ void (OPENVR_FNTABLE_CALLTYPE *LockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle);
+ void (OPENVR_FNTABLE_CALLTYPE *UnlockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle);
};
struct VR_IVROverlay_FnTable
@@ -1388,6 +1502,7 @@ struct VR_IVROverlay_FnTable
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFromFile)(VROverlayHandle_t ulOverlayHandle, char * pchFilePath);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, EGraphicsAPIConvention * pAPI, EColorSpace * pColorSpace);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ReleaseNativeOverlayHandle)(VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureSize)(VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateDashboardOverlay)(char * pchOverlayKey, char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle);
bool (OPENVR_FNTABLE_CALLTYPE *IsDashboardVisible)();
bool (OPENVR_FNTABLE_CALLTYPE *IsActiveDashboardOverlay)(VROverlayHandle_t ulOverlayHandle);
@@ -1420,6 +1535,9 @@ struct VR_IVRRenderModels_FnTable
uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentRenderModelName)(char * pchRenderModelName, char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen);
bool (OPENVR_FNTABLE_CALLTYPE *GetComponentState)(char * pchRenderModelName, char * pchComponentName, VRControllerState_t * pControllerState, struct RenderModel_ControllerMode_State_t * pState, struct RenderModel_ComponentState_t * pComponentState);
bool (OPENVR_FNTABLE_CALLTYPE *RenderModelHasComponent)(char * pchRenderModelName, char * pchComponentName);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelThumbnailURL)(char * pchRenderModelName, char * pchThumbnailURL, uint32_t unThumbnailURLLen, EVRRenderModelError * peError);
+ uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelOriginalPath)(char * pchRenderModelName, char * pchOriginalPath, uint32_t unOriginalPathLen, EVRRenderModelError * peError);
+ char * (OPENVR_FNTABLE_CALLTYPE *GetRenderModelErrorNameFromEnum)(EVRRenderModelError error);
};
struct VR_IVRNotifications_FnTable
diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h
index 63dcdd5..767521b 100644
--- a/headers/openvr_driver.h
+++ b/headers/openvr_driver.h
@@ -143,6 +143,7 @@ static const uint32_t k_unMaxDriverDebugResponseSize = 32768;
typedef uint32_t TrackedDeviceIndex_t;
static const uint32_t k_unTrackedDeviceIndex_Hmd = 0;
static const uint32_t k_unMaxTrackedDeviceCount = 16;
+static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE;
static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF;
/** Describes what kind of object is being tracked at a given ID */
@@ -264,6 +265,8 @@ enum ETrackedDeviceProperty
Prop_DisplayHardwareVersion_Uint64 = 2031,
Prop_AudioFirmwareVersion_Uint64 = 2032,
Prop_CameraCompatibilityMode_Int32 = 2033,
+ Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
+ Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
// Properties that are unique to TrackedDeviceClass_Controller
Prop_AttachedDeviceId_String = 3000,
@@ -327,7 +330,11 @@ enum EVRSubmitFlags
Submit_LensDistortionAlreadyApplied = 0x01,
// If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag.
- Submit_GlRenderBuffer = 0x02
+ Submit_GlRenderBuffer = 0x02,
+
+ // If you application receives a screenshot request, submit with this flag to let the compositor this submission
+ // is in the response to the screenshot
+ Submit_Screenshot = 0x04
};
@@ -399,6 +406,12 @@ enum EVREventType
VREvent_OverlaySharedTextureChanged = 513,
VREvent_DashboardGuideButtonDown = 514,
VREvent_DashboardGuideButtonUp = 515,
+ VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot
+
+ // Screenshot API
+ VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot
+ 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_Notification_Shown = 600,
VREvent_Notification_Hidden = 601,
@@ -422,6 +435,8 @@ enum EVREventType
VREvent_BackgroundSettingHasChanged = 850,
VREvent_CameraSettingsHaveChanged = 851,
VREvent_ReprojectionSettingHasChanged = 852,
+ VREvent_ModelSkinSettingsHaveChanged = 853,
+ VREvent_EnvironmentSettingsHaveChanged = 854,
VREvent_StatusUpdate = 900,
@@ -437,6 +452,7 @@ enum EVREventType
VREvent_ApplicationTransitionStarted = 1300,
VREvent_ApplicationTransitionAborted = 1301,
VREvent_ApplicationTransitionNewAppStarted = 1302,
+ VREvent_ApplicationListUpdated = 1303,
VREvent_Compositor_MirrorWindowShown = 1400,
VREvent_Compositor_MirrorWindowHidden = 1401,
@@ -791,6 +807,7 @@ enum EVRNotificationError
VRNotificationError_InvalidNotificationId = 100,
VRNotificationError_NotificationQueueFull = 101,
VRNotificationError_InvalidOverlayHandle = 102,
+ VRNotificationError_SystemWithUserValueAlreadyExists = 103,
};
@@ -868,6 +885,60 @@ enum EVRInitError
VRInitError_Steam_SteamInstallationNotFound = 2000,
};
+enum EVRScreenshotType
+{
+ VRScreenshotType_None = 0,
+ VRScreenshotType_Mono = 1, // left eye only
+ VRScreenshotType_Stereo = 2,
+ VRScreenshotType_Cubemap = 3,
+ VRScreenshotType_StereoPanorama = 4
+};
+
+enum EVRTrackedCameraError
+{
+ VRTrackedCameraError_None = 0,
+ VRTrackedCameraError_OperationFailed = 100,
+ VRTrackedCameraError_InvalidHandle = 101,
+ VRTrackedCameraError_InvalidFrameHeaderVersion = 102,
+ VRTrackedCameraError_OutOfHandles = 103,
+ VRTrackedCameraError_IPCFailure = 104,
+ VRTrackedCameraError_NotSupportedForThisDevice = 105,
+ VRTrackedCameraError_SharedMemoryFailure = 106,
+ VRTrackedCameraError_FrameBufferingFailure = 107,
+ VRTrackedCameraError_StreamSetupFailure = 108,
+ VRTrackedCameraError_InvalidGLTextureId = 109,
+ VRTrackedCameraError_InvalidSharedTextureHandle = 110,
+ VRTrackedCameraError_FailedToGetGLTextureId = 111,
+ VRTrackedCameraError_SharedTextureFailure = 112,
+ VRTrackedCameraError_NoFrameAvailable = 113,
+ VRTrackedCameraError_InvalidArgument = 114,
+ VRTrackedCameraError_InvalidFrameBufferSize = 115,
+};
+
+enum EVRTrackedCameraFrameType
+{
+ VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted.
+ VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly.
+ VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions.
+ MAX_CAMERA_FRAME_TYPES
+};
+
+typedef void* TrackedCameraHandle_t;
+#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0)
+
+struct CameraVideoStreamFrameHeader_t
+{
+ EVRTrackedCameraFrameType eFrameType;
+
+ uint32_t nWidth;
+ uint32_t nHeight;
+ uint32_t nBytesPerPixel;
+
+ uint32_t nFrameSequence;
+
+ TrackedDevicePose_t standingTrackedDevicePose;
+};
+
#pragma pack( pop )
// figure out how to import from the VR API dll
@@ -898,7 +969,7 @@ enum EVRInitError
#define VR_CALLTYPE
#endif
-}
+} // namespace vr
#endif // _INCLUDE_VRTYPES_H
@@ -954,6 +1025,8 @@ enum ECameraCompatibilityMode
#define VR_CAMERA_DECL_ALIGN( x ) //
#endif
+#define MAX_CAMERA_FRAME_SHARED_HANDLES 4
+
VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t
{
ECameraVideoStreamFormat m_nStreamFormat;
@@ -987,8 +1060,7 @@ VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t
double m_flSyncMarkerError;
- bool m_bPoseIsValid; // Supplied by HMD layer when used as a tracked camera
- vr::HmdMatrix34_t m_matDeviceToAbsoluteTracking;
+ TrackedDevicePose_t m_StandingTrackedDevicePose; // Supplied by HMD layer when used as a tracked camera
void *m_pImageData;
};
@@ -1052,8 +1124,12 @@ namespace vr
static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel";
static const char * const k_pch_SteamVR_IPD_Float = "ipd";
static const char * const k_pch_SteamVR_Background_String = "background";
+ static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight";
+ static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
+ static const char * const k_pch_SteamVR_Environment_String = "environment";
static const char * const k_pch_SteamVR_GridColor_String = "gridColor";
static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
+ static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage";
static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit";
static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout";
@@ -1081,10 +1157,6 @@ namespace vr
static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees";
static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect";
static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
- static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx";
- static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety";
- static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz";
- static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset";
//-----------------------------------------------------------------------------
// null keys
@@ -1106,6 +1178,7 @@ 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";
//-----------------------------------------------------------------------------
// notification keys
@@ -1168,6 +1241,10 @@ namespace vr
static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice";
static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
+ //-----------------------------------------------------------------------------
+ // model skin keys
+ static const char * const k_pch_modelskin_Section = "modelskins";
+
} // namespace vr
// iservertrackeddevicedriver.h
@@ -1463,6 +1540,8 @@ namespace vr
virtual bool SetCameraVideoSinkCallback( vr::ICameraVideoSinkCallback *pCameraVideoSinkCallback ) = 0;
virtual bool GetCameraCompatibilityMode( vr::ECameraCompatibilityMode *pCameraCompatibilityMode ) = 0;
virtual bool SetCameraCompatibilityMode( vr::ECameraCompatibilityMode nCameraCompatibilityMode ) = 0;
+ virtual bool GetCameraFrameBounds( vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pLeft, uint32_t *pTop, uint32_t *pWidth, uint32_t *pHeight ) = 0;
+ virtual bool GetCameraIntrinsics( vr::EVRTrackedCameraFrameType eFrameType, HmdVector2_t *pFocalLength, HmdVector2_t *pCenter ) = 0;
};
static const char *IVRCameraComponent_Version = "IVRCameraComponent_001";
@@ -1558,14 +1637,17 @@ public:
/** cleans up the driver right before it is unloaded */
virtual void Cleanup() = 0;
+ /** Returns the version of the ITrackedDeviceServerDriver interface used by this driver */
+ virtual const char * const *GetInterfaceVersions() = 0;
+
/** returns the number of HMDs that this driver manages that are physically connected. */
virtual uint32_t GetTrackedDeviceCount() = 0;
/** returns a single HMD */
- virtual ITrackedDeviceServerDriver *GetTrackedDeviceDriver( uint32_t unWhich, const char *pchInterfaceVersion ) = 0;
+ virtual ITrackedDeviceServerDriver *GetTrackedDeviceDriver( uint32_t unWhich ) = 0;
/** returns a single HMD by ID */
- virtual ITrackedDeviceServerDriver* FindTrackedDeviceDriver( const char *pchId, const char *pchInterfaceVersion ) = 0;
+ virtual ITrackedDeviceServerDriver* FindTrackedDeviceDriver( const char *pchId ) = 0;
/** Allows the driver do to some work in the main loop of the server. */
virtual void RunFrame() = 0;
@@ -1587,7 +1669,7 @@ public:
};
-static const char *IServerTrackedDeviceProvider_Version = "IServerTrackedDeviceProvider_002";
+static const char *IServerTrackedDeviceProvider_Version = "IServerTrackedDeviceProvider_003";
/** This interface is provided by vrclient to allow the driver call back and query various information */
@@ -1673,7 +1755,26 @@ public:
static const char *IClientTrackedDeviceProvider_Version = "IClientTrackedDeviceProvider_003";
-}// End
+}
+
+
+
+
+namespace vr
+{
+ static const char * const k_InterfaceVersions[] =
+ {
+ IVRSettings_Version,
+ ITrackedDeviceServerDriver_Version,
+ IVRDisplayComponent_Version,
+ IVRControllerComponent_Version,
+ IVRCameraComponent_Version,
+ IServerTrackedDeviceProvider_Version,
+ IClientTrackedDeviceProvider_Version,
+ nullptr
+ };
+}
+// End
#endif // _OPENVR_DRIVER_API