Updated to OpenVR 1.0.5
Added simple alarm clock to utilities page. Bugfixes and Improvements.
This commit is contained in:
+73
-47
@@ -111,10 +111,11 @@ enum EVREye
|
||||
Eye_Right = 1
|
||||
};
|
||||
|
||||
enum EGraphicsAPIConvention
|
||||
enum ETextureType
|
||||
{
|
||||
API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane
|
||||
API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane
|
||||
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
|
||||
};
|
||||
|
||||
enum EColorSpace
|
||||
@@ -126,8 +127,8 @@ enum EColorSpace
|
||||
|
||||
struct Texture_t
|
||||
{
|
||||
void* handle; // Native d3d texture pointer or GL texture id.
|
||||
EGraphicsAPIConvention eType;
|
||||
void* handle; // See ETextureType definition above
|
||||
ETextureType eType;
|
||||
EColorSpace eColorSpace;
|
||||
};
|
||||
|
||||
@@ -146,7 +147,6 @@ enum ETrackingResult
|
||||
TrackingResult_Running_OutOfRange = 201,
|
||||
};
|
||||
|
||||
static const uint32_t k_unTrackingStringSize = 32;
|
||||
static const uint32_t k_unMaxDriverDebugResponseSize = 32768;
|
||||
|
||||
/** Used to pass device IDs to API calls */
|
||||
@@ -162,11 +162,8 @@ enum ETrackedDeviceClass
|
||||
TrackedDeviceClass_Invalid = 0, // the ID was not valid.
|
||||
TrackedDeviceClass_HMD = 1, // Head-Mounted Displays
|
||||
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_Count, // This isn't a class that will ever be returned. It is used for allocating arrays and such
|
||||
|
||||
TrackedDeviceClass_Other = 1000,
|
||||
};
|
||||
|
||||
|
||||
@@ -199,7 +196,7 @@ enum ETrackingUniverseOrigin
|
||||
{
|
||||
TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose
|
||||
TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user
|
||||
TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one.
|
||||
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.
|
||||
};
|
||||
|
||||
|
||||
@@ -207,6 +204,8 @@ enum ETrackingUniverseOrigin
|
||||
* tracked device. Many fields are only valid for one ETrackedDeviceClass. */
|
||||
enum ETrackedDeviceProperty
|
||||
{
|
||||
Prop_Invalid = 0,
|
||||
|
||||
// general properties that apply to all device classes
|
||||
Prop_TrackingSystemName_String = 1000,
|
||||
Prop_ModelNumber_String = 1001,
|
||||
@@ -241,6 +240,7 @@ enum ETrackedDeviceProperty
|
||||
Prop_HasCamera_Bool = 1030,
|
||||
Prop_DriverVersion_String = 1031,
|
||||
Prop_Firmware_ForceUpdateRequired_Bool = 1032,
|
||||
Prop_ViveSystemButtonFixRequired_Bool = 1033,
|
||||
|
||||
// Properties that are unique to TrackedDeviceClass_HMD
|
||||
Prop_ReportsTimeSinceVSync_Bool = 2000,
|
||||
@@ -280,6 +280,7 @@ enum ETrackedDeviceProperty
|
||||
Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
|
||||
Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
|
||||
Prop_DisplaySuppressed_Bool = 2036,
|
||||
Prop_DisplayAllowNightMode_Bool = 2037,
|
||||
|
||||
// Properties that are unique to TrackedDeviceClass_Controller
|
||||
Prop_AttachedDeviceId_String = 3000,
|
||||
@@ -332,6 +333,7 @@ enum ETrackedPropertyError
|
||||
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,
|
||||
};
|
||||
|
||||
/** Allows the application to control what part of the provided texture will be used in the
|
||||
@@ -357,13 +359,13 @@ enum EVRSubmitFlags
|
||||
// If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag.
|
||||
Submit_GlRenderBuffer = 0x02,
|
||||
|
||||
// Handle is pointer to VulkanData_t
|
||||
Submit_VulkanTexture = 0x04,
|
||||
// Do not use
|
||||
Submit_Reserved = 0x04,
|
||||
};
|
||||
|
||||
/** Data required for passing Vulkan textures to IVRCompositor::Submit.
|
||||
* Be sure to call OpenVR_Shutdown before destroying these resources. */
|
||||
struct VulkanData_t
|
||||
struct VRVulkanTextureData_t
|
||||
{
|
||||
uint64_t m_nImage; // VkImage
|
||||
VkDevice_T *m_pDevice;
|
||||
@@ -516,6 +518,8 @@ enum EVREventType
|
||||
VREvent_PerformanceTest_EnableCapture = 1600,
|
||||
VREvent_PerformanceTest_DisableCapture = 1601,
|
||||
VREvent_PerformanceTest_FidelityLevel = 1602,
|
||||
|
||||
VREvent_MessageOverlay_Closed = 1650,
|
||||
|
||||
// Vendors are free to expose private events in this reserved region
|
||||
VREvent_VendorSpecific_Reserved_Start = 10000,
|
||||
@@ -702,7 +706,12 @@ struct VREvent_EditingCameraSurface_t
|
||||
uint32_t nVisualMode;
|
||||
};
|
||||
|
||||
/** If you change this you must manually update openvr_interop.cs.py */
|
||||
struct VREvent_MessageOverlay_t
|
||||
{
|
||||
uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum
|
||||
};
|
||||
|
||||
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
|
||||
typedef union
|
||||
{
|
||||
VREvent_Reserved_t reserved;
|
||||
@@ -723,6 +732,7 @@ typedef union
|
||||
VREvent_ScreenshotProgress_t screenshotProgress;
|
||||
VREvent_ApplicationLaunch_t applicationLaunch;
|
||||
VREvent_EditingCameraSurface_t cameraSurface;
|
||||
VREvent_MessageOverlay_t messageOverlay;
|
||||
} VREvent_Data_t;
|
||||
|
||||
/** An event posted by the server to all running applications */
|
||||
@@ -749,6 +759,14 @@ struct HiddenAreaMesh_t
|
||||
};
|
||||
|
||||
|
||||
enum EHiddenAreaMeshType
|
||||
{
|
||||
k_eHiddenAreaMesh_Standard = 0,
|
||||
k_eHiddenAreaMesh_Inverse = 1,
|
||||
k_eHiddenAreaMesh_LineLoop = 2,
|
||||
};
|
||||
|
||||
|
||||
/** Identifies what kind of axis is on the controller at index n. Read this type
|
||||
* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n );
|
||||
*/
|
||||
@@ -832,26 +850,28 @@ static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0;
|
||||
/** Errors that can occur around VR overlays */
|
||||
enum EVROverlayError
|
||||
{
|
||||
VROverlayError_None = 0,
|
||||
VROverlayError_None = 0,
|
||||
|
||||
VROverlayError_UnknownOverlay = 10,
|
||||
VROverlayError_InvalidHandle = 11,
|
||||
VROverlayError_PermissionDenied = 12,
|
||||
VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist
|
||||
VROverlayError_WrongVisibilityType = 14,
|
||||
VROverlayError_KeyTooLong = 15,
|
||||
VROverlayError_NameTooLong = 16,
|
||||
VROverlayError_KeyInUse = 17,
|
||||
VROverlayError_WrongTransformType = 18,
|
||||
VROverlayError_InvalidTrackedDevice = 19,
|
||||
VROverlayError_InvalidParameter = 20,
|
||||
VROverlayError_ThumbnailCantBeDestroyed = 21,
|
||||
VROverlayError_ArrayTooSmall = 22,
|
||||
VROverlayError_RequestFailed = 23,
|
||||
VROverlayError_InvalidTexture = 24,
|
||||
VROverlayError_UnableToLoadFile = 25,
|
||||
VROverlayError_KeyboardAlreadyInUse = 26,
|
||||
VROverlayError_NoNeighbor = 27,
|
||||
VROverlayError_UnknownOverlay = 10,
|
||||
VROverlayError_InvalidHandle = 11,
|
||||
VROverlayError_PermissionDenied = 12,
|
||||
VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist
|
||||
VROverlayError_WrongVisibilityType = 14,
|
||||
VROverlayError_KeyTooLong = 15,
|
||||
VROverlayError_NameTooLong = 16,
|
||||
VROverlayError_KeyInUse = 17,
|
||||
VROverlayError_WrongTransformType = 18,
|
||||
VROverlayError_InvalidTrackedDevice = 19,
|
||||
VROverlayError_InvalidParameter = 20,
|
||||
VROverlayError_ThumbnailCantBeDestroyed = 21,
|
||||
VROverlayError_ArrayTooSmall = 22,
|
||||
VROverlayError_RequestFailed = 23,
|
||||
VROverlayError_InvalidTexture = 24,
|
||||
VROverlayError_UnableToLoadFile = 25,
|
||||
VROverlayError_KeyboardAlreadyInUse = 26,
|
||||
VROverlayError_NoNeighbor = 27,
|
||||
VROverlayError_TooManyMaskPrimitives = 29,
|
||||
VROverlayError_BadMaskPrimitive = 30,
|
||||
};
|
||||
|
||||
/** enum values to pass in to VR_Init to identify whether the application will
|
||||
@@ -933,6 +953,8 @@ enum EVRInitError
|
||||
VRInitError_Init_InvalidApplicationType = 130,
|
||||
VRInitError_Init_NotAvailableToWatchdogApps = 131,
|
||||
VRInitError_Init_WatchdogDisabledInSettings = 132,
|
||||
VRInitError_Init_VRDashboardNotFound = 133,
|
||||
VRInitError_Init_VRDashboardStartupFailed = 134,
|
||||
|
||||
VRInitError_Driver_Failed = 200,
|
||||
VRInitError_Driver_Unknown = 201,
|
||||
@@ -1246,7 +1268,6 @@ namespace vr
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// steamvr keys
|
||||
|
||||
static const char * const k_pch_SteamVR_Section = "steamvr";
|
||||
static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd";
|
||||
static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
|
||||
@@ -1260,9 +1281,9 @@ 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_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection";
|
||||
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";
|
||||
@@ -1275,33 +1296,34 @@ namespace vr
|
||||
static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
|
||||
static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
|
||||
static const char * const k_pch_SteamVR_RenderTargetMultiplier_Float = "renderTargetMultiplier";
|
||||
static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowReprojection";
|
||||
static const char * const k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
|
||||
static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
|
||||
static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
|
||||
static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
|
||||
static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
|
||||
static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
|
||||
static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
|
||||
static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
|
||||
static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
|
||||
static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
|
||||
static const char * const k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
|
||||
static const char * const k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
|
||||
static const char * const k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
|
||||
static const char * const k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
|
||||
static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
|
||||
|
||||
static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// lighthouse keys
|
||||
|
||||
static const char * const k_pch_Lighthouse_Section = "driver_lighthouse";
|
||||
static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
|
||||
static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
|
||||
static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
|
||||
|
||||
static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
|
||||
static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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";
|
||||
@@ -1319,6 +1341,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_MinimizeToTray_Bool = "MinimizeToTray";
|
||||
static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots";
|
||||
static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
|
||||
|
||||
@@ -1542,9 +1565,8 @@ public:
|
||||
|
||||
/** Returns a string property. If the property is not available this function will return 0 and pError will be
|
||||
* set to an error. Otherwise it returns the length of the number of bytes necessary to hold this string including
|
||||
* the trailing null. If the buffer is too small the error will be TrackedProp_BufferTooSmall. Strings will
|
||||
* generally fit in buffers of k_unTrackingStringSize characters. Drivers may not return strings longer than
|
||||
* k_unMaxPropertyStringSize. */
|
||||
* the trailing null. If the buffer is too small the error will be TrackedProp_BufferTooSmall. Drivers may not
|
||||
* return strings longer than k_unMaxPropertyStringSize. */
|
||||
virtual uint32_t GetStringTrackedDeviceProperty( ETrackedDeviceProperty prop, char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError ) = 0;
|
||||
|
||||
};
|
||||
@@ -1786,6 +1808,10 @@ public:
|
||||
|
||||
/** Returns true if SteamVR is exiting */
|
||||
virtual bool IsExiting() = 0;
|
||||
|
||||
/** Returns true and fills the event with the next event on the queue if there is one. If there are no events
|
||||
* this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */
|
||||
virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -1876,7 +1902,7 @@ public:
|
||||
virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0;
|
||||
|
||||
/** always returns a pointer to a valid interface pointer of IVRSettings */
|
||||
virtual IVRSettings *GetSettings( const char *pchInterfaceVersion ) = 0;
|
||||
virtual void *GetGenericInterface( const char *pchInterfaceVersion ) = 0;
|
||||
|
||||
/** Client drivers in watchdog mode should call this when they have received a signal from hardware that should
|
||||
* cause SteamVR to start */
|
||||
@@ -1927,14 +1953,14 @@ public:
|
||||
* This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader.
|
||||
* NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye.
|
||||
*/
|
||||
virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0;
|
||||
virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type ) = 0;
|
||||
|
||||
/** Get the MC image for the current HMD.
|
||||
* Returns the size in bytes of the buffer required to hold the specified resource. */
|
||||
virtual uint32_t GetMCImage( uint32_t *pImgWidth, uint32_t *pImgHeight, uint32_t *pChannels, void *pDataBuffer, uint32_t unBufferLen ) = 0;
|
||||
};
|
||||
|
||||
static const char *IClientTrackedDeviceProvider_Version = "IClientTrackedDeviceProvider_004";
|
||||
static const char *IClientTrackedDeviceProvider_Version = "IClientTrackedDeviceProvider_005";
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user