MCPcopy Create free account
hub / github.com/defold/defold / LoadSamplers

Function LoadSamplers

engine/modelc/src/modelimporter_gltf.cpp:620–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618}
619
620static void LoadSamplers(Scene* scene, cgltf_data* gltf_data, dmHashTable64<void*>* cache)
621{
622 InitSize(scene->m_Samplers, gltf_data->samplers_count, gltf_data->samplers_count);
623
624 for (uint32_t i = 0; i < gltf_data->samplers_count; ++i)
625 {
626 cgltf_sampler* gltf_sampler = &gltf_data->samplers[i];
627 Sampler* sampler = &scene->m_Samplers[i];
628 memset(sampler, 0, sizeof(*sampler));
629 sampler->m_Name = DuplicateObjectName(gltf_sampler);
630 sampler->m_Index = i;
631
632 sampler->m_MagFilter = gltf_sampler->mag_filter;
633 sampler->m_MinFilter = gltf_sampler->min_filter;
634 sampler->m_WrapS = gltf_sampler->wrap_s;
635 sampler->m_WrapT = gltf_sampler->wrap_t;
636
637 AddToCache(cache, gltf_sampler, sampler);
638 }
639}
640
641static void LoadImages(Scene* scene, cgltf_data* gltf_data, dmHashTable64<void*>* cache)
642{

Callers 1

LoadSceneFunction · 0.85

Calls 3

InitSizeFunction · 0.85
DuplicateObjectNameFunction · 0.85
AddToCacheFunction · 0.70

Tested by

no test coverage detected