Applied Ghoul cleanups

This commit is contained in:
Alexander Bock
2015-11-22 21:26:02 -05:00
parent 01c1586616
commit 3806318b0d
7 changed files with 10 additions and 12 deletions
+1 -2
View File
@@ -146,8 +146,7 @@ void ModelGeometry::deinitialize() {
}
bool ModelGeometry::loadObj(const std::string& filename) {
std::string cachedFile = "";
FileSys.cacheManager()->getCachedFile(filename, cachedFile, true);
std::string cachedFile = FileSys.cacheManager()->cachedFilename(filename, true);
bool hasCachedFile = FileSys.fileExists(cachedFile);
if (hasCachedFile) {
+1 -2
View File
@@ -349,8 +349,7 @@ void RenderableStars::update(const UpdateData& data) {
bool RenderableStars::loadData() {
std::string _file = _speckFile;
std::string cachedFile = "";
FileSys.cacheManager()->getCachedFile(_file, cachedFile, true);
std::string cachedFile = FileSys.cacheManager()->cachedFilename(_file, true);
bool hasCachedFile = FileSys.fileExists(cachedFile);
if (hasCachedFile) {
+2 -2
View File
@@ -150,8 +150,8 @@ void GUI::setEnabled(bool enabled) {
}
void GUI::initialize() {
std::string cachedFile;
FileSys.cacheManager()->getCachedFile(configurationFile, "", cachedFile, true);
std::string cachedFile = FileSys.cacheManager()->cachedFilename(configurationFile,
"", true);
char* buffer = new char[cachedFile.size() + 1];
@@ -140,9 +140,10 @@ ghoul::opengl::Texture* RenderableVolume::loadVolume(
std::stringstream ss;
ss << "." << dimensions[0] << "x" << dimensions[1] << "x" << dimensions[2] << "." << "." << variableCacheString << ".cache";
std::string cachepath; // = filepath + ss.str();
// = filepath + ss.str();
ghoul::filesystem::File ghlFile(filepath);
FileSys.cacheManager()->getCachedFile(ghlFile.baseName(), ss.str(), cachepath, true);
std::string cachepath = FileSys.cacheManager()->cachedFilename(ghlFile.baseName(),
ss.str(), true);
if (cache && FileSys.fileExists(cachepath)) {
#define VOLUME_LOAD_PROGRESSBAR