mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Fix warnings in code
Make OpenSpaceTest not flood the console on Jenkins Fix Vec3 property to signal change correctly Let RenderablePlanetProject correctly reload base map and height map Update Ghoul
This commit is contained in:
Submodule ext/ghoul updated: d2aa3d3616...d490fbaf59
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
/**
|
||||
* Default constructor initializing the AberrationCorrection to Type::None with a
|
||||
* Drection::Reception
|
||||
* Direction::Reception
|
||||
*/
|
||||
AberrationCorrection() = default;
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ RenderablePath::RenderablePath(const ghoul::Dictionary& dictionary)
|
||||
float fPointSteps; // Dictionary can not pick out ints...
|
||||
if (!dictionary.getValue(keyPointSteps, fPointSteps))
|
||||
fPointSteps = 4;
|
||||
_pointSteps = fPointSteps;
|
||||
_pointSteps = static_cast<int>(fPointSteps);
|
||||
|
||||
glm::vec3 color(0.f);
|
||||
if (dictionary.hasKeyAndValue<glm::vec3>(keyColor))
|
||||
@@ -145,7 +145,7 @@ void RenderablePath::render(const RenderData& data) {
|
||||
return;
|
||||
|
||||
|
||||
int nPointsToDraw = _vertexArray.size();// (time - _start) / (_stop - _start) * (_vertexArray.size()) + 1 + 0.5;
|
||||
size_t nPointsToDraw = _vertexArray.size();// (time - _start) / (_stop - _start) * (_vertexArray.size()) + 1 + 0.5;
|
||||
|
||||
_programObject->activate();
|
||||
|
||||
|
||||
@@ -486,7 +486,9 @@ bool RenderablePlanetProjection::loadTextures() {
|
||||
using ghoul::opengl::Texture;
|
||||
_baseTexture = nullptr;
|
||||
if (_colorTexturePath.value() != "") {
|
||||
_baseTexture = ghoul::io::TextureReader::ref().loadTexture(_colorTexturePath);
|
||||
_baseTexture = ghoul::io::TextureReader::ref().loadTexture(
|
||||
absPath(_colorTexturePath)
|
||||
);
|
||||
if (_baseTexture) {
|
||||
ghoul::opengl::convertTextureFormat(*_baseTexture, Texture::Format::RGB);
|
||||
_baseTexture->uploadTexture();
|
||||
@@ -496,7 +498,9 @@ bool RenderablePlanetProjection::loadTextures() {
|
||||
|
||||
_heightMapTexture = nullptr;
|
||||
if (_heightMapTexturePath.value() != "") {
|
||||
_heightMapTexture = ghoul::io::TextureReader::ref().loadTexture(_heightMapTexturePath);
|
||||
_heightMapTexture = ghoul::io::TextureReader::ref().loadTexture(
|
||||
absPath(_heightMapTexturePath)
|
||||
);
|
||||
if (_heightMapTexture) {
|
||||
ghoul::opengl::convertTextureFormat(*_heightMapTexture, Texture::Format::RGB);
|
||||
_heightMapTexture->uploadTexture();
|
||||
|
||||
@@ -65,9 +65,7 @@ bool inRange(float x, float a, float b){
|
||||
void main() {
|
||||
vec2 uv = (vs_position.xy + vec2(1.0)) / vec2(2.0);
|
||||
|
||||
vec4 radius = vec4(1.1883, 1.1883, 1.1883, 6);
|
||||
vec4 vertex = uvToModel(uv, radius, _segments);
|
||||
// vec4 vertex = uvToModel(uv, _radius, _segments);
|
||||
vec4 vertex = uvToModel(uv, _radius, _segments);
|
||||
|
||||
vec4 raw_pos = psc_to_meter(vertex, _scaling);
|
||||
vec4 projected = ProjectorMatrix * ModelTransform * raw_pos;
|
||||
|
||||
@@ -432,8 +432,7 @@ void renderDVec3Property(Property* prop, const std::string& ownerName) {
|
||||
float min = std::min(std::min(p->minValue().x, p->minValue().y), p->minValue().z);
|
||||
float max = std::max(std::max(p->maxValue().x, p->maxValue().y), p->maxValue().z);
|
||||
|
||||
|
||||
ImGui::SliderFloat3(
|
||||
bool changed = ImGui::SliderFloat3(
|
||||
name.c_str(),
|
||||
glm::value_ptr(value),
|
||||
min,
|
||||
@@ -441,7 +440,7 @@ void renderDVec3Property(Property* prop, const std::string& ownerName) {
|
||||
);
|
||||
renderTooltip(prop);
|
||||
|
||||
if (glm::dvec3(value) != p->value()) {
|
||||
if (changed) {
|
||||
executeScript(
|
||||
p->fullyQualifiedIdentifier(),
|
||||
"{" + std::to_string(value.x) + "," +
|
||||
|
||||
@@ -317,6 +317,10 @@ function (handle_option_tests)
|
||||
"${OPENSPACE_BASE_DIR}/tests"
|
||||
"${OPENSPACE_EXT_DIR}/ghoul/ext/googletest/googletest/include"
|
||||
)
|
||||
target_compile_definitions(OpenSpaceTest PUBLIC
|
||||
"GHL_THROW_ON_ASSERT"
|
||||
"GTEST_HAS_TR1_TUPLE=0"
|
||||
)
|
||||
target_link_libraries(OpenSpaceTest gtest libOpenSpace)
|
||||
|
||||
if (MSVC)
|
||||
|
||||
Reference in New Issue
Block a user