Monado OpenXR Runtime
xrt_layer_data Struct Reference

All the pure data values associated with a composition layer. More...

#include <xrt/xrt_compositor.h>

Collaboration diagram for xrt_layer_data:

Data Fields

enum xrt_layer_type type
 Tag for compositor layer type. More...
 
enum xrt_input_name name
 Often XRT_INPUT_GENERIC_HEAD_POSE. More...
 
uint64_t timestamp
 "Display no-earlier-than" timestamp for this layer. More...
 
enum xrt_layer_composition_flags flags
 Composition flags. More...
 
struct xrt_layer_depth_test_data depth_test
 Depth test data. More...
 
bool flip_y
 Whether the main compositor should flip the direction of y when rendering. More...
 
struct xrt_colour_rgba_f32 color_scale
 Modulate the color sourced from the images. More...
 
struct xrt_colour_rgba_f32 color_bias
 Modulate the color sourced from the images. More...
 
struct xrt_layer_advanced_blend_data advanced_blend
 Advanced blend factors. More...
 
union {
   struct xrt_layer_projection_data   proj
 
   struct xrt_layer_projection_depth_data   depth
 
   struct xrt_layer_quad_data   quad
 
   struct xrt_layer_cube_data   cube
 
   struct xrt_layer_cylinder_data   cylinder
 
   struct xrt_layer_equirect1_data   equirect1
 
   struct xrt_layer_equirect2_data   equirect2
 
   struct xrt_layer_passthrough_data   passthrough
 
}; 
 Union of data values for the various layer types. More...
 
uint32_t view_count
 

Detailed Description

All the pure data values associated with a composition layer.

The xrt_swapchain references and xrt_device are provided outside of this struct.

Field Documentation

◆ 

union { ... }

Union of data values for the various layer types.

The initialized member of this union should match the value of xrt_layer_data::type. It also should be clear because of the layer function called between xrt_compositor::layer_begin and xrt_compositor::layer_commit where this data was passed.

◆ advanced_blend

struct xrt_layer_advanced_blend_data xrt_layer_data::advanced_blend

Advanced blend factors.

◆ color_bias

struct xrt_colour_rgba_f32 xrt_layer_data::color_bias

Modulate the color sourced from the images.

◆ color_scale

struct xrt_colour_rgba_f32 xrt_layer_data::color_scale

Modulate the color sourced from the images.

◆ depth_test

struct xrt_layer_depth_test_data xrt_layer_data::depth_test

Depth test data.

◆ flags

enum xrt_layer_composition_flags xrt_layer_data::flags

Composition flags.

◆ flip_y

bool xrt_layer_data::flip_y

Whether the main compositor should flip the direction of y when rendering.

This is actually an input only to the "main" compositor comp_compositor. It is overwritten by the various client implementations of the xrt_compositor interface depending on the conventions of the associated graphics API. Other xrt_compositor_native implementations that are not the main compositor just pass this field along unchanged to the "real" compositor.

◆ name

◆ timestamp

uint64_t xrt_layer_data::timestamp

"Display no-earlier-than" timestamp for this layer.

The layer may be displayed after this point, but must never be displayed before.

◆ type

enum xrt_layer_type xrt_layer_data::type

Tag for compositor layer type.

Referenced by comp_render_gfx_dispatch(), and sdl_program_plus_render().


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