diff --git a/Hydrogent/src/HnTextureUtils.cpp b/Hydrogent/src/HnTextureUtils.cpp index fc530daf..8f47ec59 100644 --- a/Hydrogent/src/HnTextureUtils.cpp +++ b/Hydrogent/src/HnTextureUtils.cpp @@ -26,6 +26,9 @@ #include "HnTextureUtils.hpp" +#include "ProxyDataBlob.hpp" +#include "RefCntContainer.hpp" + #include "pxr/usd/ar/asset.h" #include "pxr/usd/ar/resolver.h" @@ -52,8 +55,11 @@ RefCntAutoPtr CreateTextureLoaderFromSdfPath(const char* if (!Buffer) return {}; + RefCntAutoPtr pAssetData = RefCntContainer>::Create(Buffer); + RefCntAutoPtr pDataBlob = ProxyDataBlob::Create(Buffer.get(), Asset->GetSize(), pAssetData); + RefCntAutoPtr pLoader; - CreateTextureLoaderFromMemory(Buffer.get(), Asset->GetSize(), true, LoadInfo, &pLoader); + CreateTextureLoaderFromDataBlob(pDataBlob, LoadInfo, &pLoader); return pLoader; }