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

BIN
build3/premake5.exe Normal file

Binary file not shown.

View File

@@ -16,6 +16,6 @@ del tmp1234.txt
cd build3
premake4 --double --midi --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010
premake5 --double --midi --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010
start vs2010

View File

@@ -676,7 +676,7 @@ bool CMainApplication::HandleInput()
for( vr::TrackedDeviceIndex_t unDevice = 0; unDevice < vr::k_unMaxTrackedDeviceCount; unDevice++ )
{
vr::VRControllerState_t state;
if( m_pHMD->GetControllerState( unDevice, &state ) )
if( m_pHMD->GetControllerState( unDevice, &state ,sizeof(vr::VRControllerState_t)) )
{
//we need to have the 'move' events, so no early out here
//if (sPrevStates[unDevice].unPacketNum != state.unPacketNum)
@@ -1488,8 +1488,9 @@ void CMainApplication::SetupDistortion()
u = x*w; v = 1-y*h;
vert.position = Vector2( Xoffset+u, -1+2*y*h );
vr::DistortionCoordinates_t dc0 = m_pHMD->ComputeDistortion(vr::Eye_Left, u, v);
vr::DistortionCoordinates_t dc0;
bool result = m_pHMD->ComputeDistortion(vr::Eye_Left, u, v,&dc0);
btAssert(result);
vert.texCoordRed = Vector2(dc0.rfRed[0], 1 - dc0.rfRed[1]);
vert.texCoordGreen = Vector2(dc0.rfGreen[0], 1 - dc0.rfGreen[1]);
vert.texCoordBlue = Vector2(dc0.rfBlue[0], 1 - dc0.rfBlue[1]);
@@ -1507,8 +1508,9 @@ void CMainApplication::SetupDistortion()
u = x*w; v = 1-y*h;
vert.position = Vector2( Xoffset+u, -1+2*y*h );
vr::DistortionCoordinates_t dc0 = m_pHMD->ComputeDistortion( vr::Eye_Right, u, v );
vr::DistortionCoordinates_t dc0;
bool result = m_pHMD->ComputeDistortion( vr::Eye_Right, u, v,&dc0 );
btAssert(result);
vert.texCoordRed = Vector2(dc0.rfRed[0], 1 - dc0.rfRed[1]);
vert.texCoordGreen = Vector2(dc0.rfGreen[0], 1 - dc0.rfGreen[1]);
vert.texCoordBlue = Vector2(dc0.rfBlue[0], 1 - dc0.rfBlue[1]);

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
@@ -1126,10 +1137,10 @@ public:
* application is doing something fancy like infinite Z */
virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0;
/** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in
/** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in
* the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport.
* Values may be NAN to indicate an error has occurred. */
virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0;
* Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */
virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0;
/** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head
* space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection.
@@ -1265,7 +1276,7 @@ public:
/** Returns a string property. If the device index is not valid or the property is not a string type this function will
* return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
* null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */
* null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */
virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0;
/** returns a string that corresponds with the specified property error. The string will be the name
@@ -1293,14 +1304,15 @@ public:
// Rendering helper methods
// ------------------------------------
/** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be
* NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering
* each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels.
* This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader.
/** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is
* applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively.
* This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view.
* This will improve performance 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.
* Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover.
* Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices.
*/
virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0;
virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0;
// ------------------------------------
// Controller methods
@@ -1308,12 +1320,12 @@ public:
/** Fills the supplied struct with the current state of the controller. Returns false if the controller index
* is invalid. */
virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0;
virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0;
/** fills the supplied struct with the current state of the controller and the provided pose with the pose of
* the controller when the controller state was updated most recently. Use this form if you need a precise controller
* pose as input to your application when the user presses or releases a button. */
virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0;
virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0;
/** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller
* and axis combination for 5ms. */
@@ -1346,7 +1358,6 @@ public:
* The size of the response including its terminating null is returned. */
virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0;
// ------------------------------------
// Firmware methods
// ------------------------------------
@@ -1358,7 +1369,6 @@ public:
* Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */
virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0;
// ------------------------------------
// Application life cycle methods
// ------------------------------------
@@ -1374,7 +1384,7 @@ public:
};
static const char * const IVRSystem_Version = "IVRSystem_012";
static const char * const IVRSystem_Version = "IVRSystem_014";
}
@@ -1644,9 +1654,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";
@@ -1659,7 +1669,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";
@@ -1670,6 +1681,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";
//-----------------------------------------------------------------------------
@@ -1703,6 +1715,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";
@@ -1987,10 +2000,17 @@ enum EVRCompositorError
VRCompositorError_TextureUsesUnsupportedFormat = 105,
VRCompositorError_SharedTexturesNotSupported = 106,
VRCompositorError_IndexOutOfRange = 107,
VRCompositorError_AlreadySubmitted = 108,
};
const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01;
const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02;
const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active,
// but does not indicate if reprojection actually happened or not.
// Use the ReprojectionReason flags above to check if reprojection
// was actually applied (i.e. scene texture was reused).
// NumFramePresents > 1 also indicates the scene texture was reused,
// and also the number of times that it was presented in total.
/** Provides a single frame's timing information to the app */
struct Compositor_FrameTiming
@@ -1998,6 +2018,7 @@ struct Compositor_FrameTiming
uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming )
uint32_t m_nFrameIndex;
uint32_t m_nNumFramePresents; // number of times this frame was presented
uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to
uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out
uint32_t m_nReprojectionFlags;
@@ -2074,7 +2095,14 @@ public:
/** Gets current tracking space returned by WaitGetPoses */
virtual ETrackingUniverseOrigin GetTrackingSpace() = 0;
/** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */
/** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay).
* This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to
* start rendering.
*
* Return codes:
* - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene)
* - DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app)
*/
virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount,
VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0;
@@ -2092,6 +2120,15 @@ public:
*
* OpenGL dirty state:
* glBindTexture
*
* Return codes:
* - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene)
* - DoNotHaveFocus (some other app has taken focus)
* - TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo)
* - SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device)
* - TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.)
* - InvalidTexture (usually means bad arguments passed in)
* - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again)
*/
virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0;
@@ -2110,6 +2147,10 @@ public:
* Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */
virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0;
/** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame.
* Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */
virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0;
/** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame.
* Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */
virtual float GetFrameTimeRemaining() = 0;
@@ -2122,9 +2163,15 @@ public:
* would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */
virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0;
/** Get current fade color value. */
virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0;
/** Fading the Grid in or out in fSeconds */
virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0;
/** Get current alpha value of grid. */
virtual float GetCurrentGridAlpha() = 0;
/** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough)
* Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format.
* If two are passed, it is assumed a lat-long stereo pair. */
@@ -2191,7 +2238,7 @@ public:
virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
};
static const char * const IVRCompositor_Version = "IVRCompositor_016";
static const char * const IVRCompositor_Version = "IVRCompositor_018";
} // namespace vr
@@ -2308,6 +2355,9 @@ namespace vr
/** The maximum number of overlays that can exist in the system at one time. */
static const uint32_t k_unMaxOverlayCount = 64;
/** The maximum number of overlay intersection mask primitives per overlay */
static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
/** Types of input supported by VR Overlays */
enum VROverlayInputMethod
{
@@ -2407,6 +2457,40 @@ namespace vr
OverlayDirection_Count = 4,
};
enum EVROverlayIntersectionMaskPrimitiveType
{
OverlayIntersectionPrimitiveType_Rectangle,
OverlayIntersectionPrimitiveType_Circle,
};
struct IntersectionMaskRectangle_t
{
float m_flTopLeftX;
float m_flTopLeftY;
float m_flWidth;
float m_flHeight;
};
struct IntersectionMaskCircle_t
{
float m_flCenterX;
float m_flCenterY;
float m_flRadius;
};
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */
typedef union
{
IntersectionMaskRectangle_t m_Rectangle;
IntersectionMaskCircle_t m_Circle;
} VROverlayIntersectionMaskPrimitive_Data_t;
struct VROverlayIntersectionMaskPrimitive_t
{
EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType;
VROverlayIntersectionMaskPrimitive_Data_t m_Primitive;
};
class IVROverlay
{
public:
@@ -2703,6 +2787,13 @@ namespace vr
/** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/
virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0;
// ---------------------------------------------
// Overlay input methods
// ---------------------------------------------
/** Sets a list of primitives to be used for controller ray intersection
* typically the size of the underlying UI in pixels (not in world space). */
virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0;
};
static const char * const IVROverlay_Version = "IVROverlay_013";

View File

@@ -31,7 +31,7 @@ public struct IVRSystem
internal _GetProjectionRaw GetProjectionRaw;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate DistortionCoordinates_t _ComputeDistortion(EVREye eEye, float fU, float fV);
internal delegate bool _ComputeDistortion(EVREye eEye, float fU, float fV, ref DistortionCoordinates_t pDistortionCoordinates);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ComputeDistortion ComputeDistortion;
@@ -171,17 +171,17 @@ public struct IVRSystem
internal _GetEventTypeNameFromEnum GetEventTypeNameFromEnum;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate HiddenAreaMesh_t _GetHiddenAreaMesh(EVREye eEye);
internal delegate HiddenAreaMesh_t _GetHiddenAreaMesh(EVREye eEye, EHiddenAreaMeshType type);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetHiddenAreaMesh GetHiddenAreaMesh;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetControllerState(uint unControllerDeviceIndex, ref VRControllerState_t pControllerState);
internal delegate bool _GetControllerState(uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, uint unControllerStateSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetControllerState GetControllerState;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin, uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, ref TrackedDevicePose_t pTrackedDevicePose);
internal delegate bool _GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin, uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, uint unControllerStateSize, ref TrackedDevicePose_t pTrackedDevicePose);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetControllerStateWithPose GetControllerStateWithPose;
@@ -675,6 +675,11 @@ public struct IVRCompositor
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetFrameTiming GetFrameTiming;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetFrameTimings(ref Compositor_FrameTiming pTiming, uint nFrames);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetFrameTimings GetFrameTimings;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate float _GetFrameTimeRemaining();
[MarshalAs(UnmanagedType.FunctionPtr)]
@@ -690,11 +695,21 @@ public struct IVRCompositor
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _FadeToColor FadeToColor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate HmdColor_t _GetCurrentFadeColor(bool bBackground);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCurrentFadeColor GetCurrentFadeColor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _FadeGrid(float fSeconds, bool bFadeIn);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _FadeGrid FadeGrid;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate float _GetCurrentGridAlpha();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCurrentGridAlpha GetCurrentGridAlpha;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _SetSkyboxOverride([In, Out] Texture_t[] pTextures, uint unTextureCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
@@ -1170,6 +1185,11 @@ public struct IVROverlay
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetKeyboardPositionForOverlay SetKeyboardPositionForOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayIntersectionMask(ulong ulOverlayHandle, ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, uint unNumMaskPrimitives, uint unPrimitiveSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayIntersectionMask SetOverlayIntersectionMask;
}
[StructLayout(LayoutKind.Sequential)]
@@ -1429,9 +1449,9 @@ public class CVRSystem
pfBottom = 0;
FnTable.GetProjectionRaw(eEye,ref pfLeft,ref pfRight,ref pfTop,ref pfBottom);
}
public DistortionCoordinates_t ComputeDistortion(EVREye eEye,float fU,float fV)
public bool ComputeDistortion(EVREye eEye,float fU,float fV,ref DistortionCoordinates_t pDistortionCoordinates)
{
DistortionCoordinates_t result = FnTable.ComputeDistortion(eEye,fU,fV);
bool result = FnTable.ComputeDistortion(eEye,fU,fV,ref pDistortionCoordinates);
return result;
}
public HmdMatrix34_t GetEyeToHeadTransform(EVREye eEye)
@@ -1568,19 +1588,19 @@ public class CVRSystem
IntPtr result = FnTable.GetEventTypeNameFromEnum(eType);
return Marshal.PtrToStringAnsi(result);
}
public HiddenAreaMesh_t GetHiddenAreaMesh(EVREye eEye)
public HiddenAreaMesh_t GetHiddenAreaMesh(EVREye eEye,EHiddenAreaMeshType type)
{
HiddenAreaMesh_t result = FnTable.GetHiddenAreaMesh(eEye);
HiddenAreaMesh_t result = FnTable.GetHiddenAreaMesh(eEye,type);
return result;
}
public bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerState_t pControllerState)
public bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize)
{
bool result = FnTable.GetControllerState(unControllerDeviceIndex,ref pControllerState);
bool result = FnTable.GetControllerState(unControllerDeviceIndex,ref pControllerState,unControllerStateSize);
return result;
}
public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,ref TrackedDevicePose_t pTrackedDevicePose)
public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose)
{
bool result = FnTable.GetControllerStateWithPose(eOrigin,unControllerDeviceIndex,ref pControllerState,ref pTrackedDevicePose);
bool result = FnTable.GetControllerStateWithPose(eOrigin,unControllerDeviceIndex,ref pControllerState,unControllerStateSize,ref pTrackedDevicePose);
return result;
}
public void TriggerHapticPulse(uint unControllerDeviceIndex,uint unAxisId,char usDurationMicroSec)
@@ -2117,6 +2137,11 @@ public class CVRCompositor
bool result = FnTable.GetFrameTiming(ref pTiming,unFramesAgo);
return result;
}
public uint GetFrameTimings(ref Compositor_FrameTiming pTiming,uint nFrames)
{
uint result = FnTable.GetFrameTimings(ref pTiming,nFrames);
return result;
}
public float GetFrameTimeRemaining()
{
float result = FnTable.GetFrameTimeRemaining();
@@ -2130,10 +2155,20 @@ public class CVRCompositor
{
FnTable.FadeToColor(fSeconds,fRed,fGreen,fBlue,fAlpha,bBackground);
}
public HmdColor_t GetCurrentFadeColor(bool bBackground)
{
HmdColor_t result = FnTable.GetCurrentFadeColor(bBackground);
return result;
}
public void FadeGrid(float fSeconds,bool bFadeIn)
{
FnTable.FadeGrid(fSeconds,bFadeIn);
}
public float GetCurrentGridAlpha()
{
float result = FnTable.GetCurrentGridAlpha();
return result;
}
public EVRCompositorError SetSkyboxOverride(Texture_t [] pTextures)
{
EVRCompositorError result = FnTable.SetSkyboxOverride(pTextures,(uint) pTextures.Length);
@@ -2623,6 +2658,11 @@ public class CVROverlay
{
FnTable.SetKeyboardPositionForOverlay(ulOverlayHandle,avoidRect);
}
public EVROverlayError SetOverlayIntersectionMask(ulong ulOverlayHandle,ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives,uint unNumMaskPrimitives,uint unPrimitiveSize)
{
EVROverlayError result = FnTable.SetOverlayIntersectionMask(ulOverlayHandle,ref pMaskPrimitives,unNumMaskPrimitives,unPrimitiveSize);
return result;
}
}
@@ -2876,21 +2916,21 @@ public class CVRResources
public class OpenVRInterop
{
[DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal")]
[DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal", CallingConvention = CallingConvention.Cdecl)]
internal static extern uint InitInternal(ref EVRInitError peError, EVRApplicationType eApplicationType);
[DllImportAttribute("openvr_api", EntryPoint = "VR_ShutdownInternal")]
[DllImportAttribute("openvr_api", EntryPoint = "VR_ShutdownInternal", CallingConvention = CallingConvention.Cdecl)]
internal static extern void ShutdownInternal();
[DllImportAttribute("openvr_api", EntryPoint = "VR_IsHmdPresent")]
[DllImportAttribute("openvr_api", EntryPoint = "VR_IsHmdPresent", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool IsHmdPresent();
[DllImportAttribute("openvr_api", EntryPoint = "VR_IsRuntimeInstalled")]
[DllImportAttribute("openvr_api", EntryPoint = "VR_IsRuntimeInstalled", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool IsRuntimeInstalled();
[DllImportAttribute("openvr_api", EntryPoint = "VR_GetStringForHmdError")]
[DllImportAttribute("openvr_api", EntryPoint = "VR_GetStringForHmdError", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr GetStringForHmdError(EVRInitError error);
[DllImportAttribute("openvr_api", EntryPoint = "VR_GetGenericInterface")]
[DllImportAttribute("openvr_api", EntryPoint = "VR_GetGenericInterface", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr GetGenericInterface([In, MarshalAs(UnmanagedType.LPStr)] string pchInterfaceVersion, ref EVRInitError peError);
[DllImportAttribute("openvr_api", EntryPoint = "VR_IsInterfaceVersionValid")]
[DllImportAttribute("openvr_api", EntryPoint = "VR_IsInterfaceVersionValid", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool IsInterfaceVersionValid([In, MarshalAs(UnmanagedType.LPStr)] string pchInterfaceVersion);
[DllImportAttribute("openvr_api", EntryPoint = "VR_GetInitToken")]
[DllImportAttribute("openvr_api", EntryPoint = "VR_GetInitToken", CallingConvention = CallingConvention.Cdecl)]
internal static extern uint GetInitToken();
}
@@ -2975,6 +3015,7 @@ public enum ETrackedDeviceProperty
Prop_HasCamera_Bool = 1030,
Prop_DriverVersion_String = 1031,
Prop_Firmware_ForceUpdateRequired_Bool = 1032,
Prop_ViveSystemButtonFixRequired_Bool = 1033,
Prop_ReportsTimeSinceVSync_Bool = 2000,
Prop_SecondsFromVsyncToPhotons_Float = 2001,
Prop_DisplayFrequency_Float = 2002,
@@ -3012,6 +3053,7 @@ public enum ETrackedDeviceProperty
Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
Prop_DisplaySuppressed_Bool = 2036,
Prop_DisplayAllowNightMode_Bool = 2037,
Prop_AttachedDeviceId_String = 3000,
Prop_SupportedButtons_Uint64 = 3001,
Prop_Axis0Type_Int32 = 3002,
@@ -3214,6 +3256,12 @@ public enum EVRMouseButton
Right = 2,
Middle = 4,
}
public enum EHiddenAreaMeshType
{
k_eHiddenAreaMesh_Standard = 0,
k_eHiddenAreaMesh_Inverse = 1,
k_eHiddenAreaMesh_LineLoop = 2,
}
public enum EVRControllerAxisType
{
k_eControllerAxis_None = 0,
@@ -3256,6 +3304,8 @@ public enum EVROverlayError
UnableToLoadFile = 25,
KeyboardAlreadyInUse = 26,
NoNeighbor = 27,
TooManyMaskPrimitives = 29,
BadMaskPrimitive = 30,
}
public enum EVRApplicationType
{
@@ -3483,6 +3533,7 @@ public enum EVRCompositorError
TextureUsesUnsupportedFormat = 105,
SharedTexturesNotSupported = 106,
IndexOutOfRange = 107,
AlreadySubmitted = 108,
}
public enum VROverlayInputMethod
{
@@ -3533,6 +3584,11 @@ public enum EOverlayDirection
Right = 3,
Count = 4,
}
public enum EVROverlayIntersectionMaskPrimitiveType
{
OverlayIntersectionPrimitiveType_Rectangle = 0,
OverlayIntersectionPrimitiveType_Circle = 1,
}
public enum EVRRenderModelError
{
None = 0,
@@ -3609,6 +3665,13 @@ public enum EVRScreenshotError
[FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be at the end due to a mono bug
}
[StructLayout(LayoutKind.Explicit)] public struct VROverlayIntersectionMaskPrimitive_Data_t
{
[FieldOffset(0)] public IntersectionMaskRectangle_t m_Rectangle;
[FieldOffset(0)] public IntersectionMaskCircle_t m_Circle;
}
[StructLayout(LayoutKind.Sequential)] public struct HmdMatrix34_t
{
public float m0; //float[3][4]
@@ -3898,6 +3961,7 @@ public enum EVRScreenshotError
public uint m_nSize;
public uint m_nFrameIndex;
public uint m_nNumFramePresents;
public uint m_nNumMisPresented;
public uint m_nNumDroppedFrames;
public uint m_nReprojectionFlags;
public double m_flSystemTimeInSeconds;
@@ -3950,6 +4014,24 @@ public enum EVRScreenshotError
public HmdVector2_t vUVs;
public float fDistance;
}
[StructLayout(LayoutKind.Sequential)] public struct IntersectionMaskRectangle_t
{
public float m_flTopLeftX;
public float m_flTopLeftY;
public float m_flWidth;
public float m_flHeight;
}
[StructLayout(LayoutKind.Sequential)] public struct IntersectionMaskCircle_t
{
public float m_flCenterX;
public float m_flCenterY;
public float m_flRadius;
}
[StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionMaskPrimitive_t
{
public EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType;
public VROverlayIntersectionMaskPrimitive_Data_t m_Primitive;
}
[StructLayout(LayoutKind.Sequential)] public struct RenderModel_ComponentState_t
{
public HmdMatrix34_t mTrackingToComponentRenderModel;
@@ -4048,7 +4130,6 @@ public class OpenVR
return OpenVRInterop.GetInitToken();
}
public const uint k_unTrackingStringSize = 32;
public const uint k_unMaxDriverDebugResponseSize = 32768;
public const uint k_unTrackedDeviceIndex_Hmd = 0;
public const uint k_unMaxTrackedDeviceCount = 16;
@@ -4058,7 +4139,7 @@ public class OpenVR
public const uint k_unControllerStateAxisCount = 5;
public const ulong k_ulOverlayHandleInvalid = 0;
public const uint k_unScreenshotHandleInvalid = 0;
public const string IVRSystem_Version = "IVRSystem_012";
public const string IVRSystem_Version = "IVRSystem_014";
public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
public const string IVRTrackedCamera_Version = "IVRTrackedCamera_003";
public const uint k_unMaxApplicationKeyLength = 128;
@@ -4067,10 +4148,11 @@ public class OpenVR
public const string IVRApplications_Version = "IVRApplications_006";
public const string IVRChaperone_Version = "IVRChaperone_003";
public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
public const string IVRCompositor_Version = "IVRCompositor_016";
public const string IVRCompositor_Version = "IVRCompositor_018";
public const uint k_unVROverlayMaxKeyLength = 128;
public const uint k_unVROverlayMaxNameLength = 128;
public const uint k_unMaxOverlayCount = 64;
public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
public const string IVROverlay_Version = "IVROverlay_013";
public const string k_pch_Controller_Component_GDC2015 = "gdc2015";
public const string k_pch_Controller_Component_Base = "base";
@@ -4095,9 +4177,9 @@ public class OpenVR
public const string k_pch_SteamVR_LogLevel_Int32 = "loglevel";
public const string k_pch_SteamVR_IPD_Float = "ipd";
public const string k_pch_SteamVR_Background_String = "background";
public const string k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection";
public const string k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight";
public const string k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
public const string k_pch_SteamVR_Environment_String = "environment";
public const string k_pch_SteamVR_GridColor_String = "gridColor";
public const string k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
public const string k_pch_SteamVR_ShowStage_Bool = "showStage";
@@ -4110,7 +4192,8 @@ public class OpenVR
public const string k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
public const string k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
public const string k_pch_SteamVR_RenderTargetMultiplier_Float = "renderTargetMultiplier";
public const string k_pch_SteamVR_AllowReprojection_Bool = "allowReprojection";
public const string k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
public const string k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
public const string k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
public const string k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
public const string k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
@@ -4121,6 +4204,7 @@ public class OpenVR
public const string k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
public const string k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
public const string k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
public const string k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
public const string k_pch_Lighthouse_Section = "driver_lighthouse";
public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
public const string k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
@@ -4141,6 +4225,7 @@ public class OpenVR
public const string k_pch_Null_DisplayFrequency_Float = "displayFrequency";
public const string k_pch_UserInterface_Section = "userinterface";
public const string k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
public const string k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray";
public const string k_pch_UserInterface_Screenshots_Bool = "screenshots";
public const string k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
public const string k_pch_Notifications_Section = "notifications";

View File

@@ -8,6 +8,7 @@
,{"typedef": "vr::VROverlayHandle_t","type": "uint64_t"}
,{"typedef": "vr::TrackedCameraHandle_t","type": "uint64_t"}
,{"typedef": "vr::ScreenshotHandle_t","type": "uint32_t"}
,{"typedef": "vr::VROverlayIntersectionMaskPrimitive_Data_t","type": "union VROverlayIntersectionMaskPrimitive_Data_t"}
,{"typedef": "vr::VRComponentProperties","type": "uint32_t"}
,{"typedef": "vr::TextureID_t","type": "int32_t"}
,{"typedef": "vr::VRNotificationId","type": "uint32_t"}
@@ -101,6 +102,7 @@
,{"name": "Prop_HasCamera_Bool","value": "1030"}
,{"name": "Prop_DriverVersion_String","value": "1031"}
,{"name": "Prop_Firmware_ForceUpdateRequired_Bool","value": "1032"}
,{"name": "Prop_ViveSystemButtonFixRequired_Bool","value": "1033"}
,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"}
,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"}
,{"name": "Prop_DisplayFrequency_Float","value": "2002"}
@@ -138,6 +140,7 @@
,{"name": "Prop_ScreenshotHorizontalFieldOfViewDegrees_Float","value": "2034"}
,{"name": "Prop_ScreenshotVerticalFieldOfViewDegrees_Float","value": "2035"}
,{"name": "Prop_DisplaySuppressed_Bool","value": "2036"}
,{"name": "Prop_DisplayAllowNightMode_Bool","value": "2037"}
,{"name": "Prop_AttachedDeviceId_String","value": "3000"}
,{"name": "Prop_SupportedButtons_Uint64","value": "3001"}
,{"name": "Prop_Axis0Type_Int32","value": "3002"}
@@ -333,6 +336,11 @@
,{"name": "VRMouseButton_Right","value": "2"}
,{"name": "VRMouseButton_Middle","value": "4"}
]}
, {"enumname": "vr::EHiddenAreaMeshType","values": [
{"name": "k_eHiddenAreaMesh_Standard","value": "0"}
,{"name": "k_eHiddenAreaMesh_Inverse","value": "1"}
,{"name": "k_eHiddenAreaMesh_LineLoop","value": "2"}
]}
, {"enumname": "vr::EVRControllerAxisType","values": [
{"name": "k_eControllerAxis_None","value": "0"}
,{"name": "k_eControllerAxis_TrackPad","value": "1"}
@@ -371,6 +379,8 @@
,{"name": "VROverlayError_UnableToLoadFile","value": "25"}
,{"name": "VROverlayError_KeyboardAlreadyInUse","value": "26"}
,{"name": "VROverlayError_NoNeighbor","value": "27"}
,{"name": "VROverlayError_TooManyMaskPrimitives","value": "29"}
,{"name": "VROverlayError_BadMaskPrimitive","value": "30"}
]}
, {"enumname": "vr::EVRApplicationType","values": [
{"name": "VRApplication_Other","value": "0"}
@@ -583,6 +593,7 @@
,{"name": "VRCompositorError_TextureUsesUnsupportedFormat","value": "105"}
,{"name": "VRCompositorError_SharedTexturesNotSupported","value": "106"}
,{"name": "VRCompositorError_IndexOutOfRange","value": "107"}
,{"name": "VRCompositorError_AlreadySubmitted","value": "108"}
]}
, {"enumname": "vr::VROverlayInputMethod","values": [
{"name": "VROverlayInputMethod_None","value": "0"}
@@ -627,6 +638,10 @@
,{"name": "OverlayDirection_Right","value": "3"}
,{"name": "OverlayDirection_Count","value": "4"}
]}
, {"enumname": "vr::EVROverlayIntersectionMaskPrimitiveType","values": [
{"name": "OverlayIntersectionPrimitiveType_Rectangle","value": "0"}
,{"name": "OverlayIntersectionPrimitiveType_Circle","value": "1"}
]}
, {"enumname": "vr::EVRRenderModelError","values": [
{"name": "VRRenderModelError_None","value": "0"}
,{"name": "VRRenderModelError_Loading","value": "100"}
@@ -679,8 +694,6 @@
]}
],
"consts":[{
"constname": "k_unTrackingStringSize","consttype": "const uint32_t", "constval": "32"}
,{
"constname": "k_unMaxDriverDebugResponseSize","consttype": "const uint32_t", "constval": "32768"}
,{
"constname": "k_unTrackedDeviceIndex_Hmd","consttype": "const uint32_t", "constval": "0"}
@@ -699,7 +712,7 @@
,{
"constname": "k_unScreenshotHandleInvalid","consttype": "const uint32_t", "constval": "0"}
,{
"constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_012"}
"constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_014"}
,{
"constname": "IVRExtendedDisplay_Version","consttype": "const char *const", "constval": "IVRExtendedDisplay_001"}
,{
@@ -717,13 +730,15 @@
,{
"constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_005"}
,{
"constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_016"}
"constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_018"}
,{
"constname": "k_unVROverlayMaxKeyLength","consttype": "const uint32_t", "constval": "128"}
,{
"constname": "k_unVROverlayMaxNameLength","consttype": "const uint32_t", "constval": "128"}
,{
"constname": "k_unMaxOverlayCount","consttype": "const uint32_t", "constval": "64"}
,{
"constname": "k_unMaxOverlayIntersectionMaskPrimitivesCount","consttype": "const uint32_t", "constval": "32"}
,{
"constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_013"}
,{
@@ -772,12 +787,12 @@
"constname": "k_pch_SteamVR_IPD_Float","consttype": "const char *const", "constval": "ipd"}
,{
"constname": "k_pch_SteamVR_Background_String","consttype": "const char *const", "constval": "background"}
,{
"constname": "k_pch_SteamVR_BackgroundUseDomeProjection_Bool","consttype": "const char *const", "constval": "backgroundUseDomeProjection"}
,{
"constname": "k_pch_SteamVR_BackgroundCameraHeight_Float","consttype": "const char *const", "constval": "backgroundCameraHeight"}
,{
"constname": "k_pch_SteamVR_BackgroundDomeRadius_Float","consttype": "const char *const", "constval": "backgroundDomeRadius"}
,{
"constname": "k_pch_SteamVR_Environment_String","consttype": "const char *const", "constval": "environment"}
,{
"constname": "k_pch_SteamVR_GridColor_String","consttype": "const char *const", "constval": "gridColor"}
,{
@@ -803,7 +818,9 @@
,{
"constname": "k_pch_SteamVR_RenderTargetMultiplier_Float","consttype": "const char *const", "constval": "renderTargetMultiplier"}
,{
"constname": "k_pch_SteamVR_AllowReprojection_Bool","consttype": "const char *const", "constval": "allowReprojection"}
"constname": "k_pch_SteamVR_AllowAsyncReprojection_Bool","consttype": "const char *const", "constval": "allowAsyncReprojection"}
,{
"constname": "k_pch_SteamVR_AllowReprojection_Bool","consttype": "const char *const", "constval": "allowInterleavedReprojection"}
,{
"constname": "k_pch_SteamVR_ForceReprojection_Bool","consttype": "const char *const", "constval": "forceReprojection"}
,{
@@ -824,6 +841,8 @@
"constname": "k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32","consttype": "const char *const", "constval": "CycleBackgroundImageTimeSec"}
,{
"constname": "k_pch_SteamVR_RetailDemo_Bool","consttype": "const char *const", "constval": "retailDemo"}
,{
"constname": "k_pch_SteamVR_IpdOffset_Float","consttype": "const char *const", "constval": "ipdOffset"}
,{
"constname": "k_pch_Lighthouse_Section","consttype": "const char *const", "constval": "driver_lighthouse"}
,{
@@ -864,6 +883,8 @@
"constname": "k_pch_UserInterface_Section","consttype": "const char *const", "constval": "userinterface"}
,{
"constname": "k_pch_UserInterface_StatusAlwaysOnTop_Bool","consttype": "const char *const", "constval": "StatusAlwaysOnTop"}
,{
"constname": "k_pch_UserInterface_MinimizeToTray_Bool","consttype": "const char *const", "constval": "MinimizeToTray"}
,{
"constname": "k_pch_UserInterface_Screenshots_Bool","consttype": "const char *const", "constval": "screenshots"}
,{
@@ -1157,6 +1178,7 @@
{ "fieldname": "m_nSize", "fieldtype": "uint32_t"},
{ "fieldname": "m_nFrameIndex", "fieldtype": "uint32_t"},
{ "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"},
{ "fieldname": "m_nNumMisPresented", "fieldtype": "uint32_t"},
{ "fieldname": "m_nNumDroppedFrames", "fieldtype": "uint32_t"},
{ "fieldname": "m_nReprojectionFlags", "fieldtype": "uint32_t"},
{ "fieldname": "m_flSystemTimeInSeconds", "fieldtype": "double"},
@@ -1202,6 +1224,21 @@
{ "fieldname": "vNormal", "fieldtype": "struct vr::HmdVector3_t"},
{ "fieldname": "vUVs", "fieldtype": "struct vr::HmdVector2_t"},
{ "fieldname": "fDistance", "fieldtype": "float"}]}
,{"struct": "vr::IntersectionMaskRectangle_t","fields": [
{ "fieldname": "m_flTopLeftX", "fieldtype": "float"},
{ "fieldname": "m_flTopLeftY", "fieldtype": "float"},
{ "fieldname": "m_flWidth", "fieldtype": "float"},
{ "fieldname": "m_flHeight", "fieldtype": "float"}]}
,{"struct": "vr::IntersectionMaskCircle_t","fields": [
{ "fieldname": "m_flCenterX", "fieldtype": "float"},
{ "fieldname": "m_flCenterY", "fieldtype": "float"},
{ "fieldname": "m_flRadius", "fieldtype": "float"}]}
,{"struct": "vr::(anonymous)","fields": [
{ "fieldname": "m_Rectangle", "fieldtype": "struct vr::IntersectionMaskRectangle_t"},
{ "fieldname": "m_Circle", "fieldtype": "struct vr::IntersectionMaskCircle_t"}]}
,{"struct": "vr::VROverlayIntersectionMaskPrimitive_t","fields": [
{ "fieldname": "m_nPrimitiveType", "fieldtype": "enum vr::EVROverlayIntersectionMaskPrimitiveType"},
{ "fieldname": "m_Primitive", "fieldtype": "VROverlayIntersectionMaskPrimitive_Data_t"}]}
,{"struct": "vr::RenderModel_ComponentState_t","fields": [
{ "fieldname": "mTrackingToComponentRenderModel", "fieldtype": "struct vr::HmdMatrix34_t"},
{ "fieldname": "mTrackingToComponentLocal", "fieldtype": "struct vr::HmdMatrix34_t"},
@@ -1276,11 +1313,12 @@
,{
"classname": "vr::IVRSystem",
"methodname": "ComputeDistortion",
"returntype": "struct vr::DistortionCoordinates_t",
"returntype": "bool",
"params": [
{ "paramname": "eEye" ,"paramtype": "vr::EVREye"},
{ "paramname": "fU" ,"paramtype": "float"},
{ "paramname": "fV" ,"paramtype": "float"}
{ "paramname": "fV" ,"paramtype": "float"},
{ "paramname": "pDistortionCoordinates" ,"paramtype": "struct vr::DistortionCoordinates_t *"}
]
}
,{
@@ -1516,7 +1554,8 @@
"methodname": "GetHiddenAreaMesh",
"returntype": "struct vr::HiddenAreaMesh_t",
"params": [
{ "paramname": "eEye" ,"paramtype": "vr::EVREye"}
{ "paramname": "eEye" ,"paramtype": "vr::EVREye"},
{ "paramname": "type" ,"paramtype": "vr::EHiddenAreaMeshType"}
]
}
,{
@@ -1525,7 +1564,8 @@
"returntype": "bool",
"params": [
{ "paramname": "unControllerDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"},
{ "paramname": "pControllerState" ,"paramtype": "vr::VRControllerState_t *"}
{ "paramname": "pControllerState" ,"paramtype": "vr::VRControllerState_t *"},
{ "paramname": "unControllerStateSize" ,"paramtype": "uint32_t"}
]
}
,{
@@ -1536,6 +1576,7 @@
{ "paramname": "eOrigin" ,"paramtype": "vr::ETrackingUniverseOrigin"},
{ "paramname": "unControllerDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"},
{ "paramname": "pControllerState" ,"paramtype": "vr::VRControllerState_t *"},
{ "paramname": "unControllerStateSize" ,"paramtype": "uint32_t"},
{ "paramname": "pTrackedDevicePose" ,"paramtype": "struct vr::TrackedDevicePose_t *"}
]
}
@@ -2333,6 +2374,15 @@
{ "paramname": "unFramesAgo" ,"paramtype": "uint32_t"}
]
}
,{
"classname": "vr::IVRCompositor",
"methodname": "GetFrameTimings",
"returntype": "uint32_t",
"params": [
{ "paramname": "pTiming" ,"paramtype": "struct vr::Compositor_FrameTiming *"},
{ "paramname": "nFrames" ,"paramtype": "uint32_t"}
]
}
,{
"classname": "vr::IVRCompositor",
"methodname": "GetFrameTimeRemaining",
@@ -2360,6 +2410,14 @@
{ "paramname": "bBackground" ,"paramtype": "bool"}
]
}
,{
"classname": "vr::IVRCompositor",
"methodname": "GetCurrentFadeColor",
"returntype": "struct vr::HmdColor_t",
"params": [
{ "paramname": "bBackground" ,"paramtype": "bool"}
]
}
,{
"classname": "vr::IVRCompositor",
"methodname": "FadeGrid",
@@ -2369,6 +2427,11 @@
{ "paramname": "bFadeIn" ,"paramtype": "bool"}
]
}
,{
"classname": "vr::IVRCompositor",
"methodname": "GetCurrentGridAlpha",
"returntype": "float"
}
,{
"classname": "vr::IVRCompositor",
"methodname": "SetSkyboxOverride",
@@ -3176,6 +3239,17 @@
{ "paramname": "avoidRect" ,"paramtype": "struct vr::HmdRect2_t"}
]
}
,{
"classname": "vr::IVROverlay",
"methodname": "SetOverlayIntersectionMask",
"returntype": "vr::EVROverlayError",
"params": [
{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
{ "paramname": "pMaskPrimitives" ,"paramtype": "struct vr::VROverlayIntersectionMaskPrimitive_t *"},
{ "paramname": "unNumMaskPrimitives" ,"paramtype": "uint32_t"},
{ "paramname": "unPrimitiveSize" ,"paramtype": "uint32_t"}
]
}
,{
"classname": "vr::IVRRenderModels",
"methodname": "LoadRenderModel_Async",

View File

@@ -46,12 +46,13 @@
#if defined( __WIN32 )
typedef char bool;
#else
#include <stdbool.h>
#endif
// OpenVR Constants
static const unsigned int k_unTrackingStringSize = 32;
static const unsigned int k_unMaxDriverDebugResponseSize = 32768;
static const unsigned int k_unTrackedDeviceIndex_Hmd = 0;
static const unsigned int k_unMaxTrackedDeviceCount = 16;
@@ -61,7 +62,7 @@ static const unsigned int k_unMaxPropertyStringSize = 32768;
static const unsigned int k_unControllerStateAxisCount = 5;
static const unsigned long k_ulOverlayHandleInvalid = 0;
static const unsigned int k_unScreenshotHandleInvalid = 0;
static const char * IVRSystem_Version = "IVRSystem_012";
static const char * IVRSystem_Version = "IVRSystem_014";
static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_003";
static const unsigned int k_unMaxApplicationKeyLength = 128;
@@ -70,10 +71,11 @@ static const char * k_pch_MimeType_GameTheater = "vr/game_theater";
static const char * IVRApplications_Version = "IVRApplications_006";
static const char * IVRChaperone_Version = "IVRChaperone_003";
static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
static const char * IVRCompositor_Version = "IVRCompositor_016";
static const char * IVRCompositor_Version = "IVRCompositor_018";
static const unsigned int k_unVROverlayMaxKeyLength = 128;
static const unsigned int k_unVROverlayMaxNameLength = 128;
static const unsigned int k_unMaxOverlayCount = 64;
static const unsigned int k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
static const char * IVROverlay_Version = "IVROverlay_013";
static const char * k_pch_Controller_Component_GDC2015 = "gdc2015";
static const char * k_pch_Controller_Component_Base = "base";
@@ -98,9 +100,9 @@ static const char * k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemBu
static const char * k_pch_SteamVR_LogLevel_Int32 = "loglevel";
static const char * k_pch_SteamVR_IPD_Float = "ipd";
static const char * k_pch_SteamVR_Background_String = "background";
static const char * k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection";
static const char * k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight";
static const char * k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
static const char * k_pch_SteamVR_Environment_String = "environment";
static const char * k_pch_SteamVR_GridColor_String = "gridColor";
static const char * k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
static const char * k_pch_SteamVR_ShowStage_Bool = "showStage";
@@ -113,7 +115,8 @@ static const char * k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speak
static const char * k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
static const char * k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
static const char * k_pch_SteamVR_RenderTargetMultiplier_Float = "renderTargetMultiplier";
static const char * k_pch_SteamVR_AllowReprojection_Bool = "allowReprojection";
static const char * k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
static const char * k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
static const char * k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
static const char * k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
static const char * k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
@@ -124,6 +127,7 @@ static const char * k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
static const char * k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
static const char * k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
static const char * k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
static const char * k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
static const char * k_pch_Lighthouse_Section = "driver_lighthouse";
static const char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
static const char * k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
@@ -144,6 +148,7 @@ static const char * k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsy
static const char * k_pch_Null_DisplayFrequency_Float = "displayFrequency";
static const char * k_pch_UserInterface_Section = "userinterface";
static const char * k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
static const char * k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray";
static const char * k_pch_UserInterface_Screenshots_Bool = "screenshots";
static const char * k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
static const char * k_pch_Notifications_Section = "notifications";
@@ -292,6 +297,7 @@ typedef enum ETrackedDeviceProperty
ETrackedDeviceProperty_Prop_HasCamera_Bool = 1030,
ETrackedDeviceProperty_Prop_DriverVersion_String = 1031,
ETrackedDeviceProperty_Prop_Firmware_ForceUpdateRequired_Bool = 1032,
ETrackedDeviceProperty_Prop_ViveSystemButtonFixRequired_Bool = 1033,
ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000,
ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001,
ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002,
@@ -329,6 +335,7 @@ typedef enum ETrackedDeviceProperty
ETrackedDeviceProperty_Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
ETrackedDeviceProperty_Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
ETrackedDeviceProperty_Prop_DisplaySuppressed_Bool = 2036,
ETrackedDeviceProperty_Prop_DisplayAllowNightMode_Bool = 2037,
ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000,
ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001,
ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002,
@@ -539,6 +546,13 @@ typedef enum EVRMouseButton
EVRMouseButton_VRMouseButton_Middle = 4,
} EVRMouseButton;
typedef enum EHiddenAreaMeshType
{
EHiddenAreaMeshType_k_eHiddenAreaMesh_Standard = 0,
EHiddenAreaMeshType_k_eHiddenAreaMesh_Inverse = 1,
EHiddenAreaMeshType_k_eHiddenAreaMesh_LineLoop = 2,
} EHiddenAreaMeshType;
typedef enum EVRControllerAxisType
{
EVRControllerAxisType_k_eControllerAxis_None = 0,
@@ -584,6 +598,8 @@ typedef enum EVROverlayError
EVROverlayError_VROverlayError_UnableToLoadFile = 25,
EVROverlayError_VROverlayError_KeyboardAlreadyInUse = 26,
EVROverlayError_VROverlayError_NoNeighbor = 27,
EVROverlayError_VROverlayError_TooManyMaskPrimitives = 29,
EVROverlayError_VROverlayError_BadMaskPrimitive = 30,
} EVROverlayError;
typedef enum EVRApplicationType
@@ -826,6 +842,7 @@ typedef enum EVRCompositorError
EVRCompositorError_VRCompositorError_TextureUsesUnsupportedFormat = 105,
EVRCompositorError_VRCompositorError_SharedTexturesNotSupported = 106,
EVRCompositorError_VRCompositorError_IndexOutOfRange = 107,
EVRCompositorError_VRCompositorError_AlreadySubmitted = 108,
} EVRCompositorError;
typedef enum VROverlayInputMethod
@@ -883,6 +900,12 @@ typedef enum EOverlayDirection
EOverlayDirection_OverlayDirection_Count = 4,
} EOverlayDirection;
typedef enum EVROverlayIntersectionMaskPrimitiveType
{
EVROverlayIntersectionMaskPrimitiveType_OverlayIntersectionPrimitiveType_Rectangle = 0,
EVROverlayIntersectionMaskPrimitiveType_OverlayIntersectionPrimitiveType_Circle = 1,
} EVROverlayIntersectionMaskPrimitiveType;
typedef enum EVRRenderModelError
{
EVRRenderModelError_VRRenderModelError_None = 0,
@@ -1251,6 +1274,7 @@ typedef struct Compositor_FrameTiming
uint32_t m_nSize;
uint32_t m_nFrameIndex;
uint32_t m_nNumFramePresents;
uint32_t m_nNumMisPresented;
uint32_t m_nNumDroppedFrames;
uint32_t m_nReprojectionFlags;
double m_flSystemTimeInSeconds;
@@ -1307,6 +1331,21 @@ typedef struct VROverlayIntersectionResults_t
float fDistance;
} VROverlayIntersectionResults_t;
typedef struct IntersectionMaskRectangle_t
{
float m_flTopLeftX;
float m_flTopLeftY;
float m_flWidth;
float m_flHeight;
} IntersectionMaskRectangle_t;
typedef struct IntersectionMaskCircle_t
{
float m_flCenterX;
float m_flCenterY;
float m_flRadius;
} IntersectionMaskCircle_t;
typedef struct RenderModel_ComponentState_t
{
struct HmdMatrix34_t mTrackingToComponentRenderModel;
@@ -1396,6 +1435,19 @@ struct VREvent_t
};
typedef union
{
IntersectionMaskRectangle_t m_Rectangle;
IntersectionMaskCircle_t m_Circle;
} VROverlayIntersectionMaskPrimitive_Data_t;
struct VROverlayIntersectionMaskPrimitive_t
{
EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType;
VROverlayIntersectionMaskPrimitive_Data_t m_Primitive;
};
// OpenVR Function Pointer Tables
struct VR_IVRSystem_FnTable
@@ -1403,7 +1455,7 @@ struct VR_IVRSystem_FnTable
void (OPENVR_FNTABLE_CALLTYPE *GetRecommendedRenderTargetSize)(uint32_t * pnWidth, uint32_t * pnHeight);
struct HmdMatrix44_t (OPENVR_FNTABLE_CALLTYPE *GetProjectionMatrix)(EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType);
void (OPENVR_FNTABLE_CALLTYPE *GetProjectionRaw)(EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom);
struct DistortionCoordinates_t (OPENVR_FNTABLE_CALLTYPE *ComputeDistortion)(EVREye eEye, float fU, float fV);
bool (OPENVR_FNTABLE_CALLTYPE *ComputeDistortion)(EVREye eEye, float fU, float fV, struct DistortionCoordinates_t * pDistortionCoordinates);
struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetEyeToHeadTransform)(EVREye eEye);
bool (OPENVR_FNTABLE_CALLTYPE *GetTimeSinceLastVsync)(float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter);
int32_t (OPENVR_FNTABLE_CALLTYPE *GetD3D9AdapterIndex)();
@@ -1431,9 +1483,9 @@ struct VR_IVRSystem_FnTable
bool (OPENVR_FNTABLE_CALLTYPE *PollNextEvent)(struct VREvent_t * pEvent, uint32_t uncbVREvent);
bool (OPENVR_FNTABLE_CALLTYPE *PollNextEventWithPose)(ETrackingUniverseOrigin eOrigin, struct VREvent_t * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose);
char * (OPENVR_FNTABLE_CALLTYPE *GetEventTypeNameFromEnum)(EVREventType eType);
struct HiddenAreaMesh_t (OPENVR_FNTABLE_CALLTYPE *GetHiddenAreaMesh)(EVREye eEye);
bool (OPENVR_FNTABLE_CALLTYPE *GetControllerState)(TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState);
bool (OPENVR_FNTABLE_CALLTYPE *GetControllerStateWithPose)(ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState, struct TrackedDevicePose_t * pTrackedDevicePose);
struct HiddenAreaMesh_t (OPENVR_FNTABLE_CALLTYPE *GetHiddenAreaMesh)(EVREye eEye, EHiddenAreaMeshType type);
bool (OPENVR_FNTABLE_CALLTYPE *GetControllerState)(TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState, uint32_t unControllerStateSize);
bool (OPENVR_FNTABLE_CALLTYPE *GetControllerStateWithPose)(ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState, uint32_t unControllerStateSize, struct TrackedDevicePose_t * pTrackedDevicePose);
void (OPENVR_FNTABLE_CALLTYPE *TriggerHapticPulse)(TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec);
char * (OPENVR_FNTABLE_CALLTYPE *GetButtonIdNameFromEnum)(EVRButtonId eButtonId);
char * (OPENVR_FNTABLE_CALLTYPE *GetControllerAxisTypeNameFromEnum)(EVRControllerAxisType eAxisType);
@@ -1550,10 +1602,13 @@ struct VR_IVRCompositor_FnTable
void (OPENVR_FNTABLE_CALLTYPE *ClearLastSubmittedFrame)();
void (OPENVR_FNTABLE_CALLTYPE *PostPresentHandoff)();
bool (OPENVR_FNTABLE_CALLTYPE *GetFrameTiming)(struct Compositor_FrameTiming * pTiming, uint32_t unFramesAgo);
uint32_t (OPENVR_FNTABLE_CALLTYPE *GetFrameTimings)(struct Compositor_FrameTiming * pTiming, uint32_t nFrames);
float (OPENVR_FNTABLE_CALLTYPE *GetFrameTimeRemaining)();
void (OPENVR_FNTABLE_CALLTYPE *GetCumulativeStats)(struct Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes);
void (OPENVR_FNTABLE_CALLTYPE *FadeToColor)(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground);
struct HmdColor_t (OPENVR_FNTABLE_CALLTYPE *GetCurrentFadeColor)(bool bBackground);
void (OPENVR_FNTABLE_CALLTYPE *FadeGrid)(float fSeconds, bool bFadeIn);
float (OPENVR_FNTABLE_CALLTYPE *GetCurrentGridAlpha)();
EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SetSkyboxOverride)(struct Texture_t * pTextures, uint32_t unTextureCount);
void (OPENVR_FNTABLE_CALLTYPE *ClearSkyboxOverride)();
void (OPENVR_FNTABLE_CALLTYPE *CompositorBringToFront)();
@@ -1652,6 +1707,7 @@ struct VR_IVROverlay_FnTable
void (OPENVR_FNTABLE_CALLTYPE *HideKeyboard)();
void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform);
void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardPositionForOverlay)(VROverlayHandle_t ulOverlayHandle, struct HmdRect2_t avoidRect);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayIntersectionMask)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize);
};
struct VR_IVRRenderModels_FnTable

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";
}