Struct openvr::Compositor [] [src]

pub struct Compositor(_);

Methods

impl Compositor
[src]

Important traits for Vec<u8>
[src]

Important traits for Vec<u8>
[src]

Safety: physical_device must be a valid VkPhysicalDevice

[src]

Sets tracking space returned by WaitGetPoses

[src]

Block until a few milliseconds before the next vsync, then return poses for the next step of rendering and game logic.

Poses are relative to the origin set by set_tracking_space.

[src]

Display the supplied texture for the next frame.

If bounds is None, the entire texture will be used. Lens distortion is handled by the OpenVR implementation.

Safety

The handles you supply must be valid and comply with the graphics API's synchronization requirements.

[src]

Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor.

This is an optional call, which only needs to be used if you can't instead call wait_get_poses immediately after submitting frames. For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on.

[src]

Return whether the compositor is fullscreen.

[src]

Clears the frame that was sent with the last call to `submit.

This will cause the compositor to show the grid until submit is called again.

[src]

Controls whether the application should flag the time at which the frame begins explicitly

Vulkan/D3D12 Only There are two purposes for SetExplicitTimingMode:

  1. To get a more accurate GPU timestamp for when the frame begins in Vulkan/D3D12 applications.
  2. (Optional) To avoid having WaitGetPoses access the Vulkan queue so that the queue can be accessed from another thread while WaitGetPoses is executing.

More accurate GPU timestamp for the start of the frame is achieved by the application calling SubmitExplicitTimingData immediately before its first submission to the Vulkan/D3D12 queue. This is more accurate because normally this GPU timestamp is recorded during WaitGetPoses. In D3D11, WaitGetPoses queues a GPU timestamp write, but it does not actually get submitted to the GPU until the application flushes. By using SubmitExplicitTimingData, the timestamp is recorded at the same place for Vulkan/D3D12 as it is for D3D11, resulting in a more accurate GPU time measurement for the frame.

Avoiding WaitGetPoses accessing the Vulkan queue can be achieved using SetExplicitTimingMode as well. If this is desired, the application MUST call PostPresentHandoff itself prior to WaitGetPoses. If SetExplicitTimingMode is true and the application calls PostPresentHandoff, then WaitGetPoses is guaranteed not to access the queue. Note that PostPresentHandoff and SubmitExplicitTimingData will access the queue, so only WaitGetPoses becomes safe for accessing the queue from another thread.

[src]

Trait Implementations

Auto Trait Implementations

impl Send for Compositor

impl Sync for Compositor