-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Driver Documentation
Joe Ludwig edited this page Jun 1, 2015
·
21 revisions
Let's say you want to write a new OpenVR driver called "myhmd". To do that you will need to following the steps below.
- Add a new directory called "/SteamApps/common/openvr/drivers/myhmd"
- Add a new DLL (or dylib or so) to "drivers/myhmd/bin/win32/driver_myhmd.dll"
- Implement the driver factory function in that DLL.
- Add an implementation of (
vr::IClientTrackedDeviceProvider
)[https://github.com/ValveSoftware/openvr/wiki/IClientTrackedDeviceProvider_Overview] to the DLL and return it from the factory. This interface is used in vrclient.dll for HMD presence checks and various other client-side operations. - Add an implementation of (
vr::IServerTrackedDeviceProvider
)[https://github.com/ValveSoftware/openvr/wiki/IServerTrackedDeviceProvider_Overview] and have that return implementations ofvr::ITrackedDeviceServerDriver
for each tracked device.
If you want your new driver to work from 64 bit apps, you will also need a 64-bit DLL in "drivers/myhmd/bin/win64/driver_myhmd.dll" that implements all the same things. Same thing for other platforms.