Skip to content

Commit

Permalink
OpenVR SDK v1.2.10:
Browse files Browse the repository at this point in the history
General:
 * Added new, more specific error messages for many compositor startup failures.
 * Fix for IVRCompositor.GetFrameTimings C# binding (#1001)
 * Added VRNotifications and VRIOBuffer C# accessors.

Event and Overlay changes:
 * Scroll events have been split into two types. The first, VREvent_ScrollDiscrete, is meant for applications that are tuned to accept primarily detented mousewheel events, which replaces the previous VREvent_Scroll event. The second, VREvent_ScrollSmooth, is for applications that are tuned for more touchscreen-like, analog scrolling.
 * VROverlayFlags have been updated to allow overlays to indicate their preferred scroll event type. The VROverlayFlags_SendVRDiscreteScrollEvents flag renames the VROverlayFlags_SendVRScrollEvents flag, and the overlay will receive VREvent_ScrollDiscrete events when this flag is set. The VROverlayFlags_SendVRSmoothScrollEvents flag is added, and the overlay's owning application will receive VREvent_ScrollSmooth events when this flag is set.
 * VREvent_Input_BindingsUpdated is sent when a user has updated controller bindings using the system input binding UI.

IVRIOBuffer:
 * Adds ability for writers to detect if an IOBuffer has readers (IVRIOBuffer::HasReaders), to avoid potentially expensive writing work

[git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 4926575]
  • Loading branch information
Nat Brown committed Jan 30, 2019
1 parent fc60d2d commit 823135d
Show file tree
Hide file tree
Showing 19 changed files with 54 additions and 5 deletions.
Binary file modified bin/linux32/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux32/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/osx32/libopenvr_api.dylib
Binary file not shown.
Binary file not shown.
Binary file modified bin/win32/openvr_api.dll
Binary file not shown.
Binary file modified bin/win32/openvr_api.pdb
Binary file not shown.
Binary file modified bin/win64/openvr_api.dll
Binary file not shown.
Binary file modified bin/win64/openvr_api.pdb
Binary file not shown.
22 changes: 18 additions & 4 deletions headers/openvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -4820,6 +4820,16 @@ namespace vr
return m_pVRInput;
}

IVRIOBuffer *VRIOBuffer()
{
if ( !m_pVRIOBuffer )
{
EVRInitError eError;
m_pVRIOBuffer = ( IVRIOBuffer * )VR_GetGenericInterface( IVRIOBuffer_Version, &eError );
}
return m_pVRIOBuffer;
}

IVRSpatialAnchors *VRSpatialAnchors()
{
CheckClear();
Expand All @@ -4831,14 +4841,15 @@ namespace vr
return m_pVRSpatialAnchors;
}

IVRIOBuffer *VRIOBuffer()
IVRNotifications *VRNotifications()
{
if ( !m_pVRIOBuffer )
CheckClear();
if ( !m_pVRNotifications )
{
EVRInitError eError;
m_pVRIOBuffer = ( IVRIOBuffer * )VR_GetGenericInterface( IVRIOBuffer_Version, &eError );
m_pVRNotifications = ( IVRNotifications * )VR_GetGenericInterface( IVRNotifications_Version, &eError );
}
return m_pVRIOBuffer;
return m_pVRNotifications;
}

private:
Expand All @@ -4858,6 +4869,7 @@ namespace vr
IVRInput *m_pVRInput;
IVRIOBuffer *m_pVRIOBuffer;
IVRSpatialAnchors *m_pVRSpatialAnchors;
IVRNotifications *m_pVRNotifications;
};

inline COpenVRContext &OpenVRInternal_ModuleContext()
Expand All @@ -4882,6 +4894,7 @@ namespace vr
inline IVRInput *VR_CALLTYPE VRInput() { return OpenVRInternal_ModuleContext().VRInput(); }
inline IVRIOBuffer *VR_CALLTYPE VRIOBuffer() { return OpenVRInternal_ModuleContext().VRIOBuffer(); }
inline IVRSpatialAnchors *VR_CALLTYPE VRSpatialAnchors() { return OpenVRInternal_ModuleContext().VRSpatialAnchors(); }
inline IVRNotifications *VR_CALLTYPE VRNotifications() { return OpenVRInternal_ModuleContext().VRNotifications(); }

inline void COpenVRContext::Clear()
{
Expand All @@ -4901,6 +4914,7 @@ namespace vr
m_pVRInput = nullptr;
m_pVRIOBuffer = nullptr;
m_pVRSpatialAnchors = nullptr;
m_pVRNotifications = nullptr;
}

VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal2( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo );
Expand Down
33 changes: 33 additions & 0 deletions headers/openvr_api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5740,6 +5740,7 @@ public string rchRenderModelComponentName
public IntPtr m_pVRInput; // class vr::IVRInput *
public IntPtr m_pVRIOBuffer; // class vr::IVRIOBuffer *
public IntPtr m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors *
public IntPtr m_pVRNotifications; // class vr::IVRNotifications *
}

public class OpenVR
Expand Down Expand Up @@ -6058,7 +6059,9 @@ public void Clear()
m_pVRScreenshots = null;
m_pVRTrackedCamera = null;
m_pVRInput = null;
m_pIOBuffer = null;
m_pVRSpatialAnchors = null;
m_pVRNotifications = null;
}

void CheckClear()
Expand Down Expand Up @@ -6226,6 +6229,19 @@ public CVRInput VRInput()
return m_pVRInput;
}

public CVRIOBuffer VRIOBuffer()
{
CheckClear();
if (m_pVRIOBuffer == null)
{
var eError = EVRInitError.None;
var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix + IVRIOBuffer_Version, ref eError);
if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
m_pVRIOBuffer = new CVRIOBuffer(pInterface);
}
return m_pVRIOBuffer;
}

public CVRSpatialAnchors VRSpatialAnchors()
{
CheckClear();
Expand All @@ -6239,6 +6255,19 @@ public CVRSpatialAnchors VRSpatialAnchors()
return m_pVRSpatialAnchors;
}

public CVRNotifications VRNotifications()
{
CheckClear();
if (m_pVRNotifications == null)
{
var eError = EVRInitError.None;
var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix + IVRNotifications_Version, ref eError);
if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
m_pVRNotifications = new CVRNotifications(pInterface);
}
return m_pVRNotifications;
}

private CVRSystem m_pVRSystem;
private CVRChaperone m_pVRChaperone;
private CVRChaperoneSetup m_pVRChaperoneSetup;
Expand All @@ -6251,7 +6280,9 @@ public CVRSpatialAnchors VRSpatialAnchors()
private CVRScreenshots m_pVRScreenshots;
private CVRTrackedCamera m_pVRTrackedCamera;
private CVRInput m_pVRInput;
private CVRIOBuffer m_pVRIOBuffer;
private CVRSpatialAnchors m_pVRSpatialAnchors;
private CVRNotifications m_pVRNotifications;
};

private static COpenVRContext _OpenVRInternal_ModuleContext = null;
Expand All @@ -6277,7 +6308,9 @@ static COpenVRContext OpenVRInternal_ModuleContext
public static CVRScreenshots Screenshots { get { return OpenVRInternal_ModuleContext.VRScreenshots(); } }
public static CVRTrackedCamera TrackedCamera { get { return OpenVRInternal_ModuleContext.VRTrackedCamera(); } }
public static CVRInput Input { get { return OpenVRInternal_ModuleContext.VRInput(); } }
public static CVRIOBuffer IOBuffer { get { return OpenVRInternal_ModuleContext.VRIOBuffer(); } }
public static CVRSpatialAnchors SpatialAnchors { get { return OpenVRInternal_ModuleContext.VRSpatialAnchors(); } }
public static CVRNotifications Notifications { get { return OpenVRInternal_ModuleContext.VRNotifications(); } }

/** Finds the active installation of vrclient.dll and initializes it */
public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene, string pchStartupInfo= "")
Expand Down
3 changes: 2 additions & 1 deletion headers/openvr_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,8 @@
{ "fieldname": "m_pVRDriverManager", "fieldtype": "class vr::IVRDriverManager *"},
{ "fieldname": "m_pVRInput", "fieldtype": "class vr::IVRInput *"},
{ "fieldname": "m_pVRIOBuffer", "fieldtype": "class vr::IVRIOBuffer *"},
{ "fieldname": "m_pVRSpatialAnchors", "fieldtype": "class vr::IVRSpatialAnchors *"}]}
{ "fieldname": "m_pVRSpatialAnchors", "fieldtype": "class vr::IVRSpatialAnchors *"},
{ "fieldname": "m_pVRNotifications", "fieldtype": "class vr::IVRNotifications *"}]}
],
"methods":[{
"classname": "vr::IVRSystem",
Expand Down
1 change: 1 addition & 0 deletions headers/openvr_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2184,6 +2184,7 @@ typedef struct COpenVRContext
intptr_t m_pVRInput; // class vr::IVRInput *
intptr_t m_pVRIOBuffer; // class vr::IVRIOBuffer *
intptr_t m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors *
intptr_t m_pVRNotifications; // class vr::IVRNotifications *
} COpenVRContext;


Expand Down
Binary file modified lib/linux32/libopenvr_api.so
Binary file not shown.
Binary file modified lib/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified samples/bin/osx32/libopenvr_api.dylib
Binary file not shown.
Binary file modified samples/bin/win32/openvr_api.dll
Binary file not shown.
Binary file modified samples/bin/win64/openvr_api.dll
Binary file not shown.

0 comments on commit 823135d

Please sign in to comment.