Monado OpenXR Runtime
comp_window.h
Go to the documentation of this file.
1// Copyright 2019, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Compositor window header.
6 * @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
7 * @author Jakob Bornecrantz <jakob@collabora.com>
8 * @ingroup comp_main
9 */
10
11#pragma once
12
15
16#include "xrt/xrt_config_os.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22
23/*
24 *
25 * Functions.
26 *
27 */
28
29#ifdef VK_USE_PLATFORM_XCB_KHR
30
31/*!
32 * Create a xcb window.
33 *
34 * @ingroup comp_main
35 * @public @memberof comp_window_xcb
36 */
37struct comp_target *
39
40extern const struct comp_target_factory comp_target_factory_xcb;
41
42#endif // VK_USE_PLATFORM_XCB_KHR
43
44#ifdef VK_USE_PLATFORM_WAYLAND_KHR
45
46/*!
47 * Create a wayland window.
48 *
49 * @ingroup comp_main
50 * @public @memberof comp_window_wayland
51 */
52struct comp_target *
54
55extern const struct comp_target_factory comp_target_factory_wayland;
56
57/*!
58 * Create a direct surface to a HMD using Wayland.
59 *
60 * @ingroup comp
61 */
62struct comp_target *
64
65extern const struct comp_target_factory comp_target_factory_direct_wayland;
66
67#endif // VK_USE_PLATFORM_WAYLAND_KHR
68
69#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
70/*!
71 * Create a direct surface to an HMD over RandR.
72 *
73 * @ingroup comp_main
74 * @public @memberof comp_window_direct_randr
75 */
76struct comp_target *
78
79extern const struct comp_target_factory comp_target_factory_direct_randr;
80
81/*!
82 * Create a direct surface to an HMD on NVIDIA.
83 *
84 * @ingroup comp_main
85 * @public @memberof comp_window_direct_nvidia
86 */
87struct comp_target *
89
90extern const struct comp_target_factory comp_target_factory_direct_nvidia;
91#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
92
93#if 1
94/*!
95 * Create a direct surface to an HMD on VkDisplay.
96 *
97 * @ingroup comp_main
98 * @public @memberof comp_window_direct_vk_display
99 */
100struct comp_target *
101comp_window_vk_display_create(struct comp_compositor *c);
102
103extern const struct comp_target_factory comp_target_factory_vk_display;
104#endif // 1
105
106#ifdef XRT_OS_ANDROID
107/*!
108 * Create a surface to an HMD on Android.
109 *
110 * @ingroup comp_main
111 * @public @memberof comp_window_android
112 */
113struct comp_target *
114comp_window_android_create(struct comp_compositor *c);
115
116extern const struct comp_target_factory comp_target_factory_android;
117#endif // XRT_OS_ANDROID
118
119#ifdef XRT_OS_WINDOWS
120
121/*!
122 * Create a rendering window on Windows.
123 *
124 * @ingroup comp_main
125 * @public @memberof comp_window_mswin
126 */
127struct comp_target *
128comp_window_mswin_create(struct comp_compositor *c);
129
130extern const struct comp_target_factory comp_target_factory_mswin;
131#endif // XRT_OS_WINDOWS
132
133#ifdef __cplusplus
134}
135#endif
Main compositor written using Vulkan header.
Target Vulkan swapchain code header.
struct comp_target * comp_window_xcb_create(struct comp_compositor *c)
Create a xcb window.
Definition: comp_window_xcb.c:127
struct comp_target * comp_window_direct_randr_create(struct comp_compositor *c)
Create a direct surface to an HMD over RandR.
Definition: comp_window_direct_randr.c:111
struct comp_target * comp_window_direct_nvidia_create(struct comp_compositor *c)
Create a direct surface to an HMD on NVIDIA.
Definition: comp_window_direct_nvidia.c:97
struct comp_target * comp_window_wayland_create(struct comp_compositor *c)
Create a wayland window.
Definition: comp_window_wayland.c:101
struct comp_target * comp_window_direct_wayland_create(struct comp_compositor *c)
Create a direct surface to a HMD using Wayland.
Definition: comp_window_direct_wayland.c:501
Main compositor struct tying everything in the compositor together.
Definition: comp_compositor.h:89
A factory of targets.
Definition: comp_target.h:580
A compositor target: where the compositor renders to.
Definition: comp_target.h:132
struct comp_compositor * c
Owning compositor.
Definition: comp_target.h:134
Auto detect OS and certain features.