lv_gltf_environment.h¶
Defines
-
LV_GLTF_DEFAULT_CUBE_MAP_RESOLUTION¶
Functions
-
lv_gltf_ibl_sampler_t *lv_gltf_ibl_sampler_create(void)¶
Create an IBL sampler for processing environment images
Note
Can be safely deleted after environments are created
- Returns:
pointer to the created sampler, or NULL on failure
-
void lv_gltf_ibl_sampler_set_cube_map_pixel_resolution(lv_gltf_ibl_sampler_t *sampler, uint32_t resolution)¶
Set the resolution for each cubemap face
- Parameters:
pointer – to a sampler
resolution – of each cube map face in pixels (recommended: 64-512 for embedded)
-
void lv_gltf_ibl_sampler_delete(lv_gltf_ibl_sampler_t *sampler)¶
Delete an IBL sampler
- Parameters:
sampler – pointer to the sampler to delete
-
lv_gltf_environment_t *lv_gltf_environment_create(lv_gltf_ibl_sampler_t *sampler, const char *file_path)¶
Create an environment from an HDR or JPEG panoramic image for IBL rendering
Note
The source image will be downsampled to the sampler's texture_size
Note
The environment can be shared across multiple glTF objects
- Parameters:
sampler – IBL sampler defining output resolution (can be deleted after this call)
file_path – path to equirectangular environment image, or NULL to use default embedded image
- Returns:
pointer to the created environment, or NULL on failure
-
void lv_gltf_environment_set_angle(lv_gltf_environment_t *env, float angle)¶
Set the rotation angle of the environment map
- Parameters:
env – pointer to the environment
angle – rotation angle in degrees
-
void lv_gltf_environment_delete(lv_gltf_environment_t *environment)¶
Delete an environment
- Parameters:
environment – pointer to the environment to delete