docs(3dtexture.rst): get this doc into TOC and proofread (#8143)

Co-authored-by: André Costa <andre_miguel_costa@hotmail.com>
This commit is contained in:
Victor Wheeler
2025-04-24 09:49:34 -06:00
committed by GitHub
parent 06edf0fc70
commit 0a11acef10
2 changed files with 6 additions and 5 deletions
+5 -5
View File
@@ -7,7 +7,7 @@
Overview
********
3D texture widgets are used to embed an external 3D graphics library's "texutre" primitive
3D texture widgets are used to embed an external 3D graphics library's "texture" primitive
into an LVGL UI.
@@ -28,7 +28,7 @@ Usage
Requires a draw unit to be enabled which can draw the
:cpp:enumerator:`LV_DRAW_TASK_TYPE_3D` draw task type.
OpenGL is the first supported 3D graphics backend. The following must be enabled.
OpenGL is the first supported 3D graphics back-end. The following must be enabled.
- :c:macro:`LV_USE_3DTEXTURE`
- :c:macro:`LV_USE_OPENGLES`
@@ -37,20 +37,20 @@ OpenGL is the first supported 3D graphics backend. The following must be enabled
See :ref:`LVGL's OpenGLES driver docs <opengl_es_driver>` to create a window and a
display texture.
The `lv_example_3dtexture <https://github.com/lvgl/lv_example_3dtexture>` repo is a
The `lv_example_3dtexture <https://github.com/lvgl/lv_example_3dtexture>` repository is a
demonstration of how to use the ``3dtexture`` widget to load glTF models with OpenGL
and display them in LVGL.
.. code-block:: c
lv_obj_t * tex = lv_3dtexture_create(parent);
/*Render something to the texture. You can replace it with your code.*/
/* Render something to the texture. You can replace it with your code. */
lv_3dtexture_id_t gltf_texture = render_gltf_model_to_opengl_texture(path, w, h, color);
lv_3dtexture_set_src(tex, gltf_texture);
lv_obj_set_size(tex, w, h);
lv_obj_set_style_opa(tex, opa, 0);
The real type of :cpp:type:`lv_3dtexture_id_t` depends on the active 3D graphics backend.
The real type of :cpp:type:`lv_3dtexture_id_t` depends on the active 3D graphics back-end.
With OpenGL, the type is ``unsigned int``.
+1
View File
@@ -14,6 +14,7 @@ All Widgets
.. toctree::
:maxdepth: 1
3dtexture
animimg
arc
bar