Skip to content

IVRCompositor_Overview

aleiby edited this page Apr 23, 2015 · 15 revisions

#Overview#

The vr::IVRCompositor interfaces provides access to the Compositor subsystem. The Compositor simplifies the process of displaying images to the user by taking care of distortion, prediction, synchronization and other subtle issues that can be a challenge to get operating properly for a solid VR experience.

Applications call WaitGetPoses to get the set of poses used to render the camera and other tracked objects, render the left and right eyes as normal (using the info provided by IVRSystem) and finally Submit those undistorted textures for the Compositor to display in its own window.

It is recommended that you continue Presenting your application's own window, reusing either the left or right eye camera render target to draw a single quad (perhaps cropped to a lower fov to hide the hidden area mask).

Example:

SetGraphicsDevice
while Running:
    WaitGetPoses
    Render Left and Right cameras
    Submit Left and Right render targets
    Update game logic

Alternatively, you may wish to render serially in order to share a single render target across cameras:

SetGraphicsDevice
while Running:
    WaitGetPoses
    Render(L)
    Submit(L)
    Render(R)
    Submit(R)
    Update game logic

#Enumerations#

Compositor_DeviceType Compositor_FrameTiming Compositor_TextureBounds

#Interfaces#

The vr::IVRCompositor interface contains the following functions:

GetLastError SetVSync GetVSync SetGamma GetGamma SetGraphicsDevice WaitGetPoses Submit ClearLastSubmittedFrame GetOverlayDefaults SetOverlay SetOverlayRaw SetOverlayFromFile ClearOverlay GetFrameTiming FadeToColor FadeGrid CompositorBringToFront CompositorGoToBack CompositorQuit IsFullscreen ComputeOverlayIntersection

Clone this wiki locally