valvesoftware / openvr Goto Github PK
View Code? Open in Web Editor NEWOpenVR SDK
Home Page: http://steamvr.com
License: BSD 3-Clause "New" or "Revised" License
OpenVR SDK
Home Page: http://steamvr.com
License: BSD 3-Clause "New" or "Revised" License
Hi there - I am on an older version of linux and my machines are using GLIBC_2.12. I see the linux64 build uses GLIBC_2.14 - any way to get a build with the older version of libc? Thanks.
Using 0.9.10, calling bounds info using the IVRChaperone interface (i.e. GetSoftBoundsInfo GetHardBoundsInfo) will only give valid data when:
vr::VRChaperone()->GetCalibrationState() == ChaperoneCalibrationState_OK
and GetCalibrationState() returns OK when the HMD is being tracked. Just wondering why we have this limitation if the actual data is already available in the *.vrchap file.
Ideally, it would be nice to initialize the bounds geometry at system startup instead pushing it to an update loop.
a number of functions and structures in the C API reference bool, which is not a C type until C99. the CAPI header should either avoid the use of bool or should include <stdbool.h>
to ensure it's properly declared.
When calling GetProjectionRaw the values return work well with the ComposeProjection method as specified in the docs.
However they are unconventional to say functions like:
-glFrustum
-D3DXMatrixPerspectiveOffCenterLH
-XMMatrixPerspectiveOffCenterLH
To compute the projection using any of the functions above, all values returned by GetProjectionRaw will have to be multiplied by the near clip plane. Also, top and bottom value need to change sign.
Is there a reason not to follow this convention ?
Hi,
I am trying to create a hmd driver.
I read/build 0.9.16 driver sample and put it to steamapps\common\SteamVR\drivers.
But there are still some problems:
It looks I get an un-workable setting object from driver host. Should I do any step to make it correct?
Could someone give me advice?
Thanks,
We built a plugin for OSVR. The plugin worked in a previous build of SteamVR, but in the latest version vrserver.exe crashes on startup.
Here is a log, right before the crash:
Mon Dec 21 2015 16:20:26.296 - ================================================================================================
Mon Dec 21 2015 16:20:26.296 - VR server (v1449513123) starting up with config=C:\Program Files (x86)\Steam\config
Mon Dec 21 2015 16:20:26.297 - Using default values. No Json Settings available at C:\Program Files (x86)\Steam\config\steamvr.vrsettings
Mon Dec 21 2015 16:20:26.297 - C:\Program Files (x86)\Steam\config\steamapps.vrmanifest - No applications in manifest
Mon Dec 21 2015 16:20:26.367 - lighthouse: Attached HID Devices:
Mon Dec 21 2015 16:20:26.367 - lighthouse: 1532, 300: s/n \\?\hid#vid_1532&pid_0300&mi_01#7&2c9ac49&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}: Razer Hydra (max-input-report 1)
Mon Dec 21 2015 16:20:26.367 - lighthouse: 572, 1410: s/n 00000000: RAZER USB AUDIO (max-input-report 3)
Mon Dec 21 2015 16:20:26.367 - lighthouse: 45E, DB: s/n \\?\hid#vid_045e&pid_00db&mi_01#7&2dd53404&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}: Natural® Ergonomic Keyboard 4000 (max-input-report 1)
Mon Dec 21 2015 16:20:26.367 - lighthouse: 1532, 300: s/n \\?\hid#vid_1532&pid_0300&mi_00#7&26a0ea0b&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}: Razer Hydra (max-input-report 0)
Mon Dec 21 2015 16:20:26.367 - Driver lighthouse has no HMDs. Skipping
Mon Dec 21 2015 16:20:26.369 - error VRInitError_Driver_RuntimeOutOfDate when initing driver oculus from C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\oculus\bin\win32\driver_oculus.dll.
Mon Dec 21 2015 16:20:26.369 - Unable to load driver oculus because of error 204. Skipping.
Mon Dec 21 2015 16:20:26.370 - osvr: ServerDriver_OSVR::Init() called.
Mon Dec 21 2015 16:20:26.448 - osvr: ServerDriver_OSVR::GetTrackedDeviceCount(): Detected 1 tracked devices.
Mon Dec 21 2015 16:20:26.448 - osvr: ServerDriver_OSVR::GetTrackedDeviceCount(): Detected 1 tracked devices.
Mon Dec 21 2015 16:20:26.448 - osvr: ServerDriver_OSVR::GetTrackedDeviceDriver(): Returning tracked device 0.
Mon Dec 21 2015 16:20:26.448 - Skipping osvr. because it is not an HMD
Mon Dec 21 2015 16:20:26.448 - osvr: ServerDriver_OSVR::GetTrackedDeviceCount(): Detected 1 tracked devices.
Mon Dec 21 2015 16:21:02.093 - ================================================================================================
Note the odd "Skipping osvr. because it is not an HMD message". That's new.
I also tried debugging into our plugin, but everything seems to be working properly just before the crash:
Running with breakpoints in all plugin functions/methods. Results:
Call order is:
HmdDriverFactory
function is called. Passes control through to TrackedDeviceDriverFactory
. interface_name
is IServerTrackedDeviceProvider_001
.ServerDriver_OSVR::Init
is called. The client context is created successfully. An OSVRTrackedDevice
is created and added to the _trackedDevices
list.ServerDriver_OSVR::GetTrackedDeviceCount
is called, twice. Both times returning 1.ServerDriver_OSVR::GetTrackedDeviceDriver
is called with index 0. The OSVRTrackedDevice
created in Init
is returned.OSVRTrackedDevice::GetModelNumber
is called. "OSVR HMD" is returned.OSVRTrackedDevice
aside from GetModelNumber
. More specifically, it hasn't called OSVRTrackedDevice::GetTrackedDeviceDriverInfo
which would tell it that the device is an HMD.ServerDriver_OSVR::GetTrackedDeviceCount
is called again. Returns 1.Everything appears to be working correctly before that odd message about osvr not being an HMD, right before one last GetTrackedDebviceCount
call and then a server crash outside of our DLL.
Was there a breaking change to the device SDK lately? Is this a known issue?
Could you please allow us to see the source for the null driver? It would save people beginning to write their own drivers some work and shouldn't contain anything secret.
I am currently trying to write my own and almost done, so it would be nice if I could get my hands on the null driver shipped with this.
When the number of segment count was 2 so juste a rectangle the DK2 freeze for all application.
GLushort m_iLensGridSegmentCountH = 2;
GLushort m_iLensGridSegmentCountV = 2;
The VRControllerState_t
's ulButtonPressed
and ulButtonTouched
both stay 0 when pressing the touchpad in as a button. (Touchpad & trigger axes + grip & application buttons are working fine)
While compiling the code in win64 i can't debug it..
For example it still uses vr::Compositor_TextureBounds
which has been replaced by vr::VRTextureBounds_t
(I think?) plus it uses some other deprecated stuff.
This is more of a suggestion than an issue.
Would be great to have a toggle in the Compositor interface to enable/disable the collision bounds overlay. In certain games, users might want to have a custom look and will prefer to just use the collision bounds geometry to do their own rendering.
Is there any plans to integrate Autodesk Stingray support, if not is it possible to set up a repo so people can start building it out ?
After much debugging and tests, it seems as though this function is not working. We'd like to be able to use it.
Starting here: https://github.com/ValveSoftware/openvr/blob/master/headers/openvr_capi.h#L73 the CAPI header declares a number of symbols like this:
char * IVRRenderModels_Version = "IVRRenderModels_001";
This means that if I include this header in multiple C or C++ source files, I end up with multiply defined symbols.
This should be correctable by either declaring the symbols to be static (local to the compilation module) or turning them into defines.
static char * IVRRenderModels_Version = "IVRRenderModels_001";
or
#define IVRRenderModels_Version "IVRRenderModels_001"
Experimental usage is showing that the enumerations appear to be named incorrectly. According to OpenVR.h:
/** Identifies what kind of axis is on the controller at index n. Read this type
* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n );
*/
enum EVRControllerAxisType
{
k_eControllerAxis_None = 0,
k_eControllerAxis_TrackPad = 1,
k_eControllerAxis_Joystick = 2,
k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis
};
However, in using the Vive DK1 controller, I see:
k_eControllerAxis_None reporting the touchpad axis values, and k_eControllerAxis_TrackPad reporting the trigger values.
Perhaps this is a driver-side issue?
hellovr and pathtools use some windows-only stuff. There seems to be some stuff for linux support, but it's incomplete.
As you can see here: https://github.com/ChristophHaag/openvr/commits/master it wouldn't be much work to actually make it run on linux, but it would be preferable to actually use the cross platform compatible functions directly and to have a proper build system like CMake.
edit: Wrote some hacky cmake stuff. Only works on linux, but at least it should work. Build instructions at the end of the README.
I'm using OpenVR in an app that already has stereoscopic rendering, I want to use only tracking data from OpenVR and use the IVRExtendedDisplay interface. From looking at documentation and header files, there's no real way to init IVRSystem without launching the compositor. When the compositor is present vr::ExtendedDisplay() return NULL and there's no way around that. I've tried SetDisplayVisibility(true) but it returns 0 without giving proper explanation of the error.
Hi,
A couple of weeks ago I spent some time developing a test QT widget based upon your helloworldoverlay
sample. I was using controllers with the non-GDC firmware dated 6/29/15 (or sometime in June). At the time, I was able to show/hide the QT widget overlay fine via the tiny black button.
Today I downloaded the latest version of openVR and I am no longer able to trigger the overlay via the tiny black button. I am also unable to spawn the overlay using the helloworldoverlay
sample that I was forking off of before. It's been a couple of weeks since the last time I've used anything related to the openvr overlays, and a number of SteamVR updates have occurred since my last use, so I was wondering if out-of-sync software/firmware could causing the tiny black button input to not be recognized.
I was hoping that you guys might have an idea of why I am unable to spawn the overlay like before. I'm on Windows 7 with the latest stable (non-beta) SteamVR plugin, and I can verify via the other SteamVR apps that the inputs on my controllers are being recognized (though no other apps use the black button, so I can't verify that input specifically). I have tested with a controller using the vcf_wired_controller_vrc_v2.bin
firmware (dated 6/29/15, or sometime in June), and with a controller using the more recent 7/6/15 version of that firmware.
Any suggestions would be greatly appreciated. Thanks for your time!
Hi,
Can you add some API to read the raw sensor data from the device?
Something like Oculus VT OVRDevice.GetAcceleration.
I couldn't find anything in the docs.
The headers look for the definition "GNUC", while Clang only defines "GNUC", a convention which seems more regular.
Here's a simple diff to resolve the issue:
diff --git a/headers/openvr.h b/headers/openvr.h
index 9a723c2..9c18799 100644
--- a/headers/openvr.h
+++ b/headers/openvr.h
@@ -809,7 +809,7 @@ enum EVRInitError
#define VR_INTERFACE extern "C" __declspec( dllimport )
#endif
-#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__)
+#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__)
#ifdef VR_API_EXPORT
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h
index d444196..c013418 100644
--- a/headers/openvr_driver.h
+++ b/headers/openvr_driver.h
@@ -809,7 +809,7 @@ enum EVRInitError
#define VR_INTERFACE extern "C" __declspec( dllimport )
#endif
-#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__)
+#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__)
#ifdef VR_API_EXPORT
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
the latest sample uses Qt5's QOpenGLFramebufferObject
. Qt5 on OS X is still 64-bit only (Qt community still struggling with serious errors in universal/32-bit builds), and since libopenvr_api.dylib
is 32-bit only on Mac you can't build the sample.
Simplest solution probably universal or additional 64-bit libopenvr_api.dylib
for OS X - it should have no trouble communicating x-proc to 32-bit steam, vrserver, eventual vrmonitor/compositor of either architecture.
The following types, which are used in openvr_driver.h, are never declared:
CameraVideoStreamFormat_e
CameraVideoStreamFrame_t
Without these types, the headers are not complete.
Direct 3d 9 support doesn't seem to work. There are a few issue.
Regular D3D9 fails on CreateDevice with D3DERR_LOSTDEVICE when using the HMD. On the other hand the device can be created when using the Null Driver.
If I use D3D9Ex instead, the CreateDevice call will succeed with both HMD & Null Driver.
In D3D9 mode the compositor submit will fail with the VRCompositorError_TextureUsesUnsupportedFormat error code. In D3D9Ex mode it will fail with the VRCompositorError_InvalidTexture error code.
where is the source code ?
I am having two issues (thus far) with the newly released 0.9.12 SDK:
especially the latter renders the current release unusable for me, since I am using the matrix to setup our renderer.
There appears to be no source available for this library. Even though it's nothing but a small wrapper for backend drivers (also closed source?), without source code it is not possible to add support for other HMDs, compile for platforms other those with provided binaries (e.g. Raspberry Pi), or use the library from GPLed applications such as Dolphin (which is already unable to release VR support using the Oculus SDK, despite a working proof of concept, for similar reasons). At best the BSD license on the header ensures the legal right to write a full reimplementation, but this does not seem to be an expected use, unlike in the case of standards such as OpenGL.
Sorry for the semi-troll issue, but I don't see how such a thing can be considered open.
Using sample project hellovr_opengl, the hmd crashes as soon as a fetch to the compositor interface is made. The returned last error is also null.
I have this file: ~/.openvr/openvrpaths.vrpath
It should be: ~/.config/openvr/openvrpaths.vrpath
Further reading:http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
I can create a D3D11 VR project using openvr and performing my own distortion and blit passes. Unfortunately when I try to use to compositor, the default grid shows up and not my submitted frames.
Other then initializing the compositor and submitting frames as such:
_compositor = VRCompositor();
_compositor->Submit(Eye_Left , API_DirectX, _textures[Eye_Left] , 0, Submit_LensDistortionAlreadyApplied);
_compositor->Submit(Eye_Right, API_DirectX, _textures[Eye_Right], 0, Submit_LensDistortionAlreadyApplied);
Am I missing anything?
I'm able to work around this by pasting these in manually after the #include.
struct VREvent_t
{
EVREventType eventType;
TrackedDeviceIndex_t trackedDeviceIndex;
VREvent_Data_t data;
float eventAgeSeconds;
};
inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; }
I previously could get my bounds quad geometry defined in *vrchap using GetHardBoundsInfo on ChaperoneUniverseHasChanged event. Currently, this is not working anymore since the latest steamVR update. The json id has changed to collision_bounds now (IIRC it used to be hard_bounds).
Could this explain the GetHardBoundsInfo returns zero quads now even though bounds geometry is defined ?
The C API header has the following includes:
#include "ivrsystem.h"
#include "ivrcameraaccess.h"
#include "ivrchaperone.h"
#include "ivrchaperonesetup.h"
#include "ivrcompositor.h"
None of which are in the release. Additionally, it includes openvr.h
itself, which makes use of namespaces, immediately making it impossible to use in C.
I had to make some modifications to get openvr_capi.h
to compile as a C file.
I'd do a pull request but I know the file is autogenerated, so I'll just list the changes here:
S_API
macro are using extern "C"
which doesn't make sense for an already C filevr::
namespace)VREvent_t
is missingVR_IVRControlPanel_GetCurrentCompositorInterface
returns a class IVRCompositor *
- is it meant to return an intptr_t
? I commented this one out.const
(just a warning cleanup)Along with the already reported:
VR_Event_Data_t
missing overlay, status, keyboard, ipd and chaperone fieldsVREvent_Overlay_t
, VREvent_Status_t
, VREvent_Keyboard_t
, VREvent_Chaperone_t
, and VREvent_Ipd_t
structs are missingButtonMaskFromId
declaration is missingHere's the diff
diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h
index a2fbff3..bc2bbba 100644
--- a/headers/openvr_capi.h
+++ b/headers/openvr_capi.h
@@ -14,23 +14,23 @@
// OPENVR API export macro
#if defined( _WIN32 ) && !defined( _X360 )
#if defined( OPENVR_API_EXPORTS )
- #define S_API extern "C" __declspec( dllexport )
+ #define S_API __declspec( dllexport )
#elif defined( OPENVR_API_NODLL )
- #define S_API extern "C"
+ #define S_API
#else
- #define S_API extern "C" __declspec( dllimport )
+ #define S_API __declspec( dllimport )
#endif // OPENVR_API_EXPORTS
#elif defined( GNUC )
#if defined( OPENVR_API_EXPORTS )
- #define S_API extern "C" __attribute__ ((visibility("default")))
+ #define S_API __attribute__ ((visibility("default")))
#else
- #define S_API extern "C"
+ #define S_API
#endif // OPENVR_API_EXPORTS
#else // !WIN32
#if defined( OPENVR_API_EXPORTS )
- #define S_API extern "C"
+ #define S_API
#else
- #define S_API extern "C"
+ #define S_API
#endif // OPENVR_API_EXPORTS
#endif
@@ -38,6 +38,18 @@
typedef char bool;
+/** Status of the overall system or tracked objects */
+typedef enum EVRState
+{
+ VRState_Undefined = -1,
+ VRState_Off = 0,
+ VRState_Searching = 1,
+ VRState_Searching_Alert = 2,
+ VRState_Ready = 3,
+ VRState_Ready_Alert = 4,
+ VRState_NotReady = 5,
+} EVRState;
+
typedef uint32_t TrackedDeviceIndex_t;
typedef uint32_t VRNotificationId;
@@ -62,6 +74,38 @@ typedef struct VREvent_Process_t
unsigned int oldPid;
} VREvent_Process_t;
+
+/** Used for a few events about overlays */
+typedef struct VREvent_Overlay_t
+{
+ uint64_t overlayHandle;
+} VREvent_Overlay_t;
+
+
+/** Used for a few events about overlays */
+typedef struct VREvent_Status_t
+{
+ EVRState statusState;
+} VREvent_Status_t;
+
+/** Used for keyboard events **/
+typedef struct VREvent_Keyboard_t
+{
+ char cNewInput[8]; // Up to 11 bytes of new input
+ uint64_t uUserValue; // Possible flags about the new input
+} VREvent_Keyboard_t;
+
+typedef struct VREvent_Ipd_t
+{
+ float ipdMeters;
+} VREvent_Ipd_t;
+
+typedef struct VREvent_Chaperone_t
+{
+ uint64_t m_nPreviousUniverse;
+ uint64_t m_nCurrentUniverse;
+} VREvent_Chaperone_t;
+
typedef struct VREvent_Reserved_t
{
unsigned long reserved0;
@@ -74,29 +118,21 @@ typedef union
VREvent_Controller_t controller;
VREvent_Mouse_t mouse;
VREvent_Process_t process;
+ VREvent_Overlay_t overlay;
+ VREvent_Status_t status;
+ VREvent_Keyboard_t keyboard;
+ VREvent_Ipd_t ipd;
+ VREvent_Chaperone_t chaperone;
} VREvent_Data_t;
+
typedef uint32_t TrackedDeviceIndex_t;
typedef uint64_t VROverlayHandle_t;
typedef uint32_t VRComponentProperties;
typedef int32_t TextureID_t;
typedef uint32_t VRNotificationId;
-typedef enum vr::EVRInitError HmdError;
-typedef enum vr::EVREye Hmd_Eye;
-typedef enum vr::EGraphicsAPIConvention GraphicsAPIConvention;
-typedef enum vr::EColorSpace ColorSpace;
-typedef enum vr::ETrackingResult HmdTrackingResult;
-typedef enum vr::ETrackedDeviceClass TrackedDeviceClass;
-typedef enum vr::ETrackingUniverseOrigin TrackingUniverseOrigin;
-typedef enum vr::ETrackedDeviceProperty TrackedDeviceProperty;
-typedef enum vr::ETrackedPropertyError TrackedPropertyError;
-typedef enum vr::EVRSubmitFlags VRSubmitFlags_t;
-typedef enum vr::EVRState VRState_t;
-typedef enum vr::ECollisionBoundsStyle CollisionBoundsStyle_t;
-typedef enum vr::EVROverlayError VROverlayError;
-typedef enum vr::EVRFirmwareError VRFirmwareError;
-typedef enum vr::EVRCompositorError VRCompositorError;
+
// OpenVR Constants
unsigned int k_unTrackingStringSize = 32;
unsigned int k_unMaxDriverDebugResponseSize = 32768;
@@ -106,75 +142,75 @@ unsigned int k_unTrackedDeviceIndexInvalid = 4294967295;
unsigned int k_unMaxPropertyStringSize = 32768;
unsigned int k_unControllerStateAxisCount = 5;
unsigned long k_ulOverlayHandleInvalid = 0;
-char * IVRSystem_Version = "IVRSystem_009";
-char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
+const char * IVRSystem_Version = "IVRSystem_009";
+const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
unsigned int k_unMaxApplicationKeyLength = 128;
-char * IVRApplications_Version = "IVRApplications_002";
-char * IVRChaperone_Version = "IVRChaperone_003";
-char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_004";
-char * IVRCompositor_Version = "IVRCompositor_009";
+const char * IVRApplications_Version = "IVRApplications_002";
+const char * IVRChaperone_Version = "IVRChaperone_003";
+const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_004";
+const char * IVRCompositor_Version = "IVRCompositor_009";
unsigned int k_unVROverlayMaxKeyLength = 128;
unsigned int k_unVROverlayMaxNameLength = 128;
unsigned int k_unMaxOverlayCount = 32;
-char * IVROverlay_Version = "IVROverlay_007";
-char * k_pch_Controller_Component_GDC2015 = "gdc2015";
-char * k_pch_Controller_Component_Base = "base";
-char * k_pch_Controller_Component_Tip = "tip";
-char * k_pch_Controller_Component_HandGrip = "handgrip";
-char * IVRRenderModels_Version = "IVRRenderModels_002";
-char * IVRControlPanel_Version = "IVRControlPanel_001";
+const char * IVROverlay_Version = "IVROverlay_007";
+const char * k_pch_Controller_Component_GDC2015 = "gdc2015";
+const char * k_pch_Controller_Component_Base = "base";
+const char * k_pch_Controller_Component_Tip = "tip";
+const char * k_pch_Controller_Component_HandGrip = "handgrip";
+const char * IVRRenderModels_Version = "IVRRenderModels_002";
+const char * IVRControlPanel_Version = "IVRControlPanel_001";
unsigned int k_unNotificationTextMaxSize = 256;
-char * IVRNotifications_Version = "IVRNotifications_002";
+const char * IVRNotifications_Version = "IVRNotifications_002";
unsigned int k_unMaxSettingsKeyLength = 128;
-char * k_pch_SteamVR_Section = "steamvr";
-char * k_pch_SteamVR_RequireHmd_String = "requireHmd";
-char * k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
-char * k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd";
-char * k_pch_SteamVR_DisplayDebug_Bool = "displayDebug";
-char * k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion";
-char * k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX";
-char * k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY";
-char * k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps";
-char * k_pch_SteamVR_LogLevel_Int32 = "loglevel";
-char * k_pch_SteamVR_IPD_Float = "ipd";
-char * k_pch_SteamVR_Background_String = "background";
-char * k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
-char * k_pch_Lighthouse_Section = "driver_lighthouse";
-char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
-char * k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
-char * k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
-char * k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
-char * k_pch_Lighthouse_LighthouseName_String = "lighthousename";
-char * k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees";
-char * k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect";
-char * k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
-char * k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx";
-char * k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety";
-char * k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz";
-char * k_pch_Lighthouse_HeadingOffset_Float = "headingoffset";
-char * k_pch_Null_Section = "driver_null";
-char * k_pch_Null_EnableNullDriver_Bool = "enable";
-char * k_pch_Null_Id_String = "id";
-char * k_pch_Null_SerialNumber_String = "serialNumber";
-char * k_pch_Null_ModelNumber_String = "modelNumber";
-char * k_pch_Null_WindowX_Int32 = "windowX";
-char * k_pch_Null_WindowY_Int32 = "windowY";
-char * k_pch_Null_WindowWidth_Int32 = "windowWidth";
-char * k_pch_Null_WindowHeight_Int32 = "windowHeight";
-char * k_pch_Null_RenderWidth_Int32 = "renderWidth";
-char * k_pch_Null_RenderHeight_Int32 = "renderHeight";
-char * k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons";
-char * k_pch_Null_DisplayFrequency_Float = "displayFrequency";
-char * k_pch_Notifications_Section = "notifications";
-char * k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
-char * k_pch_Perf_Section = "perfcheck";
-char * k_pch_Perf_HeuristicActive_Bool = "heuristicActive";
-char * k_pch_Perf_NotifyInHMD_Bool = "warnInHMD";
-char * k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce";
-char * k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
-char * k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
-char * IVRSettings_Version = "IVRSettings_001";
-char * IVRTrackedCamera_Version = "IVRTrackedCamera_001";
+const char * k_pch_SteamVR_Section = "steamvr";
+const char * k_pch_SteamVR_RequireHmd_String = "requireHmd";
+const char * k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
+const char * k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd";
+const char * k_pch_SteamVR_DisplayDebug_Bool = "displayDebug";
+const char * k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion";
+const char * k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX";
+const char * k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY";
+const char * k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps";
+const char * k_pch_SteamVR_LogLevel_Int32 = "loglevel";
+const char * k_pch_SteamVR_IPD_Float = "ipd";
+const char * k_pch_SteamVR_Background_String = "background";
+const char * k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
+const char * k_pch_Lighthouse_Section = "driver_lighthouse";
+const char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
+const char * k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
+const char * k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
+const char * k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
+const char * k_pch_Lighthouse_LighthouseName_String = "lighthousename";
+const char * k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees";
+const char * k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect";
+const char * k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
+const char * k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx";
+const char * k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety";
+const char * k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz";
+const char * k_pch_Lighthouse_HeadingOffset_Float = "headingoffset";
+const char * k_pch_Null_Section = "driver_null";
+const char * k_pch_Null_EnableNullDriver_Bool = "enable";
+const char * k_pch_Null_Id_String = "id";
+const char * k_pch_Null_SerialNumber_String = "serialNumber";
+const char * k_pch_Null_ModelNumber_String = "modelNumber";
+const char * k_pch_Null_WindowX_Int32 = "windowX";
+const char * k_pch_Null_WindowY_Int32 = "windowY";
+const char * k_pch_Null_WindowWidth_Int32 = "windowWidth";
+const char * k_pch_Null_WindowHeight_Int32 = "windowHeight";
+const char * k_pch_Null_RenderWidth_Int32 = "renderWidth";
+const char * k_pch_Null_RenderHeight_Int32 = "renderHeight";
+const char * k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons";
+const char * k_pch_Null_DisplayFrequency_Float = "displayFrequency";
+const char * k_pch_Notifications_Section = "notifications";
+const char * k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
+const char * k_pch_Perf_Section = "perfcheck";
+const char * k_pch_Perf_HeuristicActive_Bool = "heuristicActive";
+const char * k_pch_Perf_NotifyInHMD_Bool = "warnInHMD";
+const char * k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce";
+const char * k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
+const char * k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
+const char * IVRSettings_Version = "IVRSettings_001";
+const char * IVRTrackedCamera_Version = "IVRTrackedCamera_001";
@@ -307,17 +343,6 @@ typedef enum EVRSubmitFlags
EVRSubmitFlags_Submit_GlRenderBuffer = 2,
} EVRSubmitFlags;
-typedef enum EVRState
-{
- EVRState_VRState_Undefined = -1,
- EVRState_VRState_Off = 0,
- EVRState_VRState_Searching = 1,
- EVRState_VRState_Searching_Alert = 2,
- EVRState_VRState_Ready = 3,
- EVRState_VRState_Ready_Alert = 4,
- EVRState_VRState_NotReady = 5,
-} EVRState;
-
typedef enum EVREventType
{
EVREventType_VREvent_None = 0,
@@ -386,6 +411,15 @@ typedef enum EVREventType
EVREventType_VREvent_VendorSpecific_Reserved_End = 19999,
} EVREventType;
+/** An event posted by the server to all running applications */
+typedef struct VREvent_t
+{
+ EVREventType eventType;
+ TrackedDeviceIndex_t trackedDeviceIndex;
+ VREvent_Data_t data;
+ float eventAgeSeconds;
+} VREvent_t;
+
typedef enum EDeviceActivityLevel
{
EDeviceActivityLevel_k_EDeviceActivityLevel_Unknown = -1,
@@ -922,8 +956,23 @@ typedef struct CameraVideoStreamFrame_t
void * m_pImageData; // void *
} CameraVideoStreamFrame_t;
-
-
+inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; }
+
+typedef enum EVRInitError HmdError;
+typedef enum EVREye Hmd_Eye;
+typedef enum EGraphicsAPIConvention GraphicsAPIConvention;
+typedef enum EColorSpace ColorSpace;
+typedef enum ETrackingResult HmdTrackingResult;
+typedef enum ETrackedDeviceClass TrackedDeviceClass;
+typedef enum ETrackingUniverseOrigin TrackingUniverseOrigin;
+typedef enum ETrackedDeviceProperty TrackedDeviceProperty;
+typedef enum ETrackedPropertyError TrackedPropertyError;
+typedef enum EVRSubmitFlags VRSubmitFlags_t;
+typedef enum EVRState VRState_t;
+typedef enum ECollisionBoundsStyle CollisionBoundsStyle_t;
+typedef enum EVROverlayError VROverlayError;
+typedef enum EVRFirmwareError VRFirmwareError;
+typedef enum EVRCompositorError VRCompositorError;
S_API void VR_IVRSystem_GetRecommendedRenderTargetSize(intptr_t instancePtr, uint32_t * pnWidth, uint32_t * pnHeight);
S_API struct HmdMatrix44_t VR_IVRSystem_GetProjectionMatrix(intptr_t instancePtr, EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType);
@@ -1113,7 +1162,7 @@ S_API uint32_t VR_IVRControlPanel_GetDriverDisplaySerialNumber(intptr_t instance
S_API uint32_t VR_IVRControlPanel_LoadSharedResource(intptr_t instancePtr, const char * pchResourceName, char * pchBuffer, uint32_t unBufferLen);
S_API float VR_IVRControlPanel_GetIPD(intptr_t instancePtr);
S_API void VR_IVRControlPanel_SetIPD(intptr_t instancePtr, float fIPD);
-S_API class IVRCompositor * VR_IVRControlPanel_GetCurrentCompositorInterface(intptr_t instancePtr, const char * pchInterfaceVersion);
+// S_API class IVRCompositor * VR_IVRControlPanel_GetCurrentCompositorInterface(intptr_t instancePtr, const char * pchInterfaceVersion);
S_API bool VR_IVRControlPanel_QuitProcess(intptr_t instancePtr, uint32_t pidProcessToQuit);
S_API uint32_t VR_IVRControlPanel_StartVRProcess(intptr_t instancePtr, const char * pchExecutable, const char ** pchArguments, uint32_t unArgumentCount, const char * pchWorkingDirectory);
S_API void VR_IVRControlPanel_SetMasterProcessToThis(intptr_t instancePtr);
Noticed the Readme is a text file and was going to change that, but it looks like this file is generated internally according to #1. Is it possible to modify this internally? Text gets kind of messy if the Readme expands anywhere past what it currently is, plus it just doesn't look as nice.
There is a problem where rendering on AMD cards and OpenGL causes the color channels to be flipped from RGB to BGR
Seen on
Software
Hardware
Submit() currently caches the texture resolution for GL to avoid glGet* calls every frame. It would be nice if there was a way to signal to the Compositor that the input texture resolution has changed so it can re-query the resolution to ensure the copy operation is copying the correct pixels.
I tried to add my hmd driver according to steps in Wiki.
I implemented driver factory function, IClientTrackedDeviceProvider and IServerTrackedDeviceProvider and then put the DLL to drivers folder and execute hellovr_opengl for testing my DLL.
But the problem is that I can see only HmdDriverFactory and BIsHmdPresent were called in my dll.
And then it showed "Unable to init VR runtime: Hmd Not Found" dialog.
Could anyone provide more detail step to implement a hmd driver?
Sorry for this rookie question, I don't quite understand the flow, and appreciate for any comment.
In c174baf: LoadRenderModel has become LoadRenderModel_Async
Yet there is
openvr_capi.h
is missing 6 of the newer fields in VREvent_Data_t
from openvr.h
:
https://github.com/ValveSoftware/openvr/blob/master/headers/openvr_capi.h#L71
typedef union
{
VREvent_Reserved_t reserved;
VREvent_Controller_t controller;
VREvent_Mouse_t mouse;
VREvent_Process_t process;
} VREvent_Data_t;
Versus the version in openvr.h
https://github.com/ValveSoftware/openvr/blob/master/headers/openvr.h#L509
typedef union
{
VREvent_Reserved_t reserved;
VREvent_Controller_t controller;
VREvent_Mouse_t mouse;
VREvent_Process_t process;
VREvent_Notification_t notification;
VREvent_Overlay_t overlay;
VREvent_Status_t status;
VREvent_Keyboard_t keyboard;
VREvent_Ipd_t ipd;
VREvent_Chaperone_t chaperone;
} VREvent_Data_t;
See also #31 — the VREvent_t
type is missing entirely in openvr_capi.h
Thanks!
The latest beta of SteamVR, which has finally resolved #29, has also brought a more major issue: SteamVR no longer will load any real HMD driver on Mac OS X.
The Oculus driver (with Oculus Runtime 0.5) fails with little useful feedback, with "Unable to load driver oculus from /Users/user/..." and "Error 103: Unable to load driver "oculus".
The SteamVR-OSVR driver (https://github.com/OSVR/SteamVR-OSVR), which is built using this SDK, has a different error. SteamVR seemingly believes that the returned class derived from vr::ITrackedDeviceServerDriver is not an HMD, and bails out. However, the device is of class TrackedDeviceClass_HMD.
Unfortunately, due to these issues, SteamVR/OpenVR is now completely unusable on Mac OS X. These issues may affect other operating systems as well, but I have not had a chance to check.
The bin folder, for all platforms, contains shared libraries, as expected. However, while lib/win* folders contain static libraries (.lib files) the other appear to contain shared libraries again (.so instead for linux, .dylib for OSX instead of .a files).
After filling in the VRControllerState_t
struct via VR_IVRSystem_GetControllerState
, the values seem to be shifted up by one:
// Expected
float touchpadX = state.rAxis[1].x;
float touchpadY = state.rAxis[1].y;
float trigger = state.rAxis[2].x;
// Actual
float touchpadX = state.rAxis[1].y;
float touchpadY = state.rAxis[2].x;
float trigger = state.rAxis[2].y;
I'm on Windows 8 64bit, gcc 4.6.3 via MSYS2.
compile errors galore. Corrected locally by declaring typedef intptr_t VROverlayHandle_t;
before including openvr_capi.h
Hi, I noticed that the update yesterday no longer enforces 16:9 1080p, and that I can use up to ~21:9 1080p before any scaling occurs. Can you please give me the exact maximum dimensions in pixels before scaling occurs? This is so I know the hard limits for the size of my Qt widgets. Thanks.
I've been scouting around for examples of an integration of OpenSceneGraph and openvr, but didn't really find anything. I started working on it myself (using the hellovr_opengl example for hints) but wondered if anyone else out there had done any work on this, or has any pointers to similar projects?
The OpenVR Mac OS X dylib is unable to communicate with SteamVR BuildID 805924 — the OpenVR server never starts. If I downgrade to BuildID 768489, it seems to function.
I have not tested yet on Windows or Linux, but it would not surprise me if this breakage occurs on other platforms too — EDIT: This issue only affects Mac OS X.
The lib for osx32 needs to be updated to 0.9.14 its still on 0.9.13
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.