An example OpenVR driver for demonstrating the IVRVirtualDisplay interface.
  • C++ 99.6%
  • MATLAB 0.3%
  • Batchfile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2017-06-14 19:29:15 -07:00
driver_virtual_display Initial revision 2017-06-14 15:06:59 -07:00
MATLAB Updated MATLAB sample 2017-06-14 19:29:15 -07:00
openvr/headers Initial revision 2017-06-14 15:06:59 -07:00
resources/settings Initial revision 2017-06-14 15:06:59 -07:00
shared Initial revision 2017-06-14 15:06:59 -07:00
virtual_display Initial revision 2017-06-14 15:06:59 -07:00
.gitignore Initial revision 2017-06-14 15:06:59 -07:00
driver.vrdrivermanifest Initial revision 2017-06-14 15:06:59 -07:00
driver_install.bat Initial revision 2017-06-14 15:06:59 -07:00
driver_uninstall.bat Initial revision 2017-06-14 15:06:59 -07:00
LICENSE Initial revision 2017-06-14 15:06:59 -07:00
OpenVR-VirtualDisplay.pdf Initial revision 2017-06-14 15:06:59 -07:00
README.md Initial revision 2017-06-14 15:06:59 -07:00
virtual_display.sln Initial revision 2017-06-14 15:06:59 -07:00

Virtual Display

An example OpenVR driver for demonstrating the IVRVirtualDisplay interface: https://github.com/ValveSoftware/openvr/blob/master/headers/openvr_driver.h#L2372

The IVRVirtualDisplay interface is provided to allow OpenVR driver authors access to the final composited backbuffer intended for the headset’s display. The primary expected use case is for wireless transport, though this could also be used for saving output to disk or streaming video. From the perspective of the runtime, the VR compositor is interfacing with a virtual rather than an actual display.

Prerequisites

Both Steam and SteamVR must be installed and working properly. Steam can be downloaded here: http://store.steampowered.com/ This sample relies on a second video card installed in the machine to act as the "remote display". An HTC Vive headset should be connected to this secondary graphics adapter. See the included PDF for more details.

Supported platforms

This example is currently Windows-only.

Installation

Two bat files are included in the root for registering the current directory with SteamVR. This must be done for the SteamVR runtime to find the driver. These files have hardcoded paths to the default Steam instalation location which you may need to edit by hand if you've installed Steam in a different location.

Building

The provided solution and project files were built using Visual Studio 2013. You will need to build both the Win32 and x64 project configurations in either Release or Debug.

Running

Once built, ensure your headset is plugged into the secondary graphics card and that it is in Extended Mode (i.e. shows up as part of th Windows desktop). Then launch SteamVR.

Troubleshooting

Check Steam/logs/vrserver.txt or step through the code. The parameters used to launch virtual_display.exe are printed to the log, which can be helpful for launching from the debugger. For debugging drivers, you can connect to Steam and then use the Child Process Debugging Addon from Microsoft.