-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Driver Documentation
Nathan Nuber edited this page Mar 3, 2022
·
21 revisions
Let's say you want to write a new OpenVR driver called "mydriver". To do that you will need to following the steps below.
- Put all the files for your driver under a directory. Let's say that directory is "/mydriver"
- Add a new DLL to "mydriver/bin/win64/driver_mydriver.dll" (For Linux and OSX use the appropriate platform directory and the appropriate shared library extension.)
- Implement the driver factory function in that DLL.
-
Add an implementation ofThis was removed in OpenVR version 1.0.6.vr::IClientTrackedDeviceProvider
to the DLL and return it from the factory. This provider will be phased out in the next SDK udpate, but for now you need it. - Add an implementation of
vr::IServerTrackedDeviceProvider
and have that return implementations ofvr::ITrackedDeviceServerDriver
for each tracked device. - Add a driver manifest file to "/mydriver"
- Add your driver to SteamVR's config file using vrpathreg. vrpathreg.exe is available in the user's SteamVR install directory. Invoke it with the adddriver command like so: vrpathreg adddriver "/mydriver".
- SteamVR's install directory can be located on Windows using the registry. On Windows 10, use the standard uninstall key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 250820
- If you are working directly with Valve to deploy your driver, this step may not be necessary outside of testing. Please ask your Valve contact about this step in relation to the Steam store.
For devices with buttons, triggers, joysticks, and other kinds of input controls, please refer to the vr::IVRDriverInput
API.
For devices that wish to provide animation data through the Skeletal Input system, please refer to the Skeletal Input Driver documentation.
There is a sample driver available here which implements these interfaces and includes an example HMD/controller.
Other driver documentation: