| 658 | } |
| 659 | |
| 660 | static void LoadTextures(Scene* scene, cgltf_data* gltf_data, dmHashTable64<void*>* cache) |
| 661 | { |
| 662 | InitSize(scene->m_Textures, gltf_data->textures_count, gltf_data->textures_count); |
| 663 | |
| 664 | for (uint32_t i = 0; i < gltf_data->textures_count; ++i) |
| 665 | { |
| 666 | cgltf_texture* gltf_texture = &gltf_data->textures[i]; |
| 667 | |
| 668 | Texture* texture = &scene->m_Textures[i]; |
| 669 | memset(texture, 0, sizeof(*texture)); |
| 670 | texture->m_Index = i; |
| 671 | texture->m_Name = DuplicateObjectName(gltf_texture); |
| 672 | texture->m_Sampler = GetFromCache<Sampler>(cache, gltf_texture->sampler); |
| 673 | texture->m_Image = GetFromCache<Image>(cache, gltf_texture->image); |
| 674 | texture->m_BasisuImage = GetFromCache<Image>(cache, gltf_texture->basisu_image); |
| 675 | |
| 676 | AddToCache(cache, gltf_texture, texture); |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | static void IdentityTransform(TextureTransform* out) |
| 681 | { |
no test coverage detected