# lv_gltf_model_loader.h (/api/libs/gltf/gltf_data/lv_gltf_model_loader_h)



<ApiSummary functions="4" typedefs="1" />

Functions [#functions]

<ApiTabs items="[&#x22;Getters (1)&#x22;,&#x22;Other (3)&#x22;]">
  <ApiTab value="Getters (1)">
    <ApiMember kind="function" name="lv_gltf_model_loader_get_texture" file="libs/gltf/gltf_data/lv_gltf_model_loader.h" line="57" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/libs/gltf/gltf_data/lv_gltf_model_loader.h#L57">
      lv_gltf_model_loader_get_texture [#lv_gltf_model_loader_get_texture]

      Retrieve a texture ID by its hash from the loader

      ```c title=" " lineNumbers=1
      uint32_t lv_gltf_model_loader_get_texture(lv_gltf_model_loader_t *loader, uint32_t texture_hash)
      ```

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

      | Name           | Type                                                                         | Description                               |
      | -------------- | ---------------------------------------------------------------------------- | ----------------------------------------- |
      | `loader`       | <ApiLink name="lv_gltf_model_loader_t" display="lv_gltf_model_loader_t *" /> | pointer to the glTF model loader instance |
      | `texture_hash` | <ApiLink name="uint32_t" />                                                  | hash value of the texture to retrieve     |

      **Returns:** <ApiLink name="uint32_t" /> — the texture ID associated with the hash, or 0 if not found
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (3)">
    <ApiMember kind="function" name="lv_gltf_model_loader_create" file="libs/gltf/gltf_data/lv_gltf_model_loader.h" line="41" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/libs/gltf/gltf_data/lv_gltf_model_loader.h#L41">
      lv_gltf_model_loader_create [#lv_gltf_model_loader_create]

      Create a new glTF model loader instance

      ```c title=" " lineNumbers=1
      lv_gltf_model_loader_t * lv_gltf_model_loader_create(void)
      ```

      **Returns:** <ApiLink name="lv_gltf_model_loader_t" display="lv_gltf_model_loader_t *" /> — pointer to the newly created glTF model loader instance
    </ApiMember>

    <ApiMember kind="function" name="lv_gltf_model_loader_store_texture" file="libs/gltf/gltf_data/lv_gltf_model_loader.h" line="49" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/libs/gltf/gltf_data/lv_gltf_model_loader.h#L49">
      lv_gltf_model_loader_store_texture [#lv_gltf_model_loader_store_texture]

      Store a texture ID associated with a texture hash in the loader

      ```c title=" " lineNumbers=1
      void lv_gltf_model_loader_store_texture(lv_gltf_model_loader_t *loader, uint32_t texture_hash, uint32_t texture_id)
      ```

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

      | Name           | Type                                                                         | Description                               |
      | -------------- | ---------------------------------------------------------------------------- | ----------------------------------------- |
      | `loader`       | <ApiLink name="lv_gltf_model_loader_t" display="lv_gltf_model_loader_t *" /> | pointer to the glTF model loader instance |
      | `texture_hash` | <ApiLink name="uint32_t" />                                                  | hash value identifying the texture        |
      | `texture_id`   | <ApiLink name="uint32_t" />                                                  | the texture ID to associate with the hash |
    </ApiMember>

    <ApiMember kind="function" name="lv_gltf_model_loader_delete" file="libs/gltf/gltf_data/lv_gltf_model_loader.h" line="63" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/libs/gltf/gltf_data/lv_gltf_model_loader.h#L63">
      lv_gltf_model_loader_delete [#lv_gltf_model_loader_delete]

      Delete a glTF model loader instance and free its resources

      ```c title=" " lineNumbers=1
      void lv_gltf_model_loader_delete(lv_gltf_model_loader_t *loader)
      ```

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

      | Name     | Type                                                                         | Description                                         |
      | -------- | ---------------------------------------------------------------------------- | --------------------------------------------------- |
      | `loader` | <ApiLink name="lv_gltf_model_loader_t" display="lv_gltf_model_loader_t *" /> | pointer to the glTF model loader instance to delete |
    </ApiMember>
  </ApiTab>
</ApiTabs>

Typedefs [#typedefs]

<ApiMember kind="typedef" name="lv_gltf_model_loader_t" file="libs/gltf/gltf_data/lv_gltf_model_loader.h" line="31" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/libs/gltf/gltf_data/lv_gltf_model_loader.h#L31">
  lv_gltf_model_loader_t [#lv_gltf_model_loader_t]

  ```c title=" " lineNumbers=1
  typedef struct _lv_gltf_model_loader_t lv_gltf_model_loader_t
  ```
</ApiMember>

<TypeUsedBy name="lv_gltf_model_loader_t" count="5">
  * `lv_gltf_data_load_from_file` — param `loader`
  * `lv_gltf_data_load_from_bytes` — param `loader`
  * `lv_gltf_model_loader_store_texture` — param `loader`
  * `lv_gltf_model_loader_get_texture` — param `loader`
  * `lv_gltf_model_loader_delete` — param `loader`
</TypeUsedBy>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_types.h&#x22;]" includedBy="[&#x22;lv_gltf_model.h&#x22;]" transitiveIncludes="[&#x22;lv_conf_kconfig.h&#x22;]" />
