update to latest OpenVR 1.04 (and make minor API changes)

add premake5.exe (will remove premake4.exe soon)
This commit is contained in:
erwin coumans
2016-12-11 22:39:45 -08:00
parent a96fca486b
commit a393074793
15 changed files with 445 additions and 120 deletions

View File

@@ -146,7 +146,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 */
@@ -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,
@@ -702,7 +703,7 @@ struct VREvent_EditingCameraSurface_t
uint32_t nVisualMode;
};
/** If you change this you must manually update openvr_interop.cs.py */
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
typedef union
{
VREvent_Reserved_t reserved;
@@ -749,6 +750,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 +841,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
@@ -1260,9 +1271,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,7 +1286,8 @@ 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";
@@ -1286,6 +1298,7 @@ namespace vr
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";
//-----------------------------------------------------------------------------
@@ -1319,6 +1332,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 +1556,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 +1799,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 +1893,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 +1944,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";
}