Monado OpenXR Runtime
|
Collect a stack of layers - one frame's worth. More...
#include <util/comp_layer_accum.h>
Public Member Functions | |
xrt_result_t | comp_layer_accum_begin (struct comp_layer_accum *cla, const struct xrt_layer_frame_data *data) |
Reset all layer data and reset count to 0. More... | |
xrt_result_t | comp_layer_accum_projection (struct comp_layer_accum *cla, struct xrt_swapchain *xsc[XRT_MAX_VIEWS], const struct xrt_layer_data *data) |
Accumulate swapchains and data for a projection layer for a frame. More... | |
xrt_result_t | comp_layer_accum_projection_depth (struct comp_layer_accum *cla, struct xrt_swapchain *xsc[XRT_MAX_VIEWS], struct xrt_swapchain *d_xsc[XRT_MAX_VIEWS], const struct xrt_layer_data *data) |
Accumulate swapchains and data for a projection layer (with depth image) for a frame. More... | |
xrt_result_t | comp_layer_accum_quad (struct comp_layer_accum *cla, struct xrt_swapchain *xsc, const struct xrt_layer_data *data) |
Accumulate swapchain and data for a quad layer for a frame. More... | |
xrt_result_t | comp_layer_accum_cube (struct comp_layer_accum *cla, struct xrt_swapchain *xsc, const struct xrt_layer_data *data) |
Accumulate swapchain and data for a cube layer for a frame. More... | |
xrt_result_t | comp_layer_accum_cylinder (struct comp_layer_accum *cla, struct xrt_swapchain *xsc, const struct xrt_layer_data *data) |
Accumulate swapchain and data for a cylinder layer for a frame. More... | |
xrt_result_t | comp_layer_accum_equirect1 (struct comp_layer_accum *cla, struct xrt_swapchain *xsc, const struct xrt_layer_data *data) |
Accumulate swapchain and data for an equirect(1) layer for a frame. More... | |
xrt_result_t | comp_layer_accum_equirect2 (struct comp_layer_accum *cla, struct xrt_swapchain *xsc, const struct xrt_layer_data *data) |
Accumulate swapchain and data for an equirect2 layer for a frame. More... | |
struct xrt_swapchain * | comp_layer_accum_get_swapchain (const struct comp_layer_accum *cla, uint32_t layer_index, uint32_t swapchain_index) |
Get a (color) swapchain associated with a layer. More... | |
struct xrt_swapchain * | comp_layer_accum_get_depth_swapchain (const struct comp_layer_accum *cla, uint32_t layer_index, uint32_t swapchain_index) |
Get a depth swapchain associated with a (projection with depth) layer. More... | |
Data Fields | |
struct xrt_layer_frame_data | data |
The per frame data, supplied by begin . More... | |
struct comp_layer | layers [XRT_MAX_LAYERS] |
All of the layers. More... | |
uint32_t | layer_count |
Number of submitted layers. More... | |
Collect a stack of layers - one frame's worth.
Independent of graphics API, swapchain implementation, etc.
Used to turn the step by step "one call per layer" compositor API back into a single structure per frame.
xrt_result_t comp_layer_accum_begin | ( | struct comp_layer_accum * | cla, |
const struct xrt_layer_frame_data * | data | ||
) |
Reset all layer data and reset count to 0.
Call at the beginning of a frame.
xrt_result_t comp_layer_accum_cube | ( | struct comp_layer_accum * | cla, |
struct xrt_swapchain * | xsc, | ||
const struct xrt_layer_data * | data | ||
) |
Accumulate swapchain and data for a cube layer for a frame.
xrt_result_t comp_layer_accum_cylinder | ( | struct comp_layer_accum * | cla, |
struct xrt_swapchain * | xsc, | ||
const struct xrt_layer_data * | data | ||
) |
Accumulate swapchain and data for a cylinder layer for a frame.
xrt_result_t comp_layer_accum_equirect1 | ( | struct comp_layer_accum * | cla, |
struct xrt_swapchain * | xsc, | ||
const struct xrt_layer_data * | data | ||
) |
Accumulate swapchain and data for an equirect(1) layer for a frame.
xrt_result_t comp_layer_accum_equirect2 | ( | struct comp_layer_accum * | cla, |
struct xrt_swapchain * | xsc, | ||
const struct xrt_layer_data * | data | ||
) |
Accumulate swapchain and data for an equirect2 layer for a frame.
|
inline |
Get a depth swapchain associated with a (projection with depth) layer.
cla | self |
layer_index | index of layer |
swapchain_index | index of color swapchain - typically this is the view index. |
References comp_layer::data, layers, and xrt_layer_data::type.
|
inline |
Get a (color) swapchain associated with a layer.
cla | self |
layer_index | index of layer |
swapchain_index | index of swapchain - typically this is 0 for most layers, the view index for projection. |
References layers, and comp_layer::sc_array.
xrt_result_t comp_layer_accum_projection | ( | struct comp_layer_accum * | cla, |
struct xrt_swapchain * | xsc[XRT_MAX_VIEWS], | ||
const struct xrt_layer_data * | data | ||
) |
Accumulate swapchains and data for a projection layer for a frame.
xrt_result_t comp_layer_accum_projection_depth | ( | struct comp_layer_accum * | cla, |
struct xrt_swapchain * | xsc[XRT_MAX_VIEWS], | ||
struct xrt_swapchain * | d_xsc[XRT_MAX_VIEWS], | ||
const struct xrt_layer_data * | data | ||
) |
Accumulate swapchains and data for a projection layer (with depth image) for a frame.
xrt_result_t comp_layer_accum_quad | ( | struct comp_layer_accum * | cla, |
struct xrt_swapchain * | xsc, | ||
const struct xrt_layer_data * | data | ||
) |
Accumulate swapchain and data for a quad layer for a frame.
struct xrt_layer_frame_data comp_layer_accum::data |
The per frame data, supplied by begin
.
uint32_t comp_layer_accum::layer_count |
Number of submitted layers.
Referenced by can_do_one_projection_layer_fast_path(), and sdl_program_plus_render().
struct comp_layer comp_layer_accum::layers[XRT_MAX_LAYERS] |
All of the layers.
Referenced by can_do_one_projection_layer_fast_path(), comp_layer_accum_get_depth_swapchain(), comp_layer_accum_get_swapchain(), and sdl_program_plus_render().