Monado OpenXR Runtime
Data Fields
xrt_compositor Struct Reference

Common compositor base. More...

#include <xrt/xrt_compositor.h>

Collaboration diagram for xrt_compositor:
Collaboration graph
[legend]

Data Fields

uint32_t num_formats
 Number of formats. More...
 
int64_t formats [XRT_MAX_SWAPCHAIN_FORMATS]
 Supported formats. More...
 
struct xrt_swapchain *(* create_swapchain )(struct xrt_compositor *xc, enum xrt_swapchain_create_flags create, enum xrt_swapchain_usage_bits bits, int64_t format, uint32_t sample_count, uint32_t width, uint32_t height, uint32_t face_count, uint32_t array_size, uint32_t mip_count)
 Create a swapchain with a set of images. More...
 
void(* poll_events )(struct xrt_compositor *xc, uint64_t *WIP)
 Poll events from this compositor. More...
 
void(* prepare_session )(struct xrt_compositor *xc)
 This function is implicit in the OpenXR spec but made explicit here. More...
 
void(* begin_session )(struct xrt_compositor *xc, enum xrt_view_type view_type)
 See xrBeginSession. More...
 
void(* end_session )(struct xrt_compositor *xc)
 See xrEndSession, unlike the OpenXR one the state tracker is responsible to call discard frame before calling this function. More...
 
void(* wait_frame )(struct xrt_compositor *xc, uint64_t *predicted_display_time, uint64_t *predicted_display_period)
 See xrWaitFrame. More...
 
void(* begin_frame )(struct xrt_compositor *xc)
 See xrBeginFrame. More...
 
void(* discard_frame )(struct xrt_compositor *xc)
 This isn't in the OpenXR API but is explicit in the XRT interfaces. More...
 
void(* end_frame )(struct xrt_compositor *xc, enum xrt_blend_mode blend_mode, struct xrt_swapchain **xscs, const uint32_t *image_index, uint32_t *layers, uint32_t num_swapchains)
 See xrEndFrame. More...
 
void(* destroy )(struct xrt_compositor *xc)
 Teardown the compositor. More...
 

Detailed Description

Common compositor base.

Field Documentation

◆ begin_frame

void(* xrt_compositor::begin_frame) (struct xrt_compositor *xc)

See xrBeginFrame.

◆ begin_session

void(* xrt_compositor::begin_session) (struct xrt_compositor *xc, enum xrt_view_type view_type)

See xrBeginSession.

Referenced by xrt_gfx_provider_create_fd().

◆ create_swapchain

struct xrt_swapchain*(* xrt_compositor::create_swapchain) (struct xrt_compositor *xc, enum xrt_swapchain_create_flags create, enum xrt_swapchain_usage_bits bits, int64_t format, uint32_t sample_count, uint32_t width, uint32_t height, uint32_t face_count, uint32_t array_size, uint32_t mip_count)

Create a swapchain with a set of images.

Referenced by client_gl_compositor_init(), client_vk_compositor_create(), and xrt_gfx_provider_create_fd().

◆ destroy

void(* xrt_compositor::destroy) (struct xrt_compositor *xc)

Teardown the compositor.

The state tracker must have made sure that no frames or sessions are currently pending. See discard_frame, end_frame, end_session.

Referenced by client_gl_xlib_compositor_create(), and xrt_gfx_provider_create_gl_egl().

◆ discard_frame

void(* xrt_compositor::discard_frame) (struct xrt_compositor *xc)

This isn't in the OpenXR API but is explicit in the XRT interfaces.

Two calls to xrBeginFrame will cause the state tracker to call.

xc->begin_frame(xc)
xc->discard_frame(xc)
xc->begin_frame(xc)

◆ end_frame

void(* xrt_compositor::end_frame) (struct xrt_compositor *xc, enum xrt_blend_mode blend_mode, struct xrt_swapchain **xscs, const uint32_t *image_index, uint32_t *layers, uint32_t num_swapchains)

See xrEndFrame.

◆ end_session

void(* xrt_compositor::end_session) (struct xrt_compositor *xc)

See xrEndSession, unlike the OpenXR one the state tracker is responsible to call discard frame before calling this function.

See discard_frame.

◆ formats

int64_t xrt_compositor::formats[XRT_MAX_SWAPCHAIN_FORMATS]

Supported formats.

◆ num_formats

uint32_t xrt_compositor::num_formats

Number of formats.

◆ poll_events

void(* xrt_compositor::poll_events) (struct xrt_compositor *xc, uint64_t *WIP)

Poll events from this compositor.

This function is very much WIP.

◆ prepare_session

void(* xrt_compositor::prepare_session) (struct xrt_compositor *xc)

This function is implicit in the OpenXR spec but made explicit here.

◆ wait_frame

void(* xrt_compositor::wait_frame) (struct xrt_compositor *xc, uint64_t *predicted_display_time, uint64_t *predicted_display_period)

See xrWaitFrame.


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