Monado OpenXR Runtime
gui_ogl.h
Go to the documentation of this file.
1 // Copyright 2019-2023, Collabora, Ltd.
2 // SPDX-License-Identifier: BSL-1.0
3 /*!
4  * @file
5  * @brief OpenGL helper functions for drawing GUI elements.
6  * @author Jakob Bornecrantz <jakob@collabora.com>
7  * @ingroup gui
8  */
9 
10 #pragma once
11 
12 #include "xrt/xrt_compiler.h"
13 
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 /*!
20  * Draw the given textures as igImage, scale of 1.0f == 100%.
21  *
22  * @ingroup gui
23  */
24 void
25 gui_ogl_draw_image(uint32_t width, uint32_t height, uint32_t tex_id, float scale, bool rotate_180, bool flip_y);
26 
27 
28 /*!
29  * Draw the given texture to the background of the current OS window.
30  *
31  * @ingroup gui
32  */
33 void
34 gui_ogl_draw_background(uint32_t width, uint32_t height, uint32_t tex_id, bool rotate_180, bool flip_y);
35 
36 
37 #ifdef __cplusplus
38 }
39 #endif
void gui_ogl_draw_background(uint32_t width, uint32_t height, uint32_t tex_id, bool rotate_180, bool flip_y)
Draw the given texture to the background of the current OS window.
Definition: gui_ogl.c:65
void gui_ogl_draw_image(uint32_t width, uint32_t height, uint32_t tex_id, float scale, bool rotate_180, bool flip_y)
Draw the given textures as igImage, scale of 1.0f == 100%.
Definition: gui_ogl.c:47
Header holding common defines.