diff --git a/apps/OpenSpace/ext/launcher/src/sgctedit/settingswidget.cpp b/apps/OpenSpace/ext/launcher/src/sgctedit/settingswidget.cpp index 7244a7d961..75a8a2a6c5 100644 --- a/apps/OpenSpace/ext/launcher/src/sgctedit/settingswidget.cpp +++ b/apps/OpenSpace/ext/launcher/src/sgctedit/settingswidget.cpp @@ -32,11 +32,11 @@ SettingsWidget::SettingsWidget(sgct::quat orientation, QWidget* parent) : QWidget(parent) , _orientationValue(std::move(orientation)) - , _firstWindowGraphicsSelection(new QComboBox) - , _firstWindowSelectionLayout(new QHBoxLayout) - ,_showUiOnFirstWindow(new QCheckBox( + , _showUiOnFirstWindow(new QCheckBox( "Show user interface only on first window using graphics:" )) + , _firstWindowGraphicsSelection(new QComboBox) + , _firstWindowSelectionLayout(new QHBoxLayout) { QBoxLayout* layout = new QVBoxLayout(this); layout->setContentsMargins(0, 0, 0, 0); diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index 79936ec5b8..fdba7c8016 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -994,34 +994,6 @@ void setSgctDelegateFunctions() { }; } -void checkCommandLineForSettings(int& argc, char** argv, bool& hasSGCT, bool& hasProfile, - std::string& sgctFunctionName) -{ - for (int i = 1; i < argc; i++) { - const std::string arg = argv[i]; - if (arg == "-c" || arg == "--config") { - std::string p = ((i + 1) < argc) ? argv[i + 1] : ""; - p.erase(std::remove_if(p.begin(), p.end(), ::isspace), p.end()); - - const std::string sgctAssignment = "SGCTConfig="; - const size_t findSgct = p.find(sgctAssignment); - const size_t findBracket = p.find('}'); - if (findSgct != std::string::npos) { - if (findBracket != std::string::npos) { - sgctFunctionName = arg.substr( - findSgct + sgctAssignment.length(), - findBracket - findSgct - ); - } - hasSGCT = true; - } - if (p.find("Profile=") != std::string::npos) { - hasProfile = true; - } - } - } -} - std::string setWindowConfigPresetForGui(const std::string& labelFromCfgFile, bool haveCliSGCTConfig) { diff --git a/ext/ghoul b/ext/ghoul index 6d7fcb22d1..689b1cec8b 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 6d7fcb22d14b9aefa2f2cb02da24684d16042641 +Subproject commit 689b1cec8ba22530b3401df06697388ef9e1e26e diff --git a/modules/base/rendering/pointcloud/renderablepointcloud.cpp b/modules/base/rendering/pointcloud/renderablepointcloud.cpp index c43cd3ff3f..8d8ed3aef9 100644 --- a/modules/base/rendering/pointcloud/renderablepointcloud.cpp +++ b/modules/base/rendering/pointcloud/renderablepointcloud.cpp @@ -548,13 +548,13 @@ RenderablePointCloud::Texture::Texture() RenderablePointCloud::Fading::Fading(const ghoul::Dictionary& dictionary) : properties::PropertyOwner({ "Fading", "Fading", "" }) - , enabled(EnableDistanceFadeInfo, false) , fadeInDistances( FadeInDistancesInfo, glm::vec2(0.f), glm::vec2(0.f), glm::vec2(100.f) ) + , enabled(EnableDistanceFadeInfo, false) , invert(InvertFadeInfo, false) { const Parameters p = codegen::bake(dictionary); @@ -581,13 +581,13 @@ RenderablePointCloud::Fading::Fading(const ghoul::Dictionary& dictionary) RenderablePointCloud::RenderablePointCloud(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _drawElements(DrawElementsInfo, true) + , _sizeSettings(dictionary) + , _colorSettings(dictionary) + , _fading(dictionary) , _useAdditiveBlending(UseAdditiveBlendingInfo, true) + , _drawElements(DrawElementsInfo, true) , _renderOption(RenderOptionInfo, properties::OptionProperty::DisplayType::Dropdown) , _nDataPoints(NumShownDataPointsInfo, 0) - , _fading(dictionary) - , _colorSettings(dictionary) - , _sizeSettings(dictionary) { ZoneScoped; @@ -1015,7 +1015,7 @@ void RenderablePointCloud::fillAndUploadTextureLayer(unsigned int arrayIndex, } void RenderablePointCloud::generateArrayTextures() { - using Entry = std::pair>; + using Entry = std::pair>; unsigned int arrayIndex = 0; for (const Entry& e : _textureMapByFormat) { glm::uvec2 res = e.first.resolution; @@ -1571,8 +1571,8 @@ gl::GLenum RenderablePointCloud::internalGlFormat(bool useAlpha) const { } ghoul::opengl::Texture::Format RenderablePointCloud::glFormat(bool useAlpha) const { - using Texture = ghoul::opengl::Texture; - return useAlpha ? Texture::Format::RGBA : Texture::Format::RGB; + using Tex = ghoul::opengl::Texture; + return useAlpha ? Tex::Format::RGBA : Tex::Format::RGB; } bool operator==(const TextureFormat& l, const TextureFormat& r) { diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index 4cedebc51a..d9188dafd6 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -553,13 +553,7 @@ glm::dvec3 directionToLightSource(const glm::dvec3& pos, SceneGraphNode* lightSo SceneGraphNode* node = lightSource ? lightSource : sceneGraph()->sceneGraphNode("Sun"); - if (lightSource) { - return lightSource->worldPosition() - pos; - } - else { - const glm::dvec3 dir = length(pos) > 0.0 ? glm::normalize(-pos) : glm::dvec3(0.0); - return dir; - } + return glm::normalize(node->worldPosition() - pos); } } // namespace diff --git a/modules/globebrowsing/src/timequantizer.cpp b/modules/globebrowsing/src/timequantizer.cpp index 31af4b3b96..22a9cc7840 100644 --- a/modules/globebrowsing/src/timequantizer.cpp +++ b/modules/globebrowsing/src/timequantizer.cpp @@ -333,9 +333,9 @@ void DateTime::setSecond(int s) { TimeQuantizer::TimeQuantizer(std::string start, std::string end, const std::string& resolution) - : _start(start) + : _resolution(parseTimeResolutionStr(resolution)) + , _start(start) , _timerange(std::move(start), std::move(end)) - , _resolution(parseTimeResolutionStr(resolution)) { verifyStartTimeRestrictions(); } diff --git a/modules/volume/volumegridtype.cpp b/modules/volume/volumegridtype.cpp index 57ced6d10f..f301ed671b 100644 --- a/modules/volume/volumegridtype.cpp +++ b/modules/volume/volumegridtype.cpp @@ -26,9 +26,9 @@ namespace openspace::volume { -InvalidGridTypeError::InvalidGridTypeError(std::string gridType) - : RuntimeError("Invalid grid type: '" + gridType + "'") - , gridType(std::move(gridType)) +InvalidGridTypeError::InvalidGridTypeError(std::string gridType_) + : RuntimeError("Invalid grid type: '" + gridType_ + "'") + , gridType(std::move(gridType_)) {} VolumeGridType parseGridType(const std::string& gridType) { diff --git a/modules/volume/volumegridtype.h b/modules/volume/volumegridtype.h index f652bd92da..3c41faa053 100644 --- a/modules/volume/volumegridtype.h +++ b/modules/volume/volumegridtype.h @@ -36,7 +36,7 @@ enum class VolumeGridType : int { }; struct InvalidGridTypeError : public ghoul::RuntimeError { - explicit InvalidGridTypeError(std::string gridType); + explicit InvalidGridTypeError(std::string gridType_); std::string gridType; }; diff --git a/modules/webbrowser/src/screenspacebrowser.cpp b/modules/webbrowser/src/screenspacebrowser.cpp index 026c6f9f9a..5ca4bfbdb0 100644 --- a/modules/webbrowser/src/screenspacebrowser.cpp +++ b/modules/webbrowser/src/screenspacebrowser.cpp @@ -83,9 +83,9 @@ ScreenSpaceBrowser::ScreenSpaceBrowser(const ghoul::Dictionary& dictionary) : ScreenSpaceRenderable(dictionary) , _dimensions(DimensionsInfo, glm::vec2(0.f), glm::vec2(0.f), glm::vec2(3000.f)) , _renderHandler(new ScreenSpaceRenderHandler) - , _keyboardHandler(new WebKeyboardHandler) , _url(UrlInfo) , _reload(ReloadInfo) + , _keyboardHandler(new WebKeyboardHandler) { const Parameters p = codegen::bake(dictionary);