Merge branch 'smarter_textures' of https://github.com/highfidelity/hifi into brown

This commit is contained in:
samcake 2017-02-24 09:27:52 -08:00
commit 9d593f2ba9

View file

@ -18,7 +18,7 @@
#include <QStandardPaths>
#include <QFileInfo>
#include <QDir>
#include <QCryptographicHash>
#include <Profile.h>
#include "ModelLogging.h"
@ -103,7 +103,8 @@ gpu::Texture* cacheTexture(const std::string& name, gpu::Texture* srcTexture, bo
}
});
std::string cleanedName = QUrl::toPercentEncoding(name.c_str()).toStdString();
std::string cleanedName = QCryptographicHash::hash(QUrl::toPercentEncoding(name.c_str()), QCryptographicHash::Sha1).toHex().toStdString();
std::string cacheFilename(ktxCacheFolder.toStdString());
cacheFilename += "/";
cacheFilename += cleanedName;