Monado OpenXR Runtime
comp_renderer.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 rendering code 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 
13 #include "xrt/xrt_compiler.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 
20 struct comp_compositor;
21 struct comp_renderer;
23 
24 /*!
25  * Called by the main compositor code to create the renderer.
26  *
27  * @ingroup comp_main
28  */
29 struct comp_renderer *
31 
32 /*!
33  * Render a distorted stereo frame.
34  *
35  * @ingroup comp_main
36  */
37 void
39  struct comp_swapchain_image *left,
40  uint32_t left_layer,
41  struct comp_swapchain_image *right,
42  uint32_t right_layer);
43 
44 /*!
45  * Clean up and free the renderer.
46  *
47  * @ingroup comp_main
48  */
49 void
51 
52 
53 #ifdef __cplusplus
54 }
55 #endif
void comp_renderer_destroy(struct comp_renderer *r)
Clean up and free the renderer.
Definition: comp_renderer.c:172
Main compositor struct tying everything in the compositor together.
Definition: comp_compositor.h:70
Holds associated vulkan objects and state to render with a distortion.
Definition: comp_renderer.c:33
void comp_renderer_frame(struct comp_renderer *r, struct comp_swapchain_image *left, uint32_t left_layer, struct comp_swapchain_image *right, uint32_t right_layer)
Render a distorted stereo frame.
Definition: comp_renderer.c:159
A single swapchain image, holds the needed state for tracking image usage.
Definition: comp_compositor.h:36
struct comp_renderer * comp_renderer_create(struct comp_compositor *c)
Called by the main compositor code to create the renderer.
Definition: comp_renderer.c:148
Header holding common defines.