MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / LoadStatic

Function LoadStatic

src/Nazara/Graphics/Formats/MeshLoader.cpp:61–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59 }
60
61 bool LoadStatic(Model* model, Stream& stream, const ModelParameters& parameters)
62 {
63 NazaraUnused(parameters);
64
65 MeshRef mesh = Mesh::New();
66 if (!mesh->LoadFromStream(stream, parameters.mesh))
67 {
68 NazaraError("Failed to load model mesh");
69 return false;
70 }
71
72 if (mesh->IsAnimable())
73 {
74 NazaraError("Can't load animated mesh into static model");
75 return false;
76 }
77
78 model->SetMesh(mesh);
79
80 if (parameters.loadMaterials)
81 LoadMaterials(model, parameters);
82
83 return true;
84 }
85
86 Ternary CheckAnimated(Stream& stream, const SkeletalModelParameters& parameters)
87 {

Callers

nothing calls this directly

Calls 4

LoadMaterialsFunction · 0.85
IsAnimableMethod · 0.80
LoadFromStreamMethod · 0.45
SetMeshMethod · 0.45

Tested by

no test coverage detected