Unverified Commit 9a00f38e authored by Alexander Bock's avatar Alexander Bock Committed by GitHub
Browse files

Feature/jenkins warnings (#538)

 * Remove warnings from Jenkins
 * Improve Jenkins behavior
parent 4831f4aa
Showing with 54 additions and 65 deletions
+54 -65
......@@ -4,12 +4,12 @@ def modules = [
"fieldlines",
"galaxy",
"globebrowsing",
"imgui",
"iswa",
"kameleon",
"kameleonvolume",
"multiresvolume",
"newhorizons",
"onscreengui",
"spacecraftinstruments",
"space",
"toyvolume",
"volume"
......@@ -36,7 +36,7 @@ stage('Build') {
cd build
cmake .. ''' +
flags + ''' ..
make -j4
make -j4 OpenSpace
'''
}
}
......
Subproject commit bae3585e8de2bab25c571d3114547de267602826
Subproject commit d4d529d2f142af03c1f40ab7fdc179cfd5320c6d
Subproject commit 278d45d9df82094abfd177026d0dfce7be67eaca
Subproject commit 462cca02c68e6fe74ccc3aa18580aae673ecc5aa
......@@ -118,7 +118,6 @@ private:
GLuint _screenQuad;
GLuint _vertexPositionBuffer;
GLuint _mainColorTexture;
GLuint _mainOtherDataTexture;
GLuint _mainPositionTexture;
GLuint _mainNormalTexture;
GLuint _mainDepthTexture;
......
......@@ -249,7 +249,7 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData& renderData,
// The following scale comes from PSC transformations.
float fScaleFactor = renderData.camera.scaling().x *
pow(10.0, renderData.camera.scaling().y);
pow(10.f, renderData.camera.scaling().y);
glm::dmat4 dfScaleCamTransf = glm::scale(glm::dvec3(fScaleFactor));
program.setUniform(
"dInverseScaleTransformMatrix",
......
......@@ -323,11 +323,11 @@ DashboardItemAngle::DashboardItemAngle(ghoul::Dictionary dictionary)
);
});
if (dictionary.hasKey(DestinationTypeInfo.identifier)) {
std::string value = dictionary.value<std::string>(DestinationTypeInfo.identifier);
if (value == "Node") {
std::string type = dictionary.value<std::string>(DestinationTypeInfo.identifier);
if (type == "Node") {
_destination.type = Type::Node;
}
else if (value == "Focus") {
else if (type == "Focus") {
_destination.type = Type::Focus;
}
else {
......@@ -391,7 +391,7 @@ std::pair<glm::dvec3, std::string> DashboardItemAngle::positionAndLabel(
default:
return { glm::dvec3(0.0), "Unknown" };
}
};
}
void DashboardItemAngle::render(glm::vec2& penPosition) {
std::pair<glm::dvec3, std::string> sourceInfo = positionAndLabel(_source);
......
......@@ -409,7 +409,7 @@ std::pair<glm::dvec3, std::string> DashboardItemDistance::positionAndLabel(
default:
return { glm::dvec3(0.0), "Unknown" };
}
};
}
void DashboardItemDistance::render(glm::vec2& penPosition) {
std::pair<glm::dvec3, std::string> sourceInfo = positionAndLabel(
......
......@@ -51,7 +51,7 @@ public:
static documentation::Documentation Documentation();
protected:
virtual void bindTexture();
virtual void bindTexture() override;
private:
void loadTexture();
......
......@@ -50,7 +50,7 @@ public:
static documentation::Documentation Documentation();
protected:
virtual void bindTexture();
virtual void bindTexture() override;
private:
std::future<DownloadManager::MemoryFile> downloadImageToMemory(std::string url);
......@@ -61,10 +61,6 @@ private:
std::unique_ptr<ghoul::opengl::Texture> _texture;
bool _textureIsDirty;
bool _downloadImage;
};
} // namespace openspace
......
......@@ -302,16 +302,16 @@ void RenderableSphere::render(const RenderData& data, RendererTasks&) {
float adjustedTransparency = _transparency;
if (_fadeInThreshold > 0.0) {
float distCamera = glm::length(data.camera.positionVec3());
double distCamera = glm::length(data.camera.positionVec3());
float funcValue = static_cast<float>(
(1.0 / double(_fadeInThreshold/1E24))*(distCamera / 1E24)
);
adjustedTransparency *= funcValue > 1.0 ? 1.0 : funcValue;
adjustedTransparency *= funcValue > 1.f ? 1.f : funcValue;
}
if (_fadeOutThreshold > -1.0) {
float distCamera = glm::distance(
double distCamera = glm::distance(
data.camera.positionVec3(),
data.position.dvec3()
);
......
......@@ -533,7 +533,7 @@ bool FixedRotation::initialize() {
return res;
}
glm::dmat3 FixedRotation::matrix(const Time& time) const {
glm::dmat3 FixedRotation::matrix(const Time&) const {
if (!_enabled) {
return glm::dmat3();
}
......
......@@ -38,7 +38,7 @@ public:
StaticTranslation();
StaticTranslation(const ghoul::Dictionary& dictionary);
glm::dvec3 position(const Time& time) const;
glm::dvec3 position(const Time& time) const override;
static documentation::Documentation Documentation();
private:
......
......@@ -521,8 +521,6 @@ void RenderableDUMeshes::renderLabels(const RenderData& data,
const glm::vec3& orthoRight,
const glm::vec3& orthoUp)
{
RenderEngine& renderEngine = OsEng.renderEngine();
float scale = 0.0;
switch (_unit) {
case Meter:
......
......@@ -674,8 +674,6 @@ void RenderablePlanesCloud::renderLabels(const RenderData& data,
const glm::dvec3& orthoRight,
const glm::dvec3& orthoUp, float fadeInVariable)
{
RenderEngine& renderEngine = OsEng.renderEngine();
float scale = 0.0;
switch (_unit) {
case Meter:
......
......@@ -388,8 +388,8 @@ void RenderablePoints::update(const UpdateData&) {
if (_hasColorMapFile) {
const size_t nAstronomicalObjects = _fullData.size() /
_nValuesPerAstronomicalObject;
// const size_t nAstronomicalObjects = _fullData.size() /
// _nValuesPerAstronomicalObject;
// const size_t nValues = _slicedData.size() / nAstronomicalObjects;
// GLsizei stride = static_cast<GLsizei>(sizeof(double) * nValues);
......
......@@ -38,38 +38,39 @@
#include <fstream>
namespace {
std::string _loggerCat = "RenderableFieldlines";
const float defaultFieldlineStepSize = 0.5f;;
constexpr const float defaultFieldlineStepSize = 0.5f;
const glm::vec4 defaultFieldlineColor = glm::vec4(1.f, 0.f, 0.f, 1.f);
const char* keyVectorField = "VectorField";
const char* keyVectorFieldType = "Type";
const char* keyVectorFieldFile = "File";
const char* keyVectorFieldVolumeModel = "Model";
const char* keyVectorFieldVolumeVariable = "Variables";
constexpr const char* keyVectorField = "VectorField";
constexpr const char* keyVectorFieldType = "Type";
constexpr const char* keyVectorFieldFile = "File";
constexpr const char* keyVectorFieldVolumeModel = "Model";
constexpr const char* keyVectorFieldVolumeVariable = "Variables";
const char* keyFieldlines = "Fieldlines";
const char* keyFieldlinesStepSize = "Stepsize";
const char* keyFieldlinesClassification = "Classification";
const char* keyFieldlinesColor = "Color";
constexpr const char* keyFieldlines = "Fieldlines";
constexpr const char* keyFieldlinesStepSize = "Stepsize";
constexpr const char* keyFieldlinesClassification = "Classification";
constexpr const char* keyFieldlinesColor = "Color";
const char* keySeedPoints = "SeedPoints";
const char* keySeedPointsType = "Type";
const char* keySeedPointsFile = "File";
const char* keySeedPointsTable = "SeedPoints";
constexpr const char* keySeedPoints = "SeedPoints";
constexpr const char* keySeedPointsType = "Type";
constexpr const char* keySeedPointsFile = "File";
constexpr const char* keySeedPointsTable = "SeedPoints";
const char* seedPointsSourceFile = "File";
const char* seedPointsSourceTable = "Table";
constexpr const char* seedPointsSourceFile = "File";
constexpr const char* seedPointsSourceTable = "Table";
const char* vectorFieldTypeVolumeKameleon = "VolumeKameleon";
constexpr const char* vectorFieldTypeVolumeKameleon = "VolumeKameleon";
const char* vectorFieldKameleonModelBATSRUS = "BATSRUS";
constexpr const char* vectorFieldKameleonModelBATSRUS = "BATSRUS";
const char* vectorFieldKameleonVariableLorentz = "Lorentz";
constexpr const char* vectorFieldKameleonVariableLorentz = "Lorentz";
const int SeedPointSourceFile = 0;
const int SeedPointSourceTable = 1;
constexpr const int SeedPointSourceFile = 0;
constexpr const int SeedPointSourceTable = 1;
static const openspace::properties::Property::PropertyInfo StepSizeInfo = {
"StepSize",
......@@ -309,7 +310,7 @@ void RenderableFieldlines::update(const UpdateData&) {
int prevEnd = 0;
std::vector<LinePoint> vertexData;
// Arrange data for glMultiDrawArrays
for (int j = 0; j < fieldlines.size(); ++j) {
for (size_t j = 0; j < fieldlines.size(); ++j) {
_lineStart.push_back(prevEnd);
_lineCount.push_back(static_cast<int>(fieldlines[j].size()));
prevEnd = prevEnd + static_cast<int>(fieldlines[j].size());
......
......@@ -88,7 +88,7 @@ T Angle<T>::asRadians() const {
template <typename T>
T Angle<T>::asDegrees() const {
return _radians * 180.0 / PI;
return _radians * T(180.0) / PI;
}
template <typename T>
......
......@@ -47,7 +47,6 @@ namespace {
const char* KeyPerformPreProcessing = "PerformPreProcessing";
const char* KeyTilePixelSize = "TilePixelSize";
const char* KeyFilePath = "FilePath";
const char* KeyBasePath = "BasePath";
const char* KeyPreCacheLevel = "PreCacheLevel";
const char* KeyPadTiles = "PadTiles";
......
......@@ -141,11 +141,11 @@ void GuiIswaComponent::render() {
int cdfOptionValue = _cdfOptionsMap[groupName];
const auto& cdfs = group.second;
for (int i = 0; i < cdfs.size(); ++i) {
for (size_t i = 0; i < cdfs.size(); ++i) {
ImGui::RadioButton(
cdfs[i].name.c_str(),
&_cdfOptionsMap[groupName],
i
static_cast<int>(i)
);
}
......@@ -192,7 +192,7 @@ void GuiIswaComponent::render() {
ImGui::SameLine();
if (ImGui::CollapsingHeader(("Description" + std::to_string(id)).c_str())) {
ImGui::TextWrapped(info->description.c_str());
ImGui::TextWrapped("%s", info->description.c_str());
ImGui::Spacing();
}
......
......@@ -37,10 +37,8 @@
#include <openspace/scripting/scriptengine.h>
#include <ghoul/filesystem/filesystem.h>
#include <glm/ext.hpp>
#include <ghoul/misc/misc.h>
#include <glm/gtx/component_wise.hpp>
#include <imgui_internal.h>
namespace openspace {
......@@ -505,8 +503,8 @@ void renderVec2Property(Property* prop, const std::string& ownerName,
ImGui::PushID((ownerName + "." + name).c_str());
Vec2Property::ValueType value = *p;
float min = static_cast<float>(glm::compMin(p->minValue()));
float max = static_cast<float>(glm::compMax(p->maxValue()));
float min = glm::compMin(p->minValue());
float max = glm::compMax(p->maxValue());
bool changed = ImGui::SliderFloat2(
name.c_str(),
......@@ -541,8 +539,8 @@ void renderVec3Property(Property* prop, const std::string& ownerName,
ImGui::PushID((ownerName + "." + name).c_str());
Vec3Property::ValueType value = *p;
float min = static_cast<float>(glm::compMin(p->minValue()));
float max = static_cast<float>(glm::compMax(p->maxValue()));
float min = glm::compMin(p->minValue());
float max = glm::compMax(p->maxValue());
bool changed = false;
if (prop->viewOption(Property::ViewOptions::Color)) {
......@@ -586,8 +584,8 @@ void renderVec4Property(Property* prop, const std::string& ownerName,
ImGui::PushID((ownerName + "." + name).c_str());
Vec4Property::ValueType value = *p;
float min = static_cast<float>(glm::compMin(p->minValue()));
float max = static_cast<float>(glm::compMax(p->maxValue()));
float min = glm::compMin(p->minValue());
float max = glm::compMax(p->maxValue());
bool changed = false;
if (prop->viewOption(Property::ViewOptions::Color)) {
......@@ -610,7 +608,7 @@ void renderVec4Property(Property* prop, const std::string& ownerName,
renderTooltip(prop, tooltipDelay);
}
if (value != p->value()) {
if (changed) {
executeScript(
p->fullyQualifiedIdentifier(),
std::to_string(value),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment