# lv_draw_3d.h (/api/draw/lv_draw_3d_h)



<ApiSummary functions="3" structs="1" />

Functions [#functions]

<ApiTabs items="[&#x22;Getters (1)&#x22;,&#x22;Other (2)&#x22;]">
  <ApiTab value="Getters (1)">
    <ApiMember kind="function" name="lv_draw_task_get_3d_dsc" file="draw/lv_draw_3d.h" line="53" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/lv_draw_3d.h#L53">
      lv_draw_task_get_3d_dsc [#lv_draw_task_get_3d_dsc]

      Try to get a 3D draw descriptor from a draw task.

      ```c title=" " lineNumbers=1
      lv_draw_3d_dsc_t * lv_draw_task_get_3d_dsc(lv_draw_task_t *task)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                                         | Description |
      | ------ | ------------------------------------------------------------ | ----------- |
      | `task` | <ApiLink name="lv_draw_task_t" display="lv_draw_task_t *" /> | draw task   |

      **Returns:** <ApiLink name="lv_draw_3d_dsc_t" display="lv_draw_3d_dsc_t *" /> — the task's draw descriptor or NULL if the task is not of type LV\_DRAW\_TASK\_TYPE\_3D
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (2)">
    <ApiMember kind="function" name="lv_draw_3d_dsc_init" file="draw/lv_draw_3d.h" line="46" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/lv_draw_3d.h#L46">
      lv_draw_3d_dsc_init [#lv_draw_3d_dsc_init]

      Initialize a 3D draw descriptor

      ```c title=" " lineNumbers=1
      void lv_draw_3d_dsc_init(lv_draw_3d_dsc_t *dsc)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                             | Description                  |
      | ----- | ---------------------------------------------------------------- | ---------------------------- |
      | `dsc` | <ApiLink name="lv_draw_3d_dsc_t" display="lv_draw_3d_dsc_t *" /> | pointer to a draw descriptor |
    </ApiMember>

    <ApiMember kind="function" name="lv_draw_3d" file="draw/lv_draw_3d.h" line="60" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/lv_draw_3d.h#L60">
      lv_draw_3d [#lv_draw_3d]

      Create a 3D draw task

      ```c title=" " lineNumbers=1
      void lv_draw_3d(lv_layer_t *layer, const lv_draw_3d_dsc_t *dsc, const lv_area_t *coords)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                                   | Description                                                            |
      | -------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
      | `layer`  | <ApiLink name="lv_layer_t" display="lv_layer_t *" />                   | pointer to a layer                                                     |
      | `dsc`    | <ApiLink name="lv_draw_3d_dsc_t" display="const lv_draw_3d_dsc_t *" /> | pointer to an initialized <ApiLink name="lv_draw_3d_dsc_t" /> variable |
      | `coords` | <ApiLink name="lv_area_t" display="const lv_area_t *" />               |                                                                        |
    </ApiMember>
  </ApiTab>
</ApiTabs>

Structs [#structs]

<ApiMember kind="struct" name="lv_draw_3d_dsc_t">
  lv_draw_3d_dsc_t [#lv_draw_3d_dsc_t]

  | Member   | Type                                  | Description |
  | -------- | ------------------------------------- | ----------- |
  | `base`   | <ApiLink name="lv_draw_dsc_base_t" /> |             |
  | `tex_id` | <ApiLink name="lv_3dtexture_id_t" />  |             |
  | `h_flip` | <ApiLink name="bool" />               |             |
  | `v_flip` | <ApiLink name="bool" />               |             |
  | `opa`    | <ApiLink name="lv_opa_t" />           |             |
</ApiMember>

<TypeUsedBy name="lv_draw_3d_dsc_t" count="3">
  * `lv_draw_3d_dsc_init` — param `dsc`
  * `lv_draw_3d` — param `dsc`
  * `lv_draw_nanovg_3d` — param `dsc`
</TypeUsedBy>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_draw.h&#x22;]" includedBy="[&#x22;lv_draw_nanovg_private.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_area.h&#x22;, &#x22;lv_array.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_bidi.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_kconfig.h&#x22;, &#x22;lv_draw_buf.h&#x22;, &#x22;lv_event.h&#x22;, &#x22;lv_ext_data.h&#x22;, &#x22;lv_flex.h&#x22;, &#x22;lv_font.h&#x22;, &#x22;lv_fs.h&#x22;, &#x22;lv_grad.h&#x22;, &#x22;lv_grid.h&#x22;, &#x22;lv_image_decoder.h&#x22;, &#x22;lv_image_dsc.h&#x22;, &#x22;lv_layout.h&#x22;, &#x22;lv_ll.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_matrix.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_profiler.h&#x22;, &#x22;lv_profiler_builtin.h&#x22;, &#x22;lv_sprintf.h&#x22;, &#x22;lv_string.h&#x22;, &#x22;lv_style.h&#x22;, &#x22;lv_style_gen.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_tick.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
