Use more filesystem::path where applicable

This commit is contained in:
Alexander Bock
2024-04-06 19:50:39 +02:00
parent 2af06fb641
commit 4328476d26
148 changed files with 712 additions and 705 deletions

View File

@@ -597,7 +597,7 @@ RenderablePointCloud::RenderablePointCloud(const ghoul::Dictionary& dictionary)
if (p.file.has_value()) {
_hasDataFile = true;
_dataFile = absPath(*p.file).string();
_dataFile = absPath(*p.file);
}
if (p.dataMapping.has_value()) {
@@ -637,7 +637,7 @@ RenderablePointCloud::RenderablePointCloud(const ghoul::Dictionary& dictionary)
if (t.folder.has_value()) {
_textureMode = TextureInputMode::Multi;
_hasSpriteTexture = true;
_texturesDirectory = absPath(*t.folder).string();
_texturesDirectory = absPath(*t.folder);
if (t.file.has_value()) {
LWARNING(std::format(
@@ -653,11 +653,14 @@ RenderablePointCloud::RenderablePointCloud(const ghoul::Dictionary& dictionary)
_textureMode = TextureInputMode::Single;
_hasSpriteTexture = true;
_texture.spriteTexturePath = absPath(*t.file).string();
_texture.spriteTexturePath.onChange([this]() { _spriteTextureIsDirty = true; });
_texture.spriteTexturePath.onChange(
[this]() { _spriteTextureIsDirty = true; }
);
}
_texture.enabled = t.enabled.value_or(_texture.enabled);
_texture.allowCompression = t.allowCompression.value_or(_texture.allowCompression);
_texture.allowCompression =
t.allowCompression.value_or(_texture.allowCompression);
_texture.useAlphaChannel = t.useAlphaChannel.value_or(_texture.useAlphaChannel);
}
@@ -912,7 +915,7 @@ void RenderablePointCloud::loadTexture(const std::filesystem::path& path, int in
}
std::unique_ptr<ghoul::opengl::Texture> t =
ghoul::io::TextureReader::ref().loadTexture(path.string(), 2);
ghoul::io::TextureReader::ref().loadTexture(path, 2);
bool useAlpha = (t->numberOfChannels() > 3) && _texture.useAlphaChannel;