1 /**
2  * @file lv_opengles_texture.h
3  *
4  */
5 
6 #ifndef LV_OPENGLES_TEXTURE_H
7 #define LV_OPENGLES_TEXTURE_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 
17 #include "../../lv_conf_internal.h"
18 #if LV_USE_OPENGLES
19 
20 #include "../../display/lv_display.h"
21 
22 /*********************
23  *      DEFINES
24  *********************/
25 
26 /**********************
27  *      TYPEDEFS
28  **********************/
29 
30 /**********************
31  * GLOBAL PROTOTYPES
32  **********************/
33 
34 /**
35  * Create a display that flushes to an OpenGL texture
36  * @param w    width in pixels of the texture
37  * @param h    height in pixels of the texture
38  * @return     the new display
39  */
40 lv_display_t * lv_opengles_texture_create(int32_t w, int32_t h);
41 
42 /**
43  * Get the OpenGL texture ID of the display
44  * @param disp    display
45  * @return        texture ID
46  */
47 unsigned int lv_opengles_texture_get_texture_id(lv_display_t * disp);
48 
49 /**
50  * Get the display of an OpenGL texture if it is associated with one
51  * @param texture_id   OpenGL texture ID
52  * @return             display or `NULL` if there no display with that texture ID
53  */
54 lv_display_t * lv_opengles_texture_get_from_texture_id(unsigned int texture_id);
55 
56 /**********************
57  *      MACROS
58  **********************/
59 
60 #endif /* LV_USE_OPENGLES */
61 
62 #ifdef __cplusplus
63 } /*extern "C"*/
64 #endif
65 
66 #endif /*LV_OPENGLES_TEXTURE_H*/
67