# lv_gltf_data_internal.h (/api/private/libs/gltf/gltf_data/lv_gltf_data_internal_h)



<ApiSummary functions="8" structs="5" />

Functions [#functions]

<ApiTabs items="[&#x22;Getters (2)&#x22;,&#x22;Other (6)&#x22;]">
  <ApiTab value="Getters (2)">
    <ApiMember kind="function" name="lv_gltf_get_compiled_shader" file="private/libs/gltf/gltf_data/lv_gltf_data_internal.h" line="193" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/src/libs/gltf/gltf_data/lv_gltf_data_internal.h#L193">
      lv_gltf_get_compiled_shader [#lv_gltf_get_compiled_shader]

      ```c title=" " lineNumbers=1
      lv_gltf_compiled_shader_t * lv_gltf_get_compiled_shader(lv_array_t *compiled_shaders, size_t identifier)
      ```

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

      | Name               | Type                                                 |
      | ------------------ | ---------------------------------------------------- |
      | `compiled_shaders` | <ApiLink name="lv_array_t" display="lv_array_t *" /> |
      | `identifier`       | `size_t`                                             |
    </ApiMember>

    <ApiMember kind="function" name="lv_gltf_data_get_radius" file="private/libs/gltf/gltf_data/lv_gltf_data_internal.h" line="201" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/src/libs/gltf/gltf_data/lv_gltf_data_internal.h#L201">
      lv_gltf_data_get_radius [#lv_gltf_data_get_radius]

      Retrieve the radius of the GLTF data object.

      ```c title=" " lineNumbers=1
      double lv_gltf_data_get_radius(const lv_gltf_model_t *model)
      ```

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

      | Name    | Type                                                                 | Description                                                           |
      | ------- | -------------------------------------------------------------------- | --------------------------------------------------------------------- |
      | `model` | <ApiLink name="lv_gltf_model_t" display="const lv_gltf_model_t *" /> | Pointer to the lv\_gltf\_data\_t object from which to get the radius. |

      **Returns:** `double` — The radius of the GLTF data object.
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (6)">
    <ApiMember kind="function" name="lv_gltf_uniform_locations_create" file="private/libs/gltf/gltf_data/lv_gltf_data_internal.h" line="184" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/src/libs/gltf/gltf_data/lv_gltf_data_internal.h#L184">
      lv_gltf_uniform_locations_create [#lv_gltf_uniform_locations_create]

      ```c title=" " lineNumbers=1
      lv_gltf_uniform_locations_t lv_gltf_uniform_locations_create(GLuint program)
      ```

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

      | Name      | Type     |
      | --------- | -------- |
      | `program` | `GLuint` |
    </ApiMember>

    <ApiMember kind="function" name="lv_gltf_store_compiled_shader" file="private/libs/gltf/gltf_data/lv_gltf_data_internal.h" line="191" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/src/libs/gltf/gltf_data/lv_gltf_data_internal.h#L191">
      lv_gltf_store_compiled_shader [#lv_gltf_store_compiled_shader]

      ```c title=" " lineNumbers=1
      void lv_gltf_store_compiled_shader(lv_array_t *compiled_shaders, size_t identifier, lv_gltf_compiled_shader_t *shader)
      ```

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

      | Name               | Type                                                                               |
      | ------------------ | ---------------------------------------------------------------------------------- |
      | `compiled_shaders` | <ApiLink name="lv_array_t" display="lv_array_t *" />                               |
      | `identifier`       | `size_t`                                                                           |
      | `shader`           | <ApiLink name="lv_gltf_compiled_shader_t" display="lv_gltf_compiled_shader_t *" /> |
    </ApiMember>

    <ApiMember kind="function" name="lv_gltf_model_add_viewer" file="private/libs/gltf/gltf_data/lv_gltf_data_internal.h" line="203" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/src/libs/gltf/gltf_data/lv_gltf_data_internal.h#L203">
      lv_gltf_model_add_viewer [#lv_gltf_model_add_viewer]

      ```c title=" " lineNumbers=1
      lv_result_t lv_gltf_model_add_viewer(lv_gltf_model_t *model, lv_obj_t *viewer)
      ```

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

      | Name     | Type                                                           |
      | -------- | -------------------------------------------------------------- |
      | `model`  | <ApiLink name="lv_gltf_model_t" display="lv_gltf_model_t *" /> |
      | `viewer` | <ApiLink name="lv_obj_t" display="lv_obj_t *" />               |
    </ApiMember>

    <ApiMember kind="function" name="lv_gltf_model_remove_viewer" file="private/libs/gltf/gltf_data/lv_gltf_data_internal.h" line="204" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/src/libs/gltf/gltf_data/lv_gltf_data_internal.h#L204">
      lv_gltf_model_remove_viewer [#lv_gltf_model_remove_viewer]

      ```c title=" " lineNumbers=1
      void lv_gltf_model_remove_viewer(lv_gltf_model_t *model, lv_obj_t *target_viewer)
      ```

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

      | Name            | Type                                                           |
      | --------------- | -------------------------------------------------------------- |
      | `model`         | <ApiLink name="lv_gltf_model_t" display="lv_gltf_model_t *" /> |
      | `target_viewer` | <ApiLink name="lv_obj_t" display="lv_obj_t *" />               |
    </ApiMember>

    <ApiMember kind="function" name="lv_gltf_model_invalidate" file="private/libs/gltf/gltf_data/lv_gltf_data_internal.h" line="205" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/src/libs/gltf/gltf_data/lv_gltf_data_internal.h#L205">
      lv_gltf_model_invalidate [#lv_gltf_model_invalidate]

      ```c title=" " lineNumbers=1
      void lv_gltf_model_invalidate(lv_gltf_model_t *model)
      ```

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

      | Name    | Type                                                           |
      | ------- | -------------------------------------------------------------- |
      | `model` | <ApiLink name="lv_gltf_model_t" display="lv_gltf_model_t *" /> |
    </ApiMember>

    <ApiMember kind="function" name="lv_gltf_detach_model" file="private/libs/gltf/gltf_data/lv_gltf_data_internal.h" line="213" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/src/libs/gltf/gltf_data/lv_gltf_data_internal.h#L213">
      lv_gltf_detach_model [#lv_gltf_detach_model]

      Make a viewer let go of a model it holds, without deleting the model.

      ```c title=" " lineNumbers=1
      void lv_gltf_detach_model(lv_obj_t *viewer, lv_gltf_model_t *model)
      ```

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

      | Name     | Type                                                           | Description                                   |
      | -------- | -------------------------------------------------------------- | --------------------------------------------- |
      | `viewer` | <ApiLink name="lv_obj_t" display="lv_obj_t *" />               | Pointer to the glTF viewer holding the model. |
      | `model`  | <ApiLink name="lv_gltf_model_t" display="lv_gltf_model_t *" /> | Pointer to the model to let go of.            |
    </ApiMember>
  </ApiTab>
</ApiTabs>

Structs [#structs]

<ApiMember kind="struct" name="IndirectDrawCommand">
  IndirectDrawCommand [#indirectdrawcommand]

  | Member          | Type     | Description |
  | --------------- | -------- | ----------- |
  | `count`         | `GLuint` |             |
  | `instanceCount` | `GLuint` |             |
  | `firstIndex`    | `GLuint` |             |
  | `baseVertex`    | `GLint`  |             |
  | `baseInstance`  | `GLuint` |             |
</ApiMember>

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

  | Member                                  | Type                                   | Description |
  | --------------------------------------- | -------------------------------------- | ----------- |
  | `draw`                                  | <ApiLink name="IndirectDrawCommand" /> |             |
  | `primitiveType`                         | `GLenum`                               |             |
  | `indexType`                             | `GLenum`                               |             |
  | `vertexArray`                           | `GLuint`                               |             |
  | `vertexBuffer`                          | `GLuint`                               |             |
  | `indexBuffer`                           | `GLuint`                               |             |
  | `materialUniformsIndex`                 | `GLuint`                               |             |
  | `albedoTexture`                         | `GLuint`                               |             |
  | `emissiveTexture`                       | `GLuint`                               |             |
  | `metalRoughTexture`                     | `GLuint`                               |             |
  | `occlusionTexture`                      | `GLuint`                               |             |
  | `normalTexture`                         | `GLuint`                               |             |
  | `diffuseTransmissionTexture`            | `GLuint`                               |             |
  | `diffuseTransmissionColorTexture`       | `GLuint`                               |             |
  | `transmissionTexture`                   | `GLuint`                               |             |
  | `transmissionTexcoordIndex`             | `GLuint`                               |             |
  | `baseColorTexcoordIndex`                | `GLint`                                |             |
  | `emissiveTexcoordIndex`                 | `GLint`                                |             |
  | `metallicRoughnessTexcoordIndex`        | `GLint`                                |             |
  | `occlusionTexcoordIndex`                | `GLint`                                |             |
  | `normalTexcoordIndex`                   | `GLint`                                |             |
  | `diffuseTransmissionTexcoordIndex`      | `GLint`                                |             |
  | `diffuseTransmissionColorTexcoordIndex` | `GLint`                                |             |
  | `clearcoatTexture`                      | `GLint`                                |             |
  | `clearcoatRoughnessTexture`             | `GLint`                                |             |
  | `clearcoatNormalTexture`                | `GLint`                                |             |
  | `clearcoatTexcoordIndex`                | `GLint`                                |             |
  | `clearcoatRoughnessTexcoordIndex`       | `GLint`                                |             |
  | `clearcoatNormalTexcoordIndex`          | `GLint`                                |             |
  | `thicknessTexture`                      | `GLuint`                               |             |
  | `thicknessTexcoordIndex`                | `GLint`                                |             |
  | `diffuseTexture`                        | `GLuint`                               |             |
  | `diffuseTexcoordIndex`                  | `GLint`                                |             |
  | `specularGlossinessTexture`             | `GLuint`                               |             |
  | `specularGlossinessTexcoordIndex`       | `GLint`                                |             |
</ApiMember>

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

  | Member                                    | Type    | Description |
  | ----------------------------------------- | ------- | ----------- |
  | `camera`                                  | `GLint` |             |
  | `view_projection_matrix`                  | `GLint` |             |
  | `model_matrix`                            | `GLint` |             |
  | `view_matrix`                             | `GLint` |             |
  | `projection_matrix`                       | `GLint` |             |
  | `env_intensity`                           | `GLint` |             |
  | `env_diffuse_sampler`                     | `GLint` |             |
  | `env_specular_sampler`                    | `GLint` |             |
  | `env_sheen_sampler`                       | `GLint` |             |
  | `env_ggx_lut_sampler`                     | `GLint` |             |
  | `env_charlie_lut_sampler`                 | `GLint` |             |
  | `env_sheen_e_lut_sampler`                 | `GLint` |             |
  | `env_mip_count`                           | `GLint` |             |
  | `exposure`                                | `GLint` |             |
  | `roughness_factor`                        | `GLint` |             |
  | `base_color_factor`                       | `GLint` |             |
  | `base_color_sampler`                      | `GLint` |             |
  | `base_color_uv_set`                       | `GLint` |             |
  | `base_color_uv_transform`                 | `GLint` |             |
  | `emissive_factor`                         | `GLint` |             |
  | `emissive_sampler`                        | `GLint` |             |
  | `emissive_uv_set`                         | `GLint` |             |
  | `emissive_uv_transform`                   | `GLint` |             |
  | `emissive_strength`                       | `GLint` |             |
  | `metallic_factor`                         | `GLint` |             |
  | `metallic_roughness_sampler`              | `GLint` |             |
  | `metallic_roughness_uv_set`               | `GLint` |             |
  | `metallic_roughness_uv_transform`         | `GLint` |             |
  | `occlusion_strength`                      | `GLint` |             |
  | `occlusion_sampler`                       | `GLint` |             |
  | `occlusion_uv_set`                        | `GLint` |             |
  | `occlusion_uv_transform`                  | `GLint` |             |
  | `normal_scale`                            | `GLint` |             |
  | `normal_sampler`                          | `GLint` |             |
  | `normal_uv_set`                           | `GLint` |             |
  | `normal_uv_transform`                     | `GLint` |             |
  | `clearcoat_factor`                        | `GLint` |             |
  | `clearcoat_roughness_factor`              | `GLint` |             |
  | `clearcoat_sampler`                       | `GLint` |             |
  | `clearcoat_uv_set`                        | `GLint` |             |
  | `clearcoat_uv_transform`                  | `GLint` |             |
  | `clearcoat_roughness_sampler`             | `GLint` |             |
  | `clearcoat_roughness_uv_set`              | `GLint` |             |
  | `clearcoat_roughness_uv_transform`        | `GLint` |             |
  | `clearcoat_normal_scale`                  | `GLint` |             |
  | `clearcoat_normal_sampler`                | `GLint` |             |
  | `clearcoat_normal_uv_set`                 | `GLint` |             |
  | `clearcoat_normal_uv_transform`           | `GLint` |             |
  | `thickness`                               | `GLint` |             |
  | `thickness_sampler`                       | `GLint` |             |
  | `thickness_uv_set`                        | `GLint` |             |
  | `thickness_uv_transform`                  | `GLint` |             |
  | `diffuse_transmission_sampler`            | `GLint` |             |
  | `diffuse_transmission_uv_set`             | `GLint` |             |
  | `diffuse_transmission_uv_transform`       | `GLint` |             |
  | `diffuse_transmission_color_sampler`      | `GLint` |             |
  | `diffuse_transmission_color_uv_set`       | `GLint` |             |
  | `diffuse_transmission_color_uv_transform` | `GLint` |             |
  | `sheen_color_factor`                      | `GLint` |             |
  | `sheen_roughness_factor`                  | `GLint` |             |
  | `specular_color_factor`                   | `GLint` |             |
  | `specular_factor`                         | `GLint` |             |
  | `diffuse_transmission_color_factor`       | `GLint` |             |
  | `diffuse_transmission_factor`             | `GLint` |             |
  | `ior`                                     | `GLint` |             |
  | `alpha_cutoff`                            | `GLint` |             |
  | `dispersion`                              | `GLint` |             |
  | `screen_size`                             | `GLint` |             |
  | `transmission_factor`                     | `GLint` |             |
  | `transmission_sampler`                    | `GLint` |             |
  | `transmission_uv_set`                     | `GLint` |             |
  | `transmission_uv_transform`               | `GLint` |             |
  | `transmission_framebuffer_sampler`        | `GLint` |             |
  | `transmission_framebuffer_size`           | `GLint` |             |
  | `attenuation_distance`                    | `GLint` |             |
  | `attenuation_color`                       | `GLint` |             |
  | `joints_sampler`                          | `GLint` |             |
  | `diffuse_factor`                          | `GLint` |             |
  | `glossiness_factor`                       | `GLint` |             |
  | `diffuse_sampler`                         | `GLint` |             |
  | `diffuse_uv_set`                          | `GLint` |             |
  | `diffuse_uv_transform`                    | `GLint` |             |
  | `specular_glossiness_sampler`             | `GLint` |             |
  | `specular_glossiness_uv_set`              | `GLint` |             |
  | `specular_glossiness_uv_transform`        | `GLint` |             |
</ApiMember>

<ApiMember kind="struct" name="_lv_gltf_model_loader_t">
  \_lv_gltf_model_loader_t [#_lv_gltf_model_loader_t]

  | Member         | Type                       | Description |
  | -------------- | -------------------------- | ----------- |
  | `textures_map` | <ApiLink name="lv_rb_t" /> |             |
</ApiMember>

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

  | Member     | Type                                           | Description |
  | ---------- | ---------------------------------------------- | ----------- |
  | `uniforms` | <ApiLink name="lv_gltf_uniform_locations_t" /> |             |
  | `program`  | `GLuint`                                       |             |
</ApiMember>

<TypeUsedBy name="lv_gltf_compiled_shader_t" count="1">
  * `lv_gltf_store_compiled_shader` — param `shader`
</TypeUsedBy>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lvgl_public.h&#x22;, &#x22;lv_opengl_shader_internal.h&#x22;, &#x22;lv_array.h&#x22;]" includedBy="[&#x22;lv_gltf_data_internal.hpp&#x22;, &#x22;lv_gltf_view_internal.h&#x22;, &#x22;lvgl_private.h&#x22;]" transitiveIncludes="[&#x22;lv_opengles_debug.h&#x22;, &#x22;lv_opengles_private.h&#x22;, &#x22;lv_rb_private.h&#x22;]" />
