MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / SetTextureOrDefault

Method SetTextureOrDefault

TombEngine/Renderer/RendererSettings.cpp:67–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66
67 void Renderer::SetTextureOrDefault(Texture2D& texture, std::wstring path)
68 {
69 texture = Texture2D();
70
71 if (std::filesystem::is_regular_file(path))
72 {
73 texture = Texture2D(_device.Get(), path);
74 }
75 else if (!path.empty()) // Loading default texture without path may be intentional.
76 {
77 std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> converter;
78 TENLog("Texture file not found: " + converter.to_bytes(path), LogLevel::Warning);
79 }
80 }
81}

Callers

nothing calls this directly

Calls 4

Texture2DClass · 0.85
TENLogFunction · 0.85
GetMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected