Skip to content

Commit

Permalink
**OpenVR SDK 1.0.13**
Browse files Browse the repository at this point in the history
General

* Added VREvent_RoomViewShown and VREvent_RoomViewHidden. Indicates that the "room view" pass-through camera mode has been started or stopped by the user. An application or driver can use this to enable or disable other functionality.


IVROverlay

* Added TextureType_DXGISharedHandle. This is used to submit a shared texture handle directly and avoid an extra copy on the resource. This texture type is current only supported for overlays on Windows.


Driver Interface

* Added TrackedControllerRole_OptOut. Set a controller to this if you want that controller to be ignored for the purposes of right/left hand selection.
* Added Prop_NeverTracked_Bool. Set that property to true on a device if you want to inform the system that the device is never going to have a valid pose. For instance, you might use this for an untracked gamepad.
* Prop_DistortionMeshResolution_Int32. Set this property on an HMD device if you want the system to generate a distortion mesh with a different resolution than the default, which is an approximately 50x50 grid across the full texture which is then trimmed to the area within the hidden area mesh.
* Added Prop_MinimumIpdStepMeters_Float. Set this to the minimum IPD change in meters that should cause the IPD UI to be shown.
* IVRDriverDirectModeComponent.CreateSwapTextureSet added the ability to specify sample count.
* IVRDriverDirectModeComponent.SubmitLayer 

[git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 4366099]
  • Loading branch information
JoeLudwig committed Feb 15, 2018
1 parent 53c417b commit d35c04c
Show file tree
Hide file tree
Showing 28 changed files with 188 additions and 81 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: 30 additions & 2 deletions headers/openvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ enum ETextureType
TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure
TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef
TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure
TextureType_DXGISharedHandle = 5, // Handle is a HANDLE DXGI share handle, only supported for Overlay render targets.
// this texture is used directly by our renderer, so only perform atomic (copyresource or resolve) on it
};

enum EColorSpace
Expand Down Expand Up @@ -173,6 +175,7 @@ enum ETrackedControllerRole
TrackedControllerRole_Invalid = 0, // Invalid value for controller type
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
};


Expand Down Expand Up @@ -206,6 +209,9 @@ typedef uint32_t PropertyTypeTag_t;
static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0;
static const PropertyTypeTag_t k_unInvalidPropertyTag = 0;

typedef PropertyContainerHandle_t DriverHandle_t;
static const PropertyContainerHandle_t k_ulInvalidDriverHandle = 0;

// Use these tags to set/get common types as struct properties
static const PropertyTypeTag_t k_unFloatPropertyTag = 1;
static const PropertyTypeTag_t k_unInt32PropertyTag = 2;
Expand Down Expand Up @@ -274,6 +280,7 @@ enum ETrackedDeviceProperty
Prop_ResourceRoot_String = 1035,
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

// Properties that are unique to TrackedDeviceClass_HMD
Prop_ReportsTimeSinceVSync_Bool = 2000,
Expand Down Expand Up @@ -330,9 +337,13 @@ enum ETrackedDeviceProperty
Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded
Prop_DoNotApplyPrediction_Bool = 2054,
Prop_CameraToHeadTransforms_Matrix34_Array = 2055,
Prop_DistortionMeshResolution_Int32 = 2056, // custom resolution of compositor calls to IVRSystem::ComputeDistortion
Prop_DriverIsDrawingControllers_Bool = 2057,
Prop_DriverRequestsApplicationPause_Bool = 2058,
Prop_DriverRequestsReducedRendering_Bool = 2059,
Prop_MinimumIpdStepMeters_Float = 2060,
Prop_AudioBridgeFirmwareVersion_Uint64 = 2061,
Prop_ImageBridgeFirmwareVersion_Uint64 = 2062,

// Properties that are unique to TrackedDeviceClass_Controller
Prop_AttachedDeviceId_String = 3000,
Expand Down Expand Up @@ -554,6 +565,7 @@ enum EVREventType
VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene
VREvent_InputFocusChanged = 406, // data is process
VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process
VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, // data is process

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 All @@ -575,11 +587,12 @@ enum EVREventType
VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it
VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else
VREvent_OverlaySharedTextureChanged = 513,
VREvent_DashboardGuideButtonDown = 514,
VREvent_DashboardGuideButtonUp = 515,
//VREvent_DashboardGuideButtonDown = 514, // These are no longer sent
//VREvent_DashboardGuideButtonUp = 515,
VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot
VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load
VREvent_DashboardOverlayCreated = 518,
VREvent_SwitchGamepadFocus = 519,

// Screenshot API
VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot
Expand All @@ -589,6 +602,8 @@ enum EVREventType
VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted

VREvent_PrimaryDashboardDeviceChanged = 525,
VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled
VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled

VREvent_Notification_Shown = 600,
VREvent_Notification_Hidden = 601,
Expand Down Expand Up @@ -823,6 +838,8 @@ struct VREvent_Reserved_t
{
uint64_t reserved0;
uint64_t reserved1;
uint64_t reserved2;
uint64_t reserved3;
};

struct VREvent_PerformanceTest_t
Expand Down Expand Up @@ -1185,6 +1202,7 @@ enum EVRInitError
VRInitError_Init_FirmwareUpdateBusy = 138,
VRInitError_Init_FirmwareRecoveryBusy = 139,
VRInitError_Init_USBServiceBusy = 140,
VRInitError_Init_VRWebHelperStartupFailed = 141,

VRInitError_Driver_Failed = 200,
VRInitError_Driver_Unknown = 201,
Expand Down Expand Up @@ -1980,6 +1998,7 @@ namespace vr
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";

//-----------------------------------------------------------------------------
// lighthouse keys
Expand All @@ -1991,6 +2010,7 @@ namespace vr
static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth";
static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations";

//-----------------------------------------------------------------------------
// null keys
Expand Down Expand Up @@ -2092,6 +2112,7 @@ namespace vr
static const char * const k_pch_Dashboard_Section = "dashboard";
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";

//-----------------------------------------------------------------------------
// model skin keys
Expand All @@ -2101,6 +2122,11 @@ namespace vr
// driver keys - These could be checked in any driver_<name> section
static const char * const k_pch_Driver_Enable_Bool = "enable";

//-----------------------------------------------------------------------------
// web interface keys
static const char* const k_pch_WebInterface_Section = "WebInterface";
static const char* const k_pch_WebInterface_WebPort_String = "WebPort";

} // namespace vr

// ivrchaperone.h
Expand Down Expand Up @@ -3598,6 +3624,8 @@ class IVRDriverManager

/** Returns the length of the number of bytes necessary to hold this string including the trailing null. */
virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0;

virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0;
};

static const char * const IVRDriverManager_Version = "IVRDriverManager_001";
Expand Down
32 changes: 30 additions & 2 deletions headers/openvr_api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,11 @@ public struct IVRDriverManager
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetDriverName GetDriverName;

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ulong _GetDriverHandle(string pchDriverName);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetDriverHandle GetDriverHandle;

}


Expand Down Expand Up @@ -3257,6 +3262,11 @@ public uint GetDriverName(uint nDriver,System.Text.StringBuilder pchValue,uint u
uint result = FnTable.GetDriverName(nDriver,pchValue,unBufferSize);
return result;
}
public ulong GetDriverHandle(string pchDriverName)
{
ulong result = FnTable.GetDriverHandle(pchDriverName);
return result;
}
}


Expand Down Expand Up @@ -3293,6 +3303,7 @@ public enum ETextureType
Vulkan = 2,
IOSurface = 3,
DirectX12 = 4,
DXGISharedHandle = 5,
}
public enum EColorSpace
{
Expand Down Expand Up @@ -3322,6 +3333,7 @@ public enum ETrackedControllerRole
Invalid = 0,
LeftHand = 1,
RightHand = 2,
OptOut = 3,
}
public enum ETrackingUniverseOrigin
{
Expand Down Expand Up @@ -3370,6 +3382,7 @@ public enum ETrackedDeviceProperty
Prop_ResourceRoot_String = 1035,
Prop_RegisteredDeviceType_String = 1036,
Prop_InputProfilePath_String = 1037,
Prop_NeverTracked_Bool = 1038,
Prop_ReportsTimeSinceVSync_Bool = 2000,
Prop_SecondsFromVsyncToPhotons_Float = 2001,
Prop_DisplayFrequency_Float = 2002,
Expand Down Expand Up @@ -3424,9 +3437,13 @@ public enum ETrackedDeviceProperty
Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053,
Prop_DoNotApplyPrediction_Bool = 2054,
Prop_CameraToHeadTransforms_Matrix34_Array = 2055,
Prop_DistortionMeshResolution_Int32 = 2056,
Prop_DriverIsDrawingControllers_Bool = 2057,
Prop_DriverRequestsApplicationPause_Bool = 2058,
Prop_DriverRequestsReducedRendering_Bool = 2059,
Prop_MinimumIpdStepMeters_Float = 2060,
Prop_AudioBridgeFirmwareVersion_Uint64 = 2061,
Prop_ImageBridgeFirmwareVersion_Uint64 = 2062,
Prop_AttachedDeviceId_String = 3000,
Prop_SupportedButtons_Uint64 = 3001,
Prop_Axis0Type_Int32 = 3002,
Expand Down Expand Up @@ -3549,6 +3566,7 @@ public enum EVREventType
VREvent_SceneFocusChanged = 405,
VREvent_InputFocusChanged = 406,
VREvent_SceneApplicationSecondaryRenderingStarted = 407,
VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408,
VREvent_HideRenderModels = 410,
VREvent_ShowRenderModels = 411,
VREvent_ConsoleOpened = 420,
Expand All @@ -3567,17 +3585,18 @@ public enum EVREventType
VREvent_OverlayGamepadFocusGained = 511,
VREvent_OverlayGamepadFocusLost = 512,
VREvent_OverlaySharedTextureChanged = 513,
VREvent_DashboardGuideButtonDown = 514,
VREvent_DashboardGuideButtonUp = 515,
VREvent_ScreenshotTriggered = 516,
VREvent_ImageFailed = 517,
VREvent_DashboardOverlayCreated = 518,
VREvent_SwitchGamepadFocus = 519,
VREvent_RequestScreenshot = 520,
VREvent_ScreenshotTaken = 521,
VREvent_ScreenshotFailed = 522,
VREvent_SubmitScreenshotToDashboard = 523,
VREvent_ScreenshotProgressToDashboard = 524,
VREvent_PrimaryDashboardDeviceChanged = 525,
VREvent_RoomViewShown = 526,
VREvent_RoomViewHidden = 527,
VREvent_Notification_Shown = 600,
VREvent_Notification_Hidden = 601,
VREvent_Notification_BeginInteraction = 602,
Expand Down Expand Up @@ -3822,6 +3841,7 @@ public enum EVRInitError
Init_FirmwareUpdateBusy = 138,
Init_FirmwareRecoveryBusy = 139,
Init_USBServiceBusy = 140,
Init_VRWebHelperStartupFailed = 141,
Driver_Failed = 200,
Driver_Unknown = 201,
Driver_HmdUnknown = 202,
Expand Down Expand Up @@ -4375,6 +4395,8 @@ public enum EVRScreenshotError
{
public ulong reserved0;
public ulong reserved1;
public ulong reserved2;
public ulong reserved3;
}
[StructLayout(LayoutKind.Sequential)] public struct VREvent_PerformanceTest_t
{
Expand Down Expand Up @@ -4781,6 +4803,7 @@ public static uint GetInitToken()
public const uint k_unTrackedDeviceIndexInvalid = 4294967295;
public const ulong k_ulInvalidPropertyContainer = 0;
public const uint k_unInvalidPropertyTag = 0;
public const ulong k_ulInvalidDriverHandle = 0;
public const uint k_unFloatPropertyTag = 1;
public const uint k_unInt32PropertyTag = 2;
public const uint k_unUint64PropertyTag = 3;
Expand Down Expand Up @@ -4874,6 +4897,7 @@ public static uint GetInitToken()
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_Lighthouse_Section = "driver_lighthouse";
public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
public const string k_pch_Lighthouse_DisableIMUExceptHMD_Bool = "disableimuexcepthmd";
Expand All @@ -4882,6 +4906,7 @@ public static uint GetInitToken()
public const string k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
public const string k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
public const string k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth";
public const string k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations";
public const string k_pch_Null_Section = "driver_null";
public const string k_pch_Null_SerialNumber_String = "serialNumber";
public const string k_pch_Null_ModelNumber_String = "modelNumber";
Expand Down Expand Up @@ -4953,8 +4978,11 @@ public static uint GetInitToken()
public const string k_pch_Dashboard_Section = "dashboard";
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_modelskin_Section = "modelskins";
public const string k_pch_Driver_Enable_Bool = "enable";
public const string k_pch_WebInterface_Section = "WebInterface";
public const string k_pch_WebInterface_WebPort_String = "WebPort";
public const string IVRScreenshots_Version = "IVRScreenshots_001";
public const string IVRResources_Version = "IVRResources_001";
public const string IVRDriverManager_Version = "IVRDriverManager_001";
Expand Down
Loading

0 comments on commit d35c04c

Please sign in to comment.