mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
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:
@@ -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; });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user