MCPcopy Create free account
hub / github.com/NVIDIA-RTX/Donut / LoadTextureFromFileDeferred

Method LoadTextureFromFileDeferred

src/engine/TextureCache.cpp:516–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514 return texture;
515
516 texture->loadOptions = options;
517 texture->path = path.generic_string();
518
519 auto fileData = ReadTextureFile(path);
520 if (fileData)
521 {
522 if (FillTextureData(fileData, texture, path.extension().generic_string(), ""))
523 {
524 TextureLoaded(texture);
525
526 FinalizeTexture(texture, passes, commandList);
527 }
528 }
529
530 ++m_TexturesLoaded;
531
532 return texture;
533}
534
535std::shared_ptr<LoadedTexture> TextureCache::LoadTextureFromFileDeferred(
536 const std::filesystem::path& path,
537 const TextureLoadOptions& options)
538{
539 std::shared_ptr<TextureData> texture;
540
541 if (FindTextureInCache(path, options, texture))
542 return texture;
543
544 texture->loadOptions = options;
545 texture->path = path.generic_string();
546
547 auto fileData = ReadTextureFile(path);

Callers 1

LoadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected