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

Method LoadTextureFromMemoryDeferred

src/engine/TextureCache.cpp:636–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634 CommonRenderPasses* passes,
635 nvrhi::ICommandList* commandList)
636{
637 std::shared_ptr<TextureData> texture = CreateTextureData();
638
639 texture->loadOptions = options;
640 texture->path = name;
641 texture->mimeType = mimeType;
642
643 if (FillTextureData(data, texture, "", mimeType))
644 {
645 TextureLoaded(texture);
646
647 FinalizeTexture(texture, passes, commandList);
648 }
649
650 ++m_TexturesLoaded;
651
652 return texture;
653}
654
655std::shared_ptr<LoadedTexture> TextureCache::LoadTextureFromMemoryDeferred(
656 const std::shared_ptr<vfs::IBlob>& data,
657 const std::string& name,
658 const std::string& mimeType,
659 const TextureLoadOptions& options)
660{
661 std::shared_ptr<TextureData> texture = CreateTextureData();
662
663 texture->loadOptions = options;

Callers 1

LoadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected