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

Method LoadTextureFromMemory

src/engine/TextureCache.cpp:610–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

608 texture->loadOptions = options;
609 texture->path = name;
610 texture->mimeType = mimeType;
611
612 threadPool.AddTask([this, texture, data, mimeType]()
613 {
614 if (FillTextureData(data, texture, "", mimeType))
615 {
616 TextureLoaded(texture);
617
618 std::lock_guard<std::mutex> guard(m_TexturesToFinalizeMutex);
619
620 m_TexturesToFinalize.push(texture);
621 }
622
623 ++m_TexturesLoaded;
624 });
625
626 return texture;
627}
628
629std::shared_ptr<LoadedTexture> TextureCache::LoadTextureFromMemory(
630 const std::shared_ptr<vfs::IBlob>& data,
631 const std::string& name,
632 const std::string& mimeType,
633 const TextureLoadOptions& options,
634 CommonRenderPasses* passes,
635 nvrhi::ICommandList* commandList)
636{
637 std::shared_ptr<TextureData> texture = CreateTextureData();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected