From e6c6cd2825bd476958917d72bfd79f62b801b5e1 Mon Sep 17 00:00:00 2001 From: samcake <samuel.gateau@gmail.com> Date: Fri, 17 Feb 2017 12:24:04 -0800 Subject: [PATCH] cleaner unserialization --- libraries/model/src/model/TextureMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/model/src/model/TextureMap.cpp b/libraries/model/src/model/TextureMap.cpp index e4e358c581..3f10f66256 100755 --- a/libraries/model/src/model/TextureMap.cpp +++ b/libraries/model/src/model/TextureMap.cpp @@ -128,7 +128,7 @@ gpu::Texture* cacheTexture(const std::string& name, gpu::Texture* srcTexture, bo fclose (file); //then create a new texture out of the ktx - auto theNewTexure = Texture::unserialize(gpu::TextureUsageType::RESOURCE, ktx::KTX::create(storage)); + auto theNewTexure = Texture::unserialize(srcTexture->getUsageType(), ktx::KTX::create(storage)); if (theNewTexure) { returnedTexture = theNewTexure;