lv_opengles_driver.h

API reference for lv_opengles_driver.h

Report on GitHub
Summary

Functions

lv_opengles_init

Initialize OpenGL

 
void lv_opengles_init(void)

it is not necessary to call this if you use lv_opengles_glfw_window_create

lv_opengles_deinit

Deinitialize OpenGL

 
void lv_opengles_deinit(void)

it is not necessary to call this if you use lv_opengles_glfw_window_create

lv_opengles_render_texture

Render a texture using alternate blending mode for smoother translucent materials and correct anti-aliasing of glTF elements when using transparent background

 
void lv_opengles_render_texture(unsigned int texture, const lv_area_t *texture_area, lv_opa_t opa, int32_t disp_w, int32_t disp_h, const lv_area_t *texture_clip_area, bool h_flip, bool v_flip)
Parameters
NameTypeDescription
textureunsigned intOpenGL texture ID
texture_areaconst lv_area_t *the area in the window to render the texture in
opalv_opa_topacity to blend the texture with existing contents
disp_wint32_twidth of the window/framebuffer being rendered to
disp_hint32_theight of the window/framebuffer being rendered to
texture_clip_areaconst lv_area_t *
h_flipboolhorizontal flip
v_flipboolvertical flip

lv_opengles_render_display_texture

Render a display texture - Supports rotation - Switches red and blue channels

 
void lv_opengles_render_display_texture(lv_display_t *display, bool h_flip, bool v_flip)
Parameters
NameTypeDescription
displaylv_display_t *LVGL Texture display. Created with the lv_opengles_texture module
h_flipboolhorizontal flip
v_flipboolvertical flip

lv_opengles_render_fill

Render a fill

 
void lv_opengles_render_fill(lv_color_t color, const lv_area_t *area, lv_opa_t opa, int32_t disp_w, int32_t disp_h)
Parameters
NameTypeDescription
colorlv_color_tthe color of the fill
areaconst lv_area_t *the area in the window to render the fill
opalv_opa_topacity to blend the fill with existing contents
disp_wint32_twidth of the window/framebuffer being rendered to
disp_hint32_theight of the window/framebuffer being rendered to

lv_opengles_render_clear

Clear the window/display

 
void lv_opengles_render_clear(void)

lv_opengles_viewport

Set the OpenGL viewport

 
void lv_opengles_viewport(int32_t x, int32_t y, int32_t w, int32_t h)
Parameters
NameTypeDescription
xint32_tx position of the viewport
yint32_ty position of the viewport
wint32_twidth of the viewport
hint32_theight of the viewport

lv_opengles_reinit_state

Reinitialize OpenGL state after external GL operations (e.g., NanoVG) This rebinds VAO, VBO, IBO and resets vertex attributes

 
void lv_opengles_reinit_state(void)

Dependencies

How is this guide?

Last updated on

On this page