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}
609
610std::shared_ptr<LoadedTexture> TextureCache::LoadTextureFromMemory(
611 const std::shared_ptr<vfs::IBlob>& data,
612 const std::string& name,
613 const std::string& mimeType,
614 bool sRGB,
615 CommonRenderPasses* passes,
616 nvrhi::ICommandList* commandList)
617{
618 std::shared_ptr<TextureData> texture = CreateTextureData();
619
620 texture->forceSRGB = sRGB;
621 texture->path = name;
622 texture->mimeType = mimeType;
623
624 if (FillTextureData(data, texture, "", mimeType))
625 {
626 TextureLoaded(texture);
627
628 FinalizeTexture(texture, passes, commandList);
629 }
630
631 ++m_TexturesLoaded;
632
633 return texture;
634}
635
636std::shared_ptr<LoadedTexture> TextureCache::LoadTextureFromMemoryDeferred(
637 const std::shared_ptr<vfs::IBlob>& data,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected