Monado OpenXR Runtime
comp_window_peek.h
Go to the documentation of this file.
1// Copyright 2022, Simon Zeni <simon@bl4ckb0ne.ca>
2// Copyright 2025-2026, NVIDIA CORPORATION.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief Displays the content of one or both eye onto a desktop window
7 * @author Simon Zeni <simon@bl4ckb0ne.ca>
8 * @ingroup comp_main
9 */
10
11#pragma once
12
13#include "xrt/xrt_config_have.h"
14
15#ifndef XRT_FEATURE_WINDOW_PEEK
16#error "XRT_FEATURE_WINDOW_PEEK not enabled"
17#endif
18
19#include "os/os_threading.h"
20
21struct comp_compositor;
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27enum comp_window_peek_eye
28{
29 COMP_WINDOW_PEEK_EYE_LEFT = 0,
30 COMP_WINDOW_PEEK_EYE_RIGHT = 1,
31 COMP_WINDOW_PEEK_EYE_BOTH = 2,
32};
33
34struct comp_window_peek;
35
36struct comp_window_peek *
37comp_window_peek_create(struct comp_compositor *c);
38
39void
40comp_window_peek_destroy(struct comp_window_peek **w_ptr);
41
42void
43comp_window_peek_blit(struct comp_window_peek *w, VkImage src, int32_t width, int32_t height);
44
45/*!
46 *
47 * Getter for the peek window's eye enum.
48 * This is a getter function so that struct comp_window_peek can be private.
49 *
50 * @param[in] w The peek window struct this compositor has.
51 * @return The eye that the peek window wants to display.
52 *
53 */
54enum comp_window_peek_eye
56
57/*!
58 * Gets the required vulkan instance extensions for comp_window_peek support
59 *
60 * @param[inout] out_required_builder builder for the list of required instance extensions to enable,
61 * the builder may already contain some/all of the required, duplicates will
62 * not be added.
63 */
64bool
66
67#ifdef __cplusplus
68}
69#endif
bool comp_window_peek_get_vk_instance_exts(struct u_extension_list_builder *out_required_builder)
Gets the required vulkan instance extensions for comp_window_peek support.
Definition: comp_window_peek.c:479
enum comp_window_peek_eye comp_window_peek_get_eye(struct comp_window_peek *w)
Getter for the peek window's eye enum.
Definition: comp_window_peek.c:473
Wrapper around OS threading native functions.
Main compositor struct tying everything in the compositor together.
Definition: comp_compositor.h:91
Definition: comp_window_peek.c:32
Definition: u_extension_list.cpp:40