| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
#ifndef LV_GLTF_ENVIRONMENT_PRIVATE_H |
| 7 |
#define LV_GLTF_ENVIRONMENT_PRIVATE_H |
| 8 |
|
| 9 |
#ifdef __cplusplus |
| 10 |
extern "C" { |
| 11 |
#endif |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
#include "../../../lv_conf_internal.h" |
| 17 |
#if LV_USE_GLTF |
| 18 |
|
| 19 |
#include "lv_gltf_environment.h" |
| 20 |
#include "../../../misc/lv_types.h" |
| 21 |
#include "../../../drivers/opengles/opengl_shader/lv_opengl_shader_internal.h" |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
struct _lv_gltf_ibl_sampler { |
| 32 |
uint32_t cube_map_resolution; |
| 33 |
float lod_bias; |
| 34 |
uint32_t lowest_mip_level; |
| 35 |
uint32_t input_texture_id; |
| 36 |
uint32_t cube_map_texture_id; |
| 37 |
uint32_t framebuffer; |
| 38 |
uint32_t mipmap_count; |
| 39 |
|
| 40 |
uint32_t lambertian_texture_id; |
| 41 |
uint32_t lambertian_sample_count; |
| 42 |
|
| 43 |
uint32_t ggx_sample_count; |
| 44 |
uint32_t ggx_texture_id; |
| 45 |
|
| 46 |
uint32_t sheen_texture_id; |
| 47 |
uint32_t sheen_sample_count; |
| 48 |
|
| 49 |
uint32_t ggxlut_texture_id; |
| 50 |
|
| 51 |
uint32_t lut_sample_count; |
| 52 |
uint32_t lut_resolution; |
| 53 |
|
| 54 |
uint32_t charlielut_texture_id; |
| 55 |
|
| 56 |
float scale_value; |
| 57 |
uint32_t mipmap_levels; |
| 58 |
|
| 59 |
lv_opengl_shader_manager_t shader_manager; |
| 60 |
|
| 61 |
uint32_t fullscreen_vertex_buffer; |
| 62 |
uint32_t fullscreen_tex_coord_buffer; |
| 63 |
|
| 64 |
}; |
| 65 |
|
| 66 |
typedef struct { |
| 67 |
uint8_t * data; |
| 68 |
uint32_t internal_format; |
| 69 |
uint32_t format; |
| 70 |
uint32_t type; |
| 71 |
} lv_gltf_ibl_texture_t; |
| 72 |
|
| 73 |
typedef struct { |
| 74 |
float * data; |
| 75 |
size_t data_len; |
| 76 |
uint32_t width; |
| 77 |
uint32_t height; |
| 78 |
} lv_gltf_ibl_image_t; |
| 79 |
|
| 80 |
struct _lv_gltf_environment { |
| 81 |
uint32_t diffuse; |
| 82 |
uint32_t specular; |
| 83 |
uint32_t sheen; |
| 84 |
uint32_t ggxLut; |
| 85 |
uint32_t charlie_lut; |
| 86 |
uint32_t mip_count; |
| 87 |
float ibl_intensity_scale; |
| 88 |
float angle; |
| 89 |
}; |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
#endif |
| 100 |
|
| 101 |
#ifdef __cplusplus |
| 102 |
} |
| 103 |
#endif |
| 104 |
|
| 105 |
#endif |
| 106 |
|