sensics / OSVR-RenderManager

Apache License 2.0
64 stars 45 forks source link

OSVR-RenderManager

Join the chat at https://gitter.im/sensics/OSVR-RenderManager

This repository holds the open-source code for the OSVR RenderManager developed by Sensics. It is licensed under the Apache-2 license.

RenderManager is an API for rendering and presenting graphics for virtual reality. There is a detailed description below, but in short, it is a codebase that contains:

It has a set of submodules that point to sets of non-open source code to build vendor-specific extensions to support direct rendering. These were developed under non-disclosure agreements with the vendors.

Most Windows users will want to install the precompiled binaries (which include the DirectMode interfaces for nVidia, AMD, and Intel graphics cards) using the installers provided at the developer downloads site.

Those who don't have access to the NDA repositories get using:

git clone https://github.com/sensics/OSVR-RenderManager.git
cd OSVR-RenderManager
git submodule update --init --recursive vendor/vrpn

Sensics internal users, who have access to the NDA repos, get using:

git clone --recursive git@github.com:sensics/OSVR-RenderManager.git

This code is built using CMake, and as of 2/23/2016 compiled on Windows, Linux (tested on Ubuntu) and Mac-OSX. It makes use of SDL2 to construct windows and GLEW to set OpenGL settings, so install those packages before compiling. It also requires Eigen3, which is built as part of OSVR (so you can manually point CMake at its build) or can be installed separately (sudo apt-get install libeigen3-dev on Ubuntu, for example). The Linux and Mac ports only support OpenGL and do not yet support direct-to-display (DirectMode) rendering. The Android compile is done using the OSVR-Android-Build project.

What RenderManager Provides

RenderManager provides a number of functions beyond the OSVR-Core library in support of VR rendering. It wraps the Core functions in an easy-to-use interface that implements many VR-specific needs.

DirectMode: On platforms that support it, RenderManager implements direct rendering to the display, bypassing operating-system delays and enabling front- buffer rendering. On Windows, this is implemented using nVidia's VR Direct Mode rendering, AMD's Direct-to-Display rendering, and on Intel cards via a new Windows rendering interface that supports DirectMode. These share a common interface in RenderManager and plans are underway to extend these to new operating systems as they become available. DirectMode supports both D3D11 and OpenGL (core and legacy) on Windows except that OpenGL is not yet supported on Intel cards because they do not yet support the OpenGL/D3D interop calls.

The following capabilities are provided on all supported platforms:

Coming Soon

Android support is under development. As of 2/23/2016, the OpenGL internal code is all compatible with OpenGL ES 2.0 and there is an OpenGLES example application that build and links (not yet tested). Work is underway to port RenderManager to Android on top of the existing OSVR-Core port.

DirectMode/Linux is planned as graphics-card vendors finish drivers to enable it on this platform. It is being designed to use the same RenderManager interface and configuration files as the current Windows implementations.

Two RenderManager Interfaces

RenderManager provides two different interfaces, a Get/Present interface and a Callback interface. Example applications are provided that use each. The Callback interface provides the ability to easily render objects in multiple spaces (head space, hand space, etc.). The Get/Present interface lets the application have complete control over render-buffer construction.

Example programs

There are a number of example programs that highlight the different RenderManager interfaces and features.

Configuration

See the RenderManager Configuration document for more information on how to configure RenderManager.

Optimizing timing

See the Rendering Optimization document for more information on how to optimize rendering performance using RenderManager. (Warning: Some of this information is out of date as of 11/16/2016.)