Feature/filesystem cleanup (#1587)

* Adapting to the changes in Ghoul
* First step of moving filesystem functions to std
* Remove persistence flag from cachemanager
This commit is contained in:
Alexander Bock
2021-05-16 20:26:49 +02:00
committed by GitHub
parent 2ca7101b6c
commit ccdc5a5dc3
87 changed files with 648 additions and 711 deletions

View File

@@ -126,7 +126,7 @@ RenderableRings::RenderableRings(const ghoul::Dictionary& dictionary)
addProperty(_size);
_texturePath = absPath(p.texture);
_textureFile = std::make_unique<File>(_texturePath);
_textureFile = std::make_unique<File>(_texturePath.value());
_offset = p.offset.value_or(_offset);
addProperty(_offset);
@@ -134,7 +134,7 @@ RenderableRings::RenderableRings(const ghoul::Dictionary& dictionary)
_texturePath.onChange([&]() { loadTexture(); });
addProperty(_texturePath);
_textureFile->setCallback([&](const File&) { _textureIsDirty = true; });
_textureFile->setCallback([this]() { _textureIsDirty = true; });
_nightFactor = p.nightFactor.value_or(_nightFactor);
addProperty(_nightFactor);
@@ -249,10 +249,10 @@ void RenderableRings::loadTexture() {
_texture->uploadTexture();
_texture->setFilter(ghoul::opengl::Texture::FilterMode::AnisotropicMipMap);
_textureFile = std::make_unique<ghoul::filesystem::File>(_texturePath);
_textureFile->setCallback(
[&](const ghoul::filesystem::File&) { _textureIsDirty = true; }
_textureFile = std::make_unique<ghoul::filesystem::File>(
_texturePath.value()
);
_textureFile->setCallback([this]() { _textureIsDirty = true; });
}
}
}