Monado OpenXR Runtime
comp_main_interface.h
Go to the documentation of this file.
1 // Copyright 2019-2022, Collabora, Ltd.
2 // SPDX-License-Identifier: BSL-1.0
3 /*!
4  * @file
5  * @brief Header for the main compositor interface.
6  * @author Jakob Bornecrantz <jakob@collabora.com>
7  * @ingroup comp_main
8  *
9  * Formerly a header for defining a XRT graphics provider.
10  */
11 
12 #pragma once
13 
14 #include "xrt/xrt_device.h"
15 #include "xrt/xrt_compositor.h"
16 
17 struct comp_target_factory;
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 
24 /*!
25  * Creates the main compositor, it doesn't return itself but instead wraps
26  * itself with a system compositor. The main compositor is a native compositor.
27  *
28  * @ingroup comp_main
29  * @relates xrt_system_compositor
30  *
31  * @param xdev The head device
32  * @param ctf A compositor target factory to force the output device, must remain valid for the lifetime of the
33  * compositor. If NULL, factory is automatically selected
34  * @param out_xsysc The output compositor
35  */
38  const struct comp_target_factory *ctf,
39  struct xrt_system_compositor **out_xsysc);
40 
41 
42 #ifdef __cplusplus
43 }
44 #endif
xrt_result_t comp_main_create_system_compositor(struct xrt_device *xdev, const struct comp_target_factory *ctf, struct xrt_system_compositor **out_xsysc)
Creates the main compositor, it doesn't return itself but instead wraps itself with a system composit...
Definition: comp_compositor.c:943
enum xrt_result xrt_result_t
Result type used across Monado.
A factory of targets.
Definition: comp_target.h:580
A single HMD or input device.
Definition: xrt_device.h:230
The system compositor handles composition for a system.
Definition: xrt_compositor.h:2386
Header declaring XRT graphics interfaces.
Header defining an xrt display or controller device.