update to OpenVR 1.07 from https://github.com/ValveSoftware/openvr
This commit is contained in:
@@ -21,19 +21,13 @@ struct VkPhysicalDevice_T;
|
||||
struct VkInstance_T;
|
||||
struct VkQueue_T;
|
||||
|
||||
// Forward declarations to avoid requiring d3d12.h
|
||||
struct ID3D12Resource;
|
||||
struct ID3D12CommandQueue;
|
||||
|
||||
namespace vr
|
||||
{
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
|
||||
// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
|
||||
// The 64-bit version of gcc has the alignment requirement for these types set to
|
||||
// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
|
||||
// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
|
||||
#pragma pack( push, 4 )
|
||||
#else
|
||||
#pragma pack( push, 8 )
|
||||
#endif
|
||||
#pragma pack( push, 8 )
|
||||
|
||||
typedef void* glSharedTextureHandle_t;
|
||||
typedef int32_t glInt_t;
|
||||
@@ -116,6 +110,8 @@ enum ETextureType
|
||||
TextureType_DirectX = 0, // Handle is an ID3D11Texture
|
||||
TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags
|
||||
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
|
||||
};
|
||||
|
||||
enum EColorSpace
|
||||
@@ -164,6 +160,7 @@ enum ETrackedDeviceClass
|
||||
TrackedDeviceClass_Controller = 2, // Tracked controllers
|
||||
TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers
|
||||
TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points
|
||||
TrackedDeviceClass_DisplayRedirect = 5, // Accessories that aren't necessarily tracked themselves, but may redirect video output from other tracked devices
|
||||
};
|
||||
|
||||
|
||||
@@ -199,6 +196,30 @@ 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.
|
||||
};
|
||||
|
||||
// Refers to a single container of properties
|
||||
typedef uint64_t PropertyContainerHandle_t;
|
||||
typedef uint32_t PropertyTypeTag_t;
|
||||
|
||||
static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0;
|
||||
static const PropertyTypeTag_t k_unInvalidPropertyTag = 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;
|
||||
static const PropertyTypeTag_t k_unUint64PropertyTag = 3;
|
||||
static const PropertyTypeTag_t k_unBoolPropertyTag = 4;
|
||||
static const PropertyTypeTag_t k_unStringPropertyTag = 5;
|
||||
|
||||
static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20;
|
||||
static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21;
|
||||
static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22;
|
||||
static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23;
|
||||
|
||||
static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30;
|
||||
|
||||
static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000;
|
||||
static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000;
|
||||
|
||||
|
||||
/** Each entry in this enum represents a property that can be retrieved about a
|
||||
* tracked device. Many fields are only valid for one ETrackedDeviceClass. */
|
||||
@@ -241,6 +262,8 @@ enum ETrackedDeviceProperty
|
||||
Prop_DriverVersion_String = 1031,
|
||||
Prop_Firmware_ForceUpdateRequired_Bool = 1032,
|
||||
Prop_ViveSystemButtonFixRequired_Bool = 1033,
|
||||
Prop_ParentDriver_Uint64 = 1034,
|
||||
Prop_ResourceRoot_String = 1035,
|
||||
|
||||
// Properties that are unique to TrackedDeviceClass_HMD
|
||||
Prop_ReportsTimeSinceVSync_Bool = 2000,
|
||||
@@ -281,6 +304,11 @@ enum ETrackedDeviceProperty
|
||||
Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
|
||||
Prop_DisplaySuppressed_Bool = 2036,
|
||||
Prop_DisplayAllowNightMode_Bool = 2037,
|
||||
Prop_DisplayMCImageWidth_Int32 = 2038,
|
||||
Prop_DisplayMCImageHeight_Int32 = 2039,
|
||||
Prop_DisplayMCImageNumChannels_Int32 = 2040,
|
||||
Prop_DisplayMCImageData_Binary = 2041,
|
||||
Prop_SecondsFromPhotonsToVblank_Float = 2042,
|
||||
|
||||
// Properties that are unique to TrackedDeviceClass_Controller
|
||||
Prop_AttachedDeviceId_String = 3000,
|
||||
@@ -312,6 +340,19 @@ enum ETrackedDeviceProperty
|
||||
Prop_NamedIconPathDeviceStandby_String = 5007, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceAlertLow_String = 5008, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
|
||||
// Properties that are used by helpers, but are opaque to applications
|
||||
Prop_DisplayHiddenArea_Binary_Start = 5100,
|
||||
Prop_DisplayHiddenArea_Binary_End = 5150,
|
||||
|
||||
// Properties that are unique to drivers
|
||||
Prop_UserConfigPath_String = 6000,
|
||||
Prop_InstallPath_String = 6001,
|
||||
Prop_HasDisplayComponent_Bool = 6002,
|
||||
Prop_HasControllerComponent_Bool = 6003,
|
||||
Prop_HasCameraComponent_Bool = 6004,
|
||||
Prop_HasDriverDirectModeComponent_Bool = 6005,
|
||||
Prop_HasVirtualDisplayComponent_Bool = 6006,
|
||||
|
||||
// Vendors are free to expose private debug data in this reserved region
|
||||
Prop_VendorSpecific_Reserved_Start = 10000,
|
||||
Prop_VendorSpecific_Reserved_End = 10999,
|
||||
@@ -327,13 +368,14 @@ enum ETrackedPropertyError
|
||||
TrackedProp_WrongDataType = 1,
|
||||
TrackedProp_WrongDeviceClass = 2,
|
||||
TrackedProp_BufferTooSmall = 3,
|
||||
TrackedProp_UnknownProperty = 4,
|
||||
TrackedProp_UnknownProperty = 4, // Driver has not set the property (and may not ever).
|
||||
TrackedProp_InvalidDevice = 5,
|
||||
TrackedProp_CouldNotContactServer = 6,
|
||||
TrackedProp_ValueNotProvidedByDevice = 7,
|
||||
TrackedProp_StringExceedsMaximumLength = 8,
|
||||
TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later.
|
||||
TrackedProp_PermissionDenied = 10,
|
||||
TrackedProp_InvalidOperation = 11,
|
||||
};
|
||||
|
||||
/** Allows the application to control what part of the provided texture will be used in the
|
||||
@@ -376,6 +418,14 @@ struct VRVulkanTextureData_t
|
||||
uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount;
|
||||
};
|
||||
|
||||
/** Data required for passing D3D12 textures to IVRCompositor::Submit.
|
||||
* Be sure to call OpenVR_Shutdown before destroying these resources. */
|
||||
struct D3D12TextureData_t
|
||||
{
|
||||
ID3D12Resource *m_pResource;
|
||||
ID3D12CommandQueue *m_pCommandQueue;
|
||||
uint32_t m_nNodeMask;
|
||||
};
|
||||
|
||||
/** Status of the overall system or tracked objects */
|
||||
enum EVRState
|
||||
@@ -399,7 +449,7 @@ enum EVREventType
|
||||
VREvent_TrackedDeviceActivated = 100,
|
||||
VREvent_TrackedDeviceDeactivated = 101,
|
||||
VREvent_TrackedDeviceUpdated = 102,
|
||||
VREvent_TrackedDeviceUserInteractionStarted = 103,
|
||||
VREvent_TrackedDeviceUserInteractionStarted = 103,
|
||||
VREvent_TrackedDeviceUserInteractionEnded = 104,
|
||||
VREvent_IpdChanged = 105,
|
||||
VREvent_EnterStandbyMode = 106,
|
||||
@@ -407,6 +457,7 @@ enum EVREventType
|
||||
VREvent_TrackedDeviceRoleChanged = 108,
|
||||
VREvent_WatchdogWakeUpRequested = 109,
|
||||
VREvent_LensDistortionChanged = 110,
|
||||
VREvent_PropertyChanged = 111,
|
||||
|
||||
VREvent_ButtonPress = 200, // data is controller
|
||||
VREvent_ButtonUnpress = 201, // data is controller
|
||||
@@ -436,78 +487,83 @@ enum EVREventType
|
||||
|
||||
VREvent_OverlayShown = 500,
|
||||
VREvent_OverlayHidden = 501,
|
||||
VREvent_DashboardActivated = 502,
|
||||
VREvent_DashboardDeactivated = 503,
|
||||
VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay
|
||||
VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay
|
||||
VREvent_ResetDashboard = 506, // Send to the overlay manager
|
||||
VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID
|
||||
VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading
|
||||
VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it
|
||||
VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it
|
||||
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_DashboardActivated = 502,
|
||||
VREvent_DashboardDeactivated = 503,
|
||||
VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay
|
||||
VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay
|
||||
VREvent_ResetDashboard = 506, // Send to the overlay manager
|
||||
VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID
|
||||
VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading
|
||||
VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it
|
||||
VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it
|
||||
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_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_DashboardGuideButtonDown = 514,
|
||||
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,
|
||||
|
||||
// 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_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted
|
||||
VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted
|
||||
VREvent_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_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted
|
||||
VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted
|
||||
|
||||
VREvent_PrimaryDashboardDeviceChanged = 525,
|
||||
|
||||
VREvent_Notification_Shown = 600,
|
||||
VREvent_Notification_Hidden = 601,
|
||||
VREvent_Notification_BeginInteraction = 602,
|
||||
VREvent_Notification_Destroyed = 603,
|
||||
|
||||
VREvent_Quit = 700, // data is process
|
||||
VREvent_ProcessQuit = 701, // data is process
|
||||
VREvent_QuitAborted_UserPrompt = 702, // data is process
|
||||
VREvent_QuitAcknowledged = 703, // data is process
|
||||
VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down
|
||||
VREvent_Quit = 700, // data is process
|
||||
VREvent_ProcessQuit = 701, // data is process
|
||||
VREvent_QuitAborted_UserPrompt = 702, // data is process
|
||||
VREvent_QuitAcknowledged = 703, // data is process
|
||||
VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down
|
||||
|
||||
VREvent_ChaperoneDataHasChanged = 800,
|
||||
VREvent_ChaperoneUniverseHasChanged = 801,
|
||||
VREvent_ChaperoneTempDataHasChanged = 802,
|
||||
VREvent_ChaperoneSettingsHaveChanged = 803,
|
||||
VREvent_SeatedZeroPoseReset = 804,
|
||||
VREvent_ChaperoneDataHasChanged = 800,
|
||||
VREvent_ChaperoneUniverseHasChanged = 801,
|
||||
VREvent_ChaperoneTempDataHasChanged = 802,
|
||||
VREvent_ChaperoneSettingsHaveChanged = 803,
|
||||
VREvent_SeatedZeroPoseReset = 804,
|
||||
|
||||
VREvent_AudioSettingsHaveChanged = 820,
|
||||
VREvent_AudioSettingsHaveChanged = 820,
|
||||
|
||||
VREvent_BackgroundSettingHasChanged = 850,
|
||||
VREvent_CameraSettingsHaveChanged = 851,
|
||||
VREvent_ReprojectionSettingHasChanged = 852,
|
||||
VREvent_ModelSkinSettingsHaveChanged = 853,
|
||||
VREvent_EnvironmentSettingsHaveChanged = 854,
|
||||
VREvent_PowerSettingsHaveChanged = 855,
|
||||
VREvent_BackgroundSettingHasChanged = 850,
|
||||
VREvent_CameraSettingsHaveChanged = 851,
|
||||
VREvent_ReprojectionSettingHasChanged = 852,
|
||||
VREvent_ModelSkinSettingsHaveChanged = 853,
|
||||
VREvent_EnvironmentSettingsHaveChanged = 854,
|
||||
VREvent_PowerSettingsHaveChanged = 855,
|
||||
|
||||
VREvent_StatusUpdate = 900,
|
||||
VREvent_StatusUpdate = 900,
|
||||
|
||||
VREvent_MCImageUpdated = 1000,
|
||||
VREvent_MCImageUpdated = 1000,
|
||||
|
||||
VREvent_FirmwareUpdateStarted = 1100,
|
||||
VREvent_FirmwareUpdateFinished = 1101,
|
||||
VREvent_FirmwareUpdateStarted = 1100,
|
||||
VREvent_FirmwareUpdateFinished = 1101,
|
||||
|
||||
VREvent_KeyboardClosed = 1200,
|
||||
VREvent_KeyboardCharInput = 1201,
|
||||
VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard
|
||||
VREvent_KeyboardClosed = 1200,
|
||||
VREvent_KeyboardCharInput = 1201,
|
||||
VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard
|
||||
|
||||
VREvent_ApplicationTransitionStarted = 1300,
|
||||
VREvent_ApplicationTransitionAborted = 1301,
|
||||
VREvent_ApplicationTransitionNewAppStarted = 1302,
|
||||
VREvent_ApplicationListUpdated = 1303,
|
||||
VREvent_ApplicationMimeTypeLoad = 1304,
|
||||
VREvent_ApplicationTransitionStarted = 1300,
|
||||
VREvent_ApplicationTransitionAborted = 1301,
|
||||
VREvent_ApplicationTransitionNewAppStarted = 1302,
|
||||
VREvent_ApplicationListUpdated = 1303,
|
||||
VREvent_ApplicationMimeTypeLoad = 1304,
|
||||
VREvent_ApplicationTransitionNewAppLaunchComplete = 1305,
|
||||
VREvent_ProcessConnected = 1306,
|
||||
VREvent_ProcessDisconnected = 1307,
|
||||
|
||||
VREvent_Compositor_MirrorWindowShown = 1400,
|
||||
VREvent_Compositor_MirrorWindowHidden = 1401,
|
||||
VREvent_Compositor_ChaperoneBoundsShown = 1410,
|
||||
VREvent_Compositor_ChaperoneBoundsHidden = 1411,
|
||||
VREvent_Compositor_MirrorWindowShown = 1400,
|
||||
VREvent_Compositor_MirrorWindowHidden = 1401,
|
||||
VREvent_Compositor_ChaperoneBoundsShown = 1410,
|
||||
VREvent_Compositor_ChaperoneBoundsHidden = 1411,
|
||||
|
||||
VREvent_TrackedCamera_StartVideoStream = 1500,
|
||||
VREvent_TrackedCamera_StopVideoStream = 1501,
|
||||
@@ -515,26 +571,30 @@ enum EVREventType
|
||||
VREvent_TrackedCamera_ResumeVideoStream = 1503,
|
||||
VREvent_TrackedCamera_EditingSurface = 1550,
|
||||
|
||||
VREvent_PerformanceTest_EnableCapture = 1600,
|
||||
VREvent_PerformanceTest_DisableCapture = 1601,
|
||||
VREvent_PerformanceTest_FidelityLevel = 1602,
|
||||
VREvent_PerformanceTest_EnableCapture = 1600,
|
||||
VREvent_PerformanceTest_DisableCapture = 1601,
|
||||
VREvent_PerformanceTest_FidelityLevel = 1602,
|
||||
|
||||
VREvent_MessageOverlay_Closed = 1650,
|
||||
VREvent_MessageOverlay_Closed = 1650,
|
||||
|
||||
// Vendors are free to expose private events in this reserved region
|
||||
VREvent_VendorSpecific_Reserved_Start = 10000,
|
||||
VREvent_VendorSpecific_Reserved_End = 19999,
|
||||
VREvent_VendorSpecific_Reserved_Start = 10000,
|
||||
VREvent_VendorSpecific_Reserved_End = 19999,
|
||||
};
|
||||
|
||||
|
||||
/** Level of Hmd activity */
|
||||
// UserInteraction_Timeout means the device is in the process of timing out.
|
||||
// InUse = ( k_EDeviceActivityLevel_UserInteraction || k_EDeviceActivityLevel_UserInteraction_Timeout )
|
||||
// VREvent_TrackedDeviceUserInteractionStarted fires when the devices transitions from Standby -> UserInteraction or Idle -> UserInteraction.
|
||||
// VREvent_TrackedDeviceUserInteractionEnded fires when the devices transitions from UserInteraction_Timeout -> Idle
|
||||
enum EDeviceActivityLevel
|
||||
{
|
||||
k_EDeviceActivityLevel_Unknown = -1,
|
||||
k_EDeviceActivityLevel_Idle = 0,
|
||||
k_EDeviceActivityLevel_UserInteraction = 1,
|
||||
k_EDeviceActivityLevel_UserInteraction_Timeout = 2,
|
||||
k_EDeviceActivityLevel_Standby = 3,
|
||||
{
|
||||
k_EDeviceActivityLevel_Unknown = -1,
|
||||
k_EDeviceActivityLevel_Idle = 0, // No activity for the last 10 seconds
|
||||
k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now
|
||||
k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds
|
||||
k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management)
|
||||
};
|
||||
|
||||
|
||||
@@ -711,6 +771,12 @@ struct VREvent_MessageOverlay_t
|
||||
uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum
|
||||
};
|
||||
|
||||
struct VREvent_Property_t
|
||||
{
|
||||
PropertyContainerHandle_t container;
|
||||
ETrackedDeviceProperty prop;
|
||||
};
|
||||
|
||||
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
|
||||
typedef union
|
||||
{
|
||||
@@ -733,8 +799,16 @@ typedef union
|
||||
VREvent_ApplicationLaunch_t applicationLaunch;
|
||||
VREvent_EditingCameraSurface_t cameraSurface;
|
||||
VREvent_MessageOverlay_t messageOverlay;
|
||||
VREvent_Property_t property;
|
||||
} VREvent_Data_t;
|
||||
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
// This structure was originally defined mis-packed on Linux, preserved for
|
||||
// compatibility.
|
||||
#pragma pack( push, 4 )
|
||||
#endif
|
||||
|
||||
/** An event posted by the server to all running applications */
|
||||
struct VREvent_t
|
||||
{
|
||||
@@ -745,6 +819,9 @@ struct VREvent_t
|
||||
VREvent_Data_t data;
|
||||
};
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#pragma pack( pop )
|
||||
#endif
|
||||
|
||||
/** The mesh to draw into the stencil (or depth) buffer to perform
|
||||
* early stencil (or depth) kills of pixels that will never appear on the HMD.
|
||||
@@ -764,6 +841,8 @@ enum EHiddenAreaMeshType
|
||||
k_eHiddenAreaMesh_Standard = 0,
|
||||
k_eHiddenAreaMesh_Inverse = 1,
|
||||
k_eHiddenAreaMesh_LineLoop = 2,
|
||||
|
||||
k_eHiddenAreaMesh_Max = 3,
|
||||
};
|
||||
|
||||
|
||||
@@ -791,6 +870,12 @@ struct VRControllerAxis_t
|
||||
static const uint32_t k_unControllerStateAxisCount = 5;
|
||||
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
// This structure was originally defined mis-packed on Linux, preserved for
|
||||
// compatibility.
|
||||
#pragma pack( push, 4 )
|
||||
#endif
|
||||
|
||||
/** Holds all the state of a controller at one moment in time. */
|
||||
struct VRControllerState001_t
|
||||
{
|
||||
@@ -805,6 +890,9 @@ struct VRControllerState001_t
|
||||
// Axis data for the controller's analog inputs
|
||||
VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ];
|
||||
};
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#pragma pack( pop )
|
||||
#endif
|
||||
|
||||
|
||||
typedef VRControllerState001_t VRControllerState_t;
|
||||
@@ -887,6 +975,7 @@ enum EVRApplicationType
|
||||
// interfaces (like IVRSettings and IVRApplications) but not hardware.
|
||||
VRApplication_VRMonitor = 5, // Reserved for vrmonitor
|
||||
VRApplication_SteamWatchdog = 6,// Reserved for Steam
|
||||
VRApplication_Bootstrapper = 7, // Start up SteamVR
|
||||
|
||||
VRApplication_Max
|
||||
};
|
||||
@@ -1173,9 +1262,7 @@ public:
|
||||
|
||||
/** [D3D10/11 Only]
|
||||
* Returns the adapter index that the user should pass into EnumAdapters to create the device
|
||||
* and swap chain in DX10 and DX11. If an error occurs the index will be set to -1. The index will
|
||||
* also be -1 if the headset is in direct mode on the driver side instead of using the compositor's
|
||||
* builtin direct mode support.
|
||||
* and swap chain in DX10 and DX11. If an error occurs the index will be set to -1.
|
||||
*/
|
||||
virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0;
|
||||
|
||||
@@ -1453,6 +1540,7 @@ namespace vr
|
||||
VRApplicationProperty_IsDashboardOverlay_Bool = 60,
|
||||
VRApplicationProperty_IsTemplate_Bool = 61,
|
||||
VRApplicationProperty_IsInstanced_Bool = 62,
|
||||
VRApplicationProperty_IsInternal_Bool = 63,
|
||||
|
||||
VRApplicationProperty_LastLaunchTime_Uint64 = 70,
|
||||
};
|
||||
@@ -1600,6 +1688,11 @@ namespace vr
|
||||
* If working directory is NULL or "" the directory portion of the binary path will be
|
||||
* the working directory. */
|
||||
virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0;
|
||||
|
||||
/** Returns the current scene process ID according to the application system. A scene process will get scene
|
||||
* focus once it starts rendering, but it will appear here once it calls VR_Init with the Scene application
|
||||
* type. */
|
||||
virtual uint32_t GetCurrentSceneProcessId() = 0;
|
||||
};
|
||||
|
||||
static const char * const IVRApplications_Version = "IVRApplications_006";
|
||||
@@ -1657,7 +1750,6 @@ namespace vr
|
||||
static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd";
|
||||
static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug";
|
||||
static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe";
|
||||
static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion";
|
||||
static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX";
|
||||
static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY";
|
||||
static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps";
|
||||
@@ -1708,7 +1800,6 @@ namespace vr
|
||||
//-----------------------------------------------------------------------------
|
||||
// null keys
|
||||
static const char * const k_pch_Null_Section = "driver_null";
|
||||
static const char * const k_pch_Null_EnableNullDriver_Bool = "enable";
|
||||
static const char * const k_pch_Null_SerialNumber_String = "serialNumber";
|
||||
static const char * const k_pch_Null_ModelNumber_String = "modelNumber";
|
||||
static const char * const k_pch_Null_WindowX_Int32 = "windowX";
|
||||
@@ -1809,22 +1900,17 @@ namespace vr
|
||||
// model skin keys
|
||||
static const char * const k_pch_modelskin_Section = "modelskins";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// driver keys - These could be checked in any driver_<name> section
|
||||
static const char * const k_pch_Driver_Enable_Bool = "enable";
|
||||
|
||||
} // namespace vr
|
||||
|
||||
// ivrchaperone.h
|
||||
namespace vr
|
||||
{
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
|
||||
// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
|
||||
// The 64-bit version of gcc has the alignment requirement for these types set to
|
||||
// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
|
||||
// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
|
||||
#pragma pack( push, 4 )
|
||||
#else
|
||||
#pragma pack( push, 8 )
|
||||
#endif
|
||||
#pragma pack( push, 8 )
|
||||
|
||||
enum ChaperoneCalibrationState
|
||||
{
|
||||
@@ -1985,16 +2071,7 @@ static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
|
||||
namespace vr
|
||||
{
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
|
||||
// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
|
||||
// The 64-bit version of gcc has the alignment requirement for these types set to
|
||||
// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
|
||||
// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
|
||||
#pragma pack( push, 4 )
|
||||
#else
|
||||
#pragma pack( push, 8 )
|
||||
#endif
|
||||
#pragma pack( push, 8 )
|
||||
|
||||
/** Errors that can occur with the VR compositor */
|
||||
enum EVRCompositorError
|
||||
@@ -2237,8 +2314,10 @@ public:
|
||||
/** Temporarily suspends rendering (useful for finer control over scene transitions). */
|
||||
virtual void SuspendRendering( bool bSuspend ) = 0;
|
||||
|
||||
/** Opens a shared D3D11 texture with the undistorted composited image for each eye. */
|
||||
/** Opens a shared D3D11 texture with the undistorted composited image for each eye. Use ReleaseMirrorTextureD3D11 when finished
|
||||
* instead of calling Release on the resource itself. */
|
||||
virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0;
|
||||
virtual void ReleaseMirrorTextureD3D11( void *pD3D11ShaderResourceView ) = 0;
|
||||
|
||||
/** Access to mirror textures from OpenGL. */
|
||||
virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0;
|
||||
@@ -2258,7 +2337,7 @@ public:
|
||||
|
||||
};
|
||||
|
||||
static const char * const IVRCompositor_Version = "IVRCompositor_019";
|
||||
static const char * const IVRCompositor_Version = "IVRCompositor_020";
|
||||
|
||||
} // namespace vr
|
||||
|
||||
@@ -2268,16 +2347,7 @@ static const char * const IVRCompositor_Version = "IVRCompositor_019";
|
||||
namespace vr
|
||||
{
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
|
||||
// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
|
||||
// The 64-bit version of gcc has the alignment requirement for these types set to
|
||||
// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
|
||||
// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
|
||||
#pragma pack( push, 4 )
|
||||
#else
|
||||
#pragma pack( push, 8 )
|
||||
#endif
|
||||
#pragma pack( push, 8 )
|
||||
|
||||
// Used for passing graphic data
|
||||
struct NotificationBitmap_t
|
||||
@@ -2537,7 +2607,7 @@ namespace vr
|
||||
virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0;
|
||||
|
||||
/** Creates a new named overlay. All overlays start hidden and with default settings. */
|
||||
virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0;
|
||||
virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayName, VROverlayHandle_t * pOverlayHandle ) = 0;
|
||||
|
||||
/** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are
|
||||
* automatically destroyed. */
|
||||
@@ -2562,6 +2632,9 @@ namespace vr
|
||||
* the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */
|
||||
virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0;
|
||||
|
||||
/** set the name to use for this overlay */
|
||||
virtual EVROverlayError SetOverlayName( VROverlayHandle_t ulOverlayHandle, const char *pchName ) = 0;
|
||||
|
||||
/** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height
|
||||
* will be set and VROverlayError_ArrayTooSmall is returned. */
|
||||
virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0;
|
||||
@@ -2570,7 +2643,6 @@ namespace vr
|
||||
* of the error enum value for all valid error codes */
|
||||
virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0;
|
||||
|
||||
|
||||
// ---------------------------------------------
|
||||
// Overlay rendering methods
|
||||
// ---------------------------------------------
|
||||
@@ -2647,6 +2719,13 @@ namespace vr
|
||||
/** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */
|
||||
virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0;
|
||||
|
||||
/** Gets render model to draw behind this overlay */
|
||||
virtual uint32_t GetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, char *pchValue, uint32_t unBufferSize, HmdColor_t *pColor, vr::EVROverlayError *pError ) = 0;
|
||||
|
||||
/** Sets render model to draw behind this overlay and the vertex color to use, pass null for pColor to match the overlays vertex color.
|
||||
The model is scaled by the same amount as the overlay, with a default of 1m. */
|
||||
virtual vr::EVROverlayError SetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, const char *pchRenderModel, const HmdColor_t *pColor ) = 0;
|
||||
|
||||
/** Returns the transform type of this overlay. */
|
||||
virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0;
|
||||
|
||||
@@ -2669,6 +2748,12 @@ namespace vr
|
||||
/** Gets the transform information when the overlay is rendering on a component. */
|
||||
virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0;
|
||||
|
||||
/** Gets the transform if it is relative to another overlay. Returns an error if the transform is some other type. */
|
||||
virtual vr::EVROverlayError GetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t *ulOverlayHandleParent, HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0;
|
||||
|
||||
/** Sets the transform to relative to the transform of the specified overlay. This overlays visibility will also track the parents visibility */
|
||||
virtual vr::EVROverlayError SetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, const HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0;
|
||||
|
||||
/** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */
|
||||
virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0;
|
||||
|
||||
@@ -2839,7 +2924,7 @@ namespace vr
|
||||
virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0;
|
||||
};
|
||||
|
||||
static const char * const IVROverlay_Version = "IVROverlay_014";
|
||||
static const char * const IVROverlay_Version = "IVROverlay_016";
|
||||
|
||||
} // namespace vr
|
||||
|
||||
@@ -2853,16 +2938,7 @@ static const char * const k_pch_Controller_Component_Tip = "tip"; // F
|
||||
static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb
|
||||
static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
|
||||
// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
|
||||
// The 64-bit version of gcc has the alignment requirement for these types set to
|
||||
// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
|
||||
// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
|
||||
#pragma pack( push, 4 )
|
||||
#else
|
||||
#pragma pack( push, 8 )
|
||||
#endif
|
||||
|
||||
/** Errors that can occur with the VR compositor */
|
||||
enum EVRRenderModelError
|
||||
@@ -2911,11 +2987,20 @@ struct RenderModel_Vertex_t
|
||||
};
|
||||
|
||||
/** A texture map for use on a render model */
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
// This structure was originally defined mis-packed on Linux, preserved for
|
||||
// compatibility.
|
||||
#pragma pack( push, 4 )
|
||||
#endif
|
||||
|
||||
struct RenderModel_TextureMap_t
|
||||
{
|
||||
uint16_t unWidth, unHeight; // width and height of the texture map in pixels
|
||||
const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub
|
||||
};
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#pragma pack( pop )
|
||||
#endif
|
||||
|
||||
/** Session unique texture identifier. Rendermodels which share the same texture will have the same id.
|
||||
IDs <0 denote the texture is not present */
|
||||
@@ -2924,6 +3009,12 @@ typedef int32_t TextureID_t;
|
||||
|
||||
const TextureID_t INVALID_TEXTURE_ID = -1;
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
// This structure was originally defined mis-packed on Linux, preserved for
|
||||
// compatibility.
|
||||
#pragma pack( push, 4 )
|
||||
#endif
|
||||
|
||||
struct RenderModel_t
|
||||
{
|
||||
const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh
|
||||
@@ -2932,6 +3023,10 @@ struct RenderModel_t
|
||||
uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount
|
||||
TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present
|
||||
};
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#pragma pack( pop )
|
||||
#endif
|
||||
|
||||
|
||||
struct RenderModel_ControllerMode_State_t
|
||||
{
|
||||
@@ -3168,7 +3263,7 @@ public:
|
||||
* once SubmitScreenshot() is called.
|
||||
* If Steam is not running, the paths will be in the user's
|
||||
* documents folder under Documents\SteamVR\Screenshots.
|
||||
* Other VR applications can call this to initate a
|
||||
* Other VR applications can call this to initiate a
|
||||
* screenshot outside of user control.
|
||||
* The destination file names do not need an extension,
|
||||
* will be replaced with the correct one for the format
|
||||
@@ -3206,7 +3301,7 @@ public:
|
||||
* submitted scene textures of the running application and
|
||||
* write them into the preview image and a side-by-side file
|
||||
* for the VR image.
|
||||
* This is similiar to request screenshot, but doesn't ever
|
||||
* This is similar to request screenshot, but doesn't ever
|
||||
* talk to the application, just takes the shot and submits. */
|
||||
virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0;
|
||||
|
||||
@@ -3217,8 +3312,7 @@ public:
|
||||
* function will display a notification to the user that the
|
||||
* screenshot was taken. The paths should be full paths with
|
||||
* extensions.
|
||||
* File paths should be absolute including
|
||||
* exntensions.
|
||||
* File paths should be absolute including extensions.
|
||||
* screenshotHandle can be k_unScreenshotHandleInvalid if this
|
||||
* was a new shot taking by the app to be saved and not
|
||||
* initiated by a user (achievement earned or something) */
|
||||
@@ -3291,7 +3385,7 @@ namespace vr
|
||||
/** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */
|
||||
VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error );
|
||||
|
||||
/** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and
|
||||
/** Returns an English string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and
|
||||
* use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */
|
||||
VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user