MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / loadImage

Method loadImage

Source/RenderPasses/ImageLoader/ImageLoader.cpp:185–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185bool ImageLoader::loadImage(const std::filesystem::path& path)
186{
187 if (path.empty())
188 return false;
189
190 std::filesystem::path resolvedPath = AssetResolver::getDefaultResolver().resolvePath(path);
191 if (std::filesystem::exists(resolvedPath))
192 {
193 mImagePath = path;
194 mpTex = Texture::createFromFile(mpDevice, resolvedPath, mGenerateMips, mLoadSRGB);
195 return mpTex != nullptr;
196 }
197 else
198 {
199 return false;
200 }
201}

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45
resolvePathMethod · 0.45

Tested by

no test coverage detected