Monado OpenXR Runtime
xrt_view Struct Reference

A per-lens/display view information. More...

#include <xrt/xrt_device.h>

Collaboration diagram for xrt_view:

Data Fields

struct {
   uint32_t   x_pixels
 
   uint32_t   y_pixels
 
   uint32_t   w_pixels
 
   uint32_t   h_pixels
 
viewport
 Viewport position on the screen. More...
 
struct {
   uint32_t   w_pixels
 
   uint32_t   h_pixels
 
display
 Physical properties of this display (or the part of a display that covers this view). More...
 
struct xrt_matrix_2x2 rot
 Rotation 2d matrix used to rotate the position of the output of the distortion shaders onto the screen. More...
 

Detailed Description

A per-lens/display view information.

Field Documentation

◆ 

struct { ... } xrt_view::display

Physical properties of this display (or the part of a display that covers this view).

Not in absolute screen coordinates but like the clients see them i.e. after rotation is applied by xrt_view::rot. This field is only used for the clients' swapchain setup.

The xrt_view::display::w_pixels and xrt_view::display::h_pixels become the recommended image size for this view, after being scaled by the debug environment variable XRT_COMPOSITOR_SCALE_PERCENTAGE.

Referenced by u_extents_2d_split_side_by_side().

◆ rot

struct xrt_matrix_2x2 xrt_view::rot

Rotation 2d matrix used to rotate the position of the output of the distortion shaders onto the screen.

If the distortion shader is based on a mesh, then this matrix rotates the vertex positions.

Referenced by CDeviceDriver_Monado::ComputeDistortion(), and u_extents_2d_split_side_by_side().

◆ 

struct { ... } xrt_view::viewport

Viewport position on the screen.

In absolute screen coordinates on an unrotated display, like the HMD presents it to the OS.

This field is only used by Compositor to setup the device rendering.

If the view is being rotated by xrt_view.rot 90° right in the distortion shader then display.w_pixels == viewport.h_pixels and display.h_pixels == viewport.w_pixels.

Referenced by u_extents_2d_split_side_by_side().


The documentation for this struct was generated from the following file: