Skip to content

Commit

Permalink
**OpenVR SDK 1.0.14**
Browse files Browse the repository at this point in the history
Tracked Camera

* Added property Prop_NumCameras_Int32 for drivers to specify the number of cameras a given headset provides.
* Added property Prop_CameraFrameLayout_Int32 for drivers to specify the frame layout of images delivered (use provided EVRTrackedCameraFrameLayout values).


IVRVirtualDisplay

* Added vsync mode, frame id, and vsync timing data to Present call.

[git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 4455565]
  • Loading branch information
aaronleiby committed Apr 5, 2018
1 parent d35c04c commit 7027f51
Show file tree
Hide file tree
Showing 26 changed files with 186 additions and 44 deletions.
Binary file modified bin/linux32/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux32/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/osx32/libopenvr_api.dylib
Binary file not shown.
Binary file not shown.
Binary file modified bin/win32/openvr_api.dll
Binary file not shown.
Binary file modified bin/win32/openvr_api.pdb
Binary file not shown.
Binary file modified bin/win64/openvr_api.dll
Binary file not shown.
Binary file modified bin/win64/openvr_api.pdb
Binary file not shown.
32 changes: 32 additions & 0 deletions headers/openvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ enum ETrackedControllerRole
TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand
TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand
TrackedControllerRole_OptOut = 3, // Tracked device is opting out of left/right hand selection
TrackedControllerRole_Max = 4
};


Expand All @@ -202,6 +203,9 @@ enum ETrackingUniverseOrigin
TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one.
};

typedef uint64_t WebConsoleHandle_t;
#define INVALID_WEB_CONSOLE_HANDLE ((vr::WebConsoleHandle_t)0)

// Refers to a single container of properties
typedef uint64_t PropertyContainerHandle_t;
typedef uint32_t PropertyTypeTag_t;
Expand Down Expand Up @@ -281,6 +285,8 @@ enum ETrackedDeviceProperty
Prop_RegisteredDeviceType_String = 1036,
Prop_InputProfilePath_String = 1037, // input profile to use for this device in the input system. Will default to tracking system name if this isn't provided
Prop_NeverTracked_Bool = 1038, // Used for devices that will never have a valid pose by design
Prop_NumCameras_Int32 = 1039,
Prop_CameraFrameLayout_Int32 = 1040, // EVRTrackedCameraFrameLayout value

// Properties that are unique to TrackedDeviceClass_HMD
Prop_ReportsTimeSinceVSync_Bool = 2000,
Expand Down Expand Up @@ -566,6 +572,7 @@ enum EVREventType
VREvent_InputFocusChanged = 406, // data is process
VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process
VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, // data is process
VREvent_ActionBindingReloaded = 409, // data is process - The App that action binds reloaded for

VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily
VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility
Expand Down Expand Up @@ -806,6 +813,7 @@ struct VREvent_Process_t
struct VREvent_Overlay_t
{
uint64_t overlayHandle;
uint64_t devicePath;
};


Expand Down Expand Up @@ -908,6 +916,10 @@ struct VREvent_HapticVibration_t
float fAmplitude;
};

struct VREvent_WebConsole_t
{
WebConsoleHandle_t webConsoleHandle;
};

/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
typedef union
Expand All @@ -934,6 +946,7 @@ typedef union
VREvent_Property_t property;
VREvent_DualAnalog_t dualAnalog;
VREvent_HapticVibration_t hapticVibration;
VREvent_WebConsole_t webConsole;
} VREvent_Data_t;


Expand Down Expand Up @@ -1292,6 +1305,14 @@ enum EVRTrackedCameraError
VRTrackedCameraError_InvalidFrameBufferSize = 115,
};

enum EVRTrackedCameraFrameLayout
{
EVRTrackedCameraFrameLayout_Mono = 0x0001,
EVRTrackedCameraFrameLayout_Stereo = 0x0002,
EVRTrackedCameraFrameLayout_VerticalLayout = 0x0010, // Stereo frames are Top/Bottom (left/right)
EVRTrackedCameraFrameLayout_HorizontalLayout = 0x0020, // Stereo frames are Left/Right
};

enum EVRTrackedCameraFrameType
{
VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted.
Expand Down Expand Up @@ -1331,6 +1352,13 @@ struct DriverDirectMode_FrameTiming
uint32_t m_nReprojectionFlags;
};

enum EVSync
{
VSync_None,
VSync_WaitRender, // block following render work until vsync
VSync_NoWaitRender, // do not block following render work (allow to get started early)
};

#pragma pack( pop )

// figure out how to import from the VR API dll
Expand Down Expand Up @@ -1994,11 +2022,13 @@ namespace vr
static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
static const char * const k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering";
static const char * const k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleManualOverride";
static const char * const k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync";
static const char * const k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode";
static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver";
static const char * const k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor";
static const char * const k_pch_SteamVR_DebugInput = "debugInput";
static const char * const k_pch_SteamVR_LegacyInputRebinding = "legacyInputRebinding";

//-----------------------------------------------------------------------------
// lighthouse keys
Expand Down Expand Up @@ -2086,6 +2116,7 @@ namespace vr
static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB";
static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA";
static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength";
static const char * const k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode";

//-----------------------------------------------------------------------------
// audio keys
Expand Down Expand Up @@ -2113,6 +2144,7 @@ namespace vr
static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
static const char * const k_pch_Dashboard_EnableWebUI = "webUI";
static const char * const k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools";

//-----------------------------------------------------------------------------
// model skin keys
Expand Down
27 changes: 27 additions & 0 deletions headers/openvr_api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3334,6 +3334,7 @@ public enum ETrackedControllerRole
LeftHand = 1,
RightHand = 2,
OptOut = 3,
Max = 4,
}
public enum ETrackingUniverseOrigin
{
Expand Down Expand Up @@ -3383,6 +3384,8 @@ public enum ETrackedDeviceProperty
Prop_RegisteredDeviceType_String = 1036,
Prop_InputProfilePath_String = 1037,
Prop_NeverTracked_Bool = 1038,
Prop_NumCameras_Int32 = 1039,
Prop_CameraFrameLayout_Int32 = 1040,
Prop_ReportsTimeSinceVSync_Bool = 2000,
Prop_SecondsFromVsyncToPhotons_Float = 2001,
Prop_DisplayFrequency_Float = 2002,
Expand Down Expand Up @@ -3567,6 +3570,7 @@ public enum EVREventType
VREvent_InputFocusChanged = 406,
VREvent_SceneApplicationSecondaryRenderingStarted = 407,
VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408,
VREvent_ActionBindingReloaded = 409,
VREvent_HideRenderModels = 410,
VREvent_ShowRenderModels = 411,
VREvent_ConsoleOpened = 420,
Expand Down Expand Up @@ -3920,13 +3924,26 @@ public enum EVRTrackedCameraError
InvalidArgument = 114,
InvalidFrameBufferSize = 115,
}
public enum EVRTrackedCameraFrameLayout
{
Mono = 1,
Stereo = 2,
VerticalLayout = 16,
HorizontalLayout = 32,
}
public enum EVRTrackedCameraFrameType
{
Distorted = 0,
Undistorted = 1,
MaximumUndistorted = 2,
MAX_CAMERA_FRAME_TYPES = 3,
}
public enum EVSync
{
None = 0,
WaitRender = 1,
NoWaitRender = 2,
}
public enum EVRApplicationError
{
None = 0,
Expand Down Expand Up @@ -4167,6 +4184,7 @@ public enum EVRScreenshotError
[FieldOffset(0)] public VREvent_Property_t property;
[FieldOffset(0)] public VREvent_DualAnalog_t dualAnalog;
[FieldOffset(0)] public VREvent_HapticVibration_t hapticVibration;
[FieldOffset(0)] public VREvent_WebConsole_t webConsole;
[FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be at the end due to a mono bug
}

Expand Down Expand Up @@ -4372,6 +4390,7 @@ public enum EVRScreenshotError
[StructLayout(LayoutKind.Sequential)] public struct VREvent_Overlay_t
{
public ulong overlayHandle;
public ulong devicePath;
}
[StructLayout(LayoutKind.Sequential)] public struct VREvent_Status_t
{
Expand Down Expand Up @@ -4451,6 +4470,10 @@ public enum EVRScreenshotError
public float fFrequency;
public float fAmplitude;
}
[StructLayout(LayoutKind.Sequential)] public struct VREvent_WebConsole_t
{
public ulong webConsoleHandle;
}
[StructLayout(LayoutKind.Sequential)] public struct VREvent_t
{
public uint eventType;
Expand Down Expand Up @@ -4893,11 +4916,13 @@ public static uint GetInitToken()
public const string k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
public const string k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
public const string k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering";
public const string k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleManualOverride";
public const string k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync";
public const string k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode";
public const string k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver";
public const string k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor";
public const string k_pch_SteamVR_DebugInput = "debugInput";
public const string k_pch_SteamVR_LegacyInputRebinding = "legacyInputRebinding";
public const string k_pch_Lighthouse_Section = "driver_lighthouse";
public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
public const string k_pch_Lighthouse_DisableIMUExceptHMD_Bool = "disableimuexcepthmd";
Expand Down Expand Up @@ -4961,6 +4986,7 @@ public static uint GetInitToken()
public const string k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB";
public const string k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA";
public const string k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength";
public const string k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode";
public const string k_pch_audio_Section = "audio";
public const string k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice";
public const string k_pch_audio_OnRecordDevice_String = "onRecordDevice";
Expand All @@ -4979,6 +5005,7 @@ public static uint GetInitToken()
public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
public const string k_pch_Dashboard_EnableWebUI = "webUI";
public const string k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools";
public const string k_pch_modelskin_Section = "modelskins";
public const string k_pch_Driver_Enable_Bool = "enable";
public const string k_pch_WebInterface_Section = "WebInterface";
Expand Down
32 changes: 30 additions & 2 deletions headers/openvr_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
,{"typedef": "vr::SharedTextureHandle_t","type": "uint64_t"}
,{"typedef": "vr::DriverId_t","type": "uint32_t"}
,{"typedef": "vr::TrackedDeviceIndex_t","type": "uint32_t"}
,{"typedef": "vr::WebConsoleHandle_t","type": "uint64_t"}
,{"typedef": "vr::PropertyContainerHandle_t","type": "uint64_t"}
,{"typedef": "vr::PropertyTypeTag_t","type": "uint32_t"}
,{"typedef": "vr::DriverHandle_t","type": "PropertyContainerHandle_t"}
Expand Down Expand Up @@ -70,6 +71,7 @@
,{"name": "TrackedControllerRole_LeftHand","value": "1"}
,{"name": "TrackedControllerRole_RightHand","value": "2"}
,{"name": "TrackedControllerRole_OptOut","value": "3"}
,{"name": "TrackedControllerRole_Max","value": "4"}
]}
, {"enumname": "vr::ETrackingUniverseOrigin","values": [
{"name": "TrackingUniverseSeated","value": "0"}
Expand Down Expand Up @@ -117,6 +119,8 @@
,{"name": "Prop_RegisteredDeviceType_String","value": "1036"}
,{"name": "Prop_InputProfilePath_String","value": "1037"}
,{"name": "Prop_NeverTracked_Bool","value": "1038"}
,{"name": "Prop_NumCameras_Int32","value": "1039"}
,{"name": "Prop_CameraFrameLayout_Int32","value": "1040"}
,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"}
,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"}
,{"name": "Prop_DisplayFrequency_Float","value": "2002"}
Expand Down Expand Up @@ -297,6 +301,7 @@
,{"name": "VREvent_InputFocusChanged","value": "406"}
,{"name": "VREvent_SceneApplicationSecondaryRenderingStarted","value": "407"}
,{"name": "VREvent_SceneApplicationUsingWrongGraphicsAdapter","value": "408"}
,{"name": "VREvent_ActionBindingReloaded","value": "409"}
,{"name": "VREvent_HideRenderModels","value": "410"}
,{"name": "VREvent_ShowRenderModels","value": "411"}
,{"name": "VREvent_ConsoleOpened","value": "420"}
Expand Down Expand Up @@ -633,12 +638,23 @@
,{"name": "VRTrackedCameraError_InvalidArgument","value": "114"}
,{"name": "VRTrackedCameraError_InvalidFrameBufferSize","value": "115"}
]}
, {"enumname": "vr::EVRTrackedCameraFrameLayout","values": [
{"name": "EVRTrackedCameraFrameLayout_Mono","value": "1"}
,{"name": "EVRTrackedCameraFrameLayout_Stereo","value": "2"}
,{"name": "EVRTrackedCameraFrameLayout_VerticalLayout","value": "16"}
,{"name": "EVRTrackedCameraFrameLayout_HorizontalLayout","value": "32"}
]}
, {"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::EVSync","values": [
{"name": "VSync_None","value": "0"}
,{"name": "VSync_WaitRender","value": "1"}
,{"name": "VSync_NoWaitRender","value": "2"}
]}
, {"enumname": "vr::EVRApplicationError","values": [
{"name": "VRApplicationError_None","value": "0"}
,{"name": "VRApplicationError_AppKeyAlreadyExists","value": "100"}
Expand Down Expand Up @@ -1030,6 +1046,8 @@
"constname": "k_pch_SteamVR_IpdOffset_Float","consttype": "const char *const", "constval": "ipdOffset"}
,{
"constname": "k_pch_SteamVR_AllowSupersampleFiltering_Bool","consttype": "const char *const", "constval": "allowSupersampleFiltering"}
,{
"constname": "k_pch_SteamVR_SupersampleManualOverride_Bool","consttype": "const char *const", "constval": "supersampleManualOverride"}
,{
"constname": "k_pch_SteamVR_EnableLinuxVulkanAsync_Bool","consttype": "const char *const", "constval": "enableLinuxVulkanAsync"}
,{
Expand All @@ -1040,6 +1058,8 @@
"constname": "k_pch_SteamVR_ForceWindows32bitVRMonitor","consttype": "const char *const", "constval": "forceWindows32BitVRMonitor"}
,{
"constname": "k_pch_SteamVR_DebugInput","consttype": "const char *const", "constval": "debugInput"}
,{
"constname": "k_pch_SteamVR_LegacyInputRebinding","consttype": "const char *const", "constval": "legacyInputRebinding"}
,{
"constname": "k_pch_Lighthouse_Section","consttype": "const char *const", "constval": "driver_lighthouse"}
,{
Expand Down Expand Up @@ -1166,6 +1186,8 @@
"constname": "k_pch_Camera_BoundsColorGammaA_Int32","consttype": "const char *const", "constval": "cameraBoundsColorGammaA"}
,{
"constname": "k_pch_Camera_BoundsStrength_Int32","consttype": "const char *const", "constval": "cameraBoundsStrength"}
,{
"constname": "k_pch_Camera_RoomViewMode_Int32","consttype": "const char *const", "constval": "cameraRoomViewMode"}
,{
"constname": "k_pch_audio_Section","consttype": "const char *const", "constval": "audio"}
,{
Expand Down Expand Up @@ -1202,6 +1224,8 @@
"constname": "k_pch_Dashboard_ArcadeMode_Bool","consttype": "const char *const", "constval": "arcadeMode"}
,{
"constname": "k_pch_Dashboard_EnableWebUI","consttype": "const char *const", "constval": "webUI"}
,{
"constname": "k_pch_Dashboard_EnableWebUIDevTools","consttype": "const char *const", "constval": "webUIDevTools"}
,{
"constname": "k_pch_modelskin_Section","consttype": "const char *const", "constval": "modelskins"}
,{
Expand Down Expand Up @@ -1314,7 +1338,8 @@
{ "fieldname": "oldPid", "fieldtype": "uint32_t"},
{ "fieldname": "bForced", "fieldtype": "_Bool"}]}
,{"struct": "vr::VREvent_Overlay_t","fields": [
{ "fieldname": "overlayHandle", "fieldtype": "uint64_t"}]}
{ "fieldname": "overlayHandle", "fieldtype": "uint64_t"},
{ "fieldname": "devicePath", "fieldtype": "uint64_t"}]}
,{"struct": "vr::VREvent_Status_t","fields": [
{ "fieldname": "statusState", "fieldtype": "uint32_t"}]}
,{"struct": "vr::VREvent_Keyboard_t","fields": [
Expand Down Expand Up @@ -1362,6 +1387,8 @@
{ "fieldname": "fDurationSeconds", "fieldtype": "float"},
{ "fieldname": "fFrequency", "fieldtype": "float"},
{ "fieldname": "fAmplitude", "fieldtype": "float"}]}
,{"struct": "vr::VREvent_WebConsole_t","fields": [
{ "fieldname": "webConsoleHandle", "fieldtype": "WebConsoleHandle_t"}]}
,{"struct": "vr::(anonymous)","fields": [
{ "fieldname": "reserved", "fieldtype": "struct vr::VREvent_Reserved_t"},
{ "fieldname": "controller", "fieldtype": "struct vr::VREvent_Controller_t"},
Expand All @@ -1384,7 +1411,8 @@
{ "fieldname": "messageOverlay", "fieldtype": "struct vr::VREvent_MessageOverlay_t"},
{ "fieldname": "property", "fieldtype": "struct vr::VREvent_Property_t"},
{ "fieldname": "dualAnalog", "fieldtype": "struct vr::VREvent_DualAnalog_t"},
{ "fieldname": "hapticVibration", "fieldtype": "struct vr::VREvent_HapticVibration_t"}]}
{ "fieldname": "hapticVibration", "fieldtype": "struct vr::VREvent_HapticVibration_t"},
{ "fieldname": "webConsole", "fieldtype": "struct vr::VREvent_WebConsole_t"}]}
,{"struct": "vr::VREvent_t","fields": [
{ "fieldname": "eventType", "fieldtype": "uint32_t"},
{ "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"},
Expand Down
Loading

0 comments on commit 7027f51

Please sign in to comment.