DisableVR ( )

Parameters

None.

Description

Returns to ordinary desktop rendering.

It finishes any frame in progress, detaches the VR listener, frees the VRHeadPivot and VRHandPivot pivots and asks the headset's runtime to end the session. To move VR to another camera without ending the session, call EnableVR with the new camera instead. What InitVR prepared stays prepared, so EnableVR can start VR again later, with the same camera or another.

The runtime can take a moment to agree. Until it does, VRState returns VR_STATE_STOPPING and EnableVR reports that the session is still stopping, so keep your loop running - Flip and Delay process the runtime's messages.

Calling it when VR is already off does nothing. Returns True, or False if something went wrong, with the reason in VRLastError.

Automatic VR is experimental, and works in 64-bit Windows programs through an OpenXR runtime and Direct3D 12. In 32-bit programs the commands are there, so the same source compiles, but InitVR returns False and VRLastError says why.

For the full story - setup, frame rules and limitations - see the Automatic PC VR guide and its complete AutomaticVR.bb sample.


See also: EnableVR, ShutdownVR, VREnabled, VRState.

Index