mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-08 20:50:19 -06:00
Fix issue with texture not updating on property change for RenderablePointCloud
Fix issue with texture not being rendered when the texture file path is set during runtime
This commit is contained in:
@@ -731,9 +731,6 @@ RenderablePointCloud::RenderablePointCloud(const ghoul::Dictionary& dictionary)
|
||||
_textureMode = TextureInputMode::Single;
|
||||
_hasSpriteTexture = true;
|
||||
_texture.spriteTexturePath = absPath(*t.file).string();
|
||||
_texture.spriteTexturePath.onChange(
|
||||
[this]() { _spriteTextureIsDirty = true; }
|
||||
);
|
||||
}
|
||||
|
||||
_texture.enabled = t.enabled.value_or(_texture.enabled);
|
||||
@@ -742,6 +739,10 @@ RenderablePointCloud::RenderablePointCloud(const ghoul::Dictionary& dictionary)
|
||||
_texture.useAlphaChannel = t.useAlphaChannel.value_or(_texture.useAlphaChannel);
|
||||
}
|
||||
|
||||
_texture.spriteTexturePath.onChange([this]() {
|
||||
_spriteTextureIsDirty = true;
|
||||
_hasSpriteTexture = !_texture.spriteTexturePath.value().empty();
|
||||
});
|
||||
_texture.allowCompression.onChange([this]() { _spriteTextureIsDirty = true; });
|
||||
_texture.useAlphaChannel.onChange([this]() { _spriteTextureIsDirty = true; });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user