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

Function Load

src/Nazara/Graphics/Formats/TextureLoader.cpp:25–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 }
24
25 bool Load(Material* material, Stream& stream, const MaterialParams& parameters)
26 {
27 NazaraUnused(parameters);
28
29 TextureRef texture = Texture::New();
30 if (!texture->LoadFromStream(stream))
31 {
32 NazaraError("Failed to load diffuse map");
33 return false;
34 }
35
36 material->Reset();
37 material->SetDiffuseMap(texture);
38 material->SetShader(parameters.shaderName);
39
40 return true;
41 }
42 }
43
44 namespace Loaders

Callers

nothing calls this directly

Calls 3

LoadFromStreamMethod · 0.45
ResetMethod · 0.45
SetShaderMethod · 0.45

Tested by

no test coverage detected