| 608 | } |
| 609 | |
| 610 | std::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 | |
| 636 | std::shared_ptr<LoadedTexture> TextureCache::LoadTextureFromMemoryDeferred( |
| 637 | const std::shared_ptr<vfs::IBlob>& data, |
nothing calls this directly
no outgoing calls
no test coverage detected