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

Function LoadScene

engine/modelc/src/modelimporter_gltf.cpp:2019–2044  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2017}
2018
2019static void LoadScene(Scene* scene, cgltf_data* data)
2020{
2021 dmHashTable64<void*> cache;
2022 LoadSkins(scene, data);
2023 LoadNodes(scene, data);
2024 LoadSamplers(scene, data, &cache);
2025 LoadImages(scene, data, &cache);
2026 LoadTextures(scene, data, &cache);
2027 LoadMaterials(scene, data, &cache);
2028 LoadMeshes(scene, data);
2029
2030 // Make sure we early-out so we don't touch uninitialized data
2031 if (scene->m_LoadError)
2032 return;
2033
2034 LinkNodesWithBones(scene, data);
2035 LinkMeshesWithNodes(scene, data);
2036 LoadAnimations(scene, data);
2037
2038 FixupNonSkinnedModels(scene, data);
2039
2040 // At this point, all the nodes reference each other
2041
2042 // Make sure the skins have only one root node
2043 GenerateRootBone(scene);
2044}
2045
2046static bool LoadFinalizeGltf(Scene* scene)
2047{

Callers 1

LoadFinalizeGltfFunction · 0.70

Calls 12

LoadSkinsFunction · 0.85
LoadNodesFunction · 0.85
LoadSamplersFunction · 0.85
LoadImagesFunction · 0.85
LoadMaterialsFunction · 0.85
LoadMeshesFunction · 0.85
LinkNodesWithBonesFunction · 0.85
LinkMeshesWithNodesFunction · 0.85
LoadAnimationsFunction · 0.85
FixupNonSkinnedModelsFunction · 0.85
GenerateRootBoneFunction · 0.85
LoadTexturesFunction · 0.70

Tested by

no test coverage detected