diff --git a/modules/softwareintegration/network/softwareconnection.cpp b/modules/softwareintegration/network/softwareconnection.cpp index 3b2bf59e1d..fd24189ce8 100644 --- a/modules/softwareintegration/network/softwareconnection.cpp +++ b/modules/softwareintegration/network/softwareconnection.cpp @@ -55,7 +55,8 @@ SoftwareConnection::SoftwareConnection(SoftwareConnection&& sc) {} SoftwareConnection::~SoftwareConnection() { - LINFO(fmt::format("Remove software connection {}", _id)); + // TODO: Destructor being called on Connection for some reason + LINFO(fmt::format("Removing software connection {}", _id)); if (!_isConnected) return; _isConnected = false; diff --git a/modules/softwareintegration/pointdatamessagehandler.cpp b/modules/softwareintegration/pointdatamessagehandler.cpp index ae1b387557..d931c37833 100644 --- a/modules/softwareintegration/pointdatamessagehandler.cpp +++ b/modules/softwareintegration/pointdatamessagehandler.cpp @@ -241,19 +241,22 @@ void PointDataMessageHandler::handleAttributeDataMessage(const std::vector module->storeData(key, std::move(attributeData)); - auto callback = [this, identifier, keyEnum] { - switch (keyEnum) { - case storage::Key::ColormapAttrData : { + std::function callback; + switch (keyEnum) { + case storage::Key::ColormapAttrData : { + callback = [this, identifier, keyEnum] { openspace::global::scriptEngine->queueScript( fmt::format( "openspace.setPropertyValueSingle('Scene.{}.Renderable.ColormapEnabled', {});", identifier, "true" ), scripting::ScriptEngine::RemoteScripting::Yes - ); - break; - } - case storage::Key::LinearSizeAttrData : { + ); + }; + break; + } + case storage::Key::LinearSizeAttrData : { + callback = [this, identifier] { openspace::global::scriptEngine->queueScript( fmt::format( "openspace.setPropertyValueSingle('Scene.{}.Renderable.LinearSizeEnabled', {});", @@ -261,12 +264,12 @@ void PointDataMessageHandler::handleAttributeDataMessage(const std::vector ), scripting::ScriptEngine::RemoteScripting::Yes ); - break; - } - default: - break; + }; + break; } - }; + default: + break; + } addCallback(identifier, { callback, allDataToWaitFor }); } diff --git a/modules/softwareintegration/shaders/point_fs.glsl b/modules/softwareintegration/shaders/point_fs.glsl index f9ab0a121f..e00cd6c10f 100644 --- a/modules/softwareintegration/shaders/point_fs.glsl +++ b/modules/softwareintegration/shaders/point_fs.glsl @@ -54,6 +54,11 @@ Fragment getFragment() { discard; } + // Don't show points with no value for that attribute + if (colormapEnabled && isnan(ge_colormapAttributeScalar)) { + discard; + } + const float radius = 0.5; float distance = length(coords - radius); if (distance > 0.6) discard;