mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-08 20:50:19 -06:00
Adding static Settings to Renderable (#2578)
* Add settings to Renderable to control whether the renderbin is updated based on Opacity * Remove duplicate RenderBin specification for RenderableSphere * Remove unnecessary RenderBin specifications of Lagrange points * Don't automatically update the renderbin for RenderableLabel and RenderablePlane * Remove extra `setRenderBinFromOpacity` from RenderableSpheres * Move information about whether a renderable should be updated when disabled * Some cleanup of Renderable class * Don't update the renderbin automatically if the user specified the renderbin manually
This commit is contained in:
@@ -238,7 +238,7 @@ documentation::Documentation RenderableLabel::Documentation() {
|
||||
}
|
||||
|
||||
RenderableLabel::RenderableLabel(const ghoul::Dictionary& dictionary)
|
||||
: Renderable(dictionary)
|
||||
: Renderable(dictionary, { .automaticallyUpdateRenderBin = false })
|
||||
, _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown)
|
||||
, _color(ColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f))
|
||||
, _fontSize(FontSizeInfo, 50.f, 1.f, 100.f)
|
||||
@@ -260,11 +260,10 @@ RenderableLabel::RenderableLabel(const ghoul::Dictionary& dictionary)
|
||||
const Parameters p = codegen::bake<Parameters>(dictionary);
|
||||
|
||||
addProperty(_opacity);
|
||||
registerUpdateRenderBinFromOpacity();
|
||||
|
||||
_blendMode.addOptions({
|
||||
{ BlendMode::Normal, "Normal" },
|
||||
{ BlendMode::Additive, "Additive"}
|
||||
{ BlendMode::Additive, "Additive" }
|
||||
});
|
||||
_blendMode.onChange([&]() {
|
||||
switch (_blendMode) {
|
||||
|
||||
Reference in New Issue
Block a user