diff --git a/gui/timelineview/controlwidget.cpp b/gui/timelineview/controlwidget.cpp index d66f280641..cd1e57af8e 100644 --- a/gui/timelineview/controlwidget.cpp +++ b/gui/timelineview/controlwidget.cpp @@ -33,7 +33,8 @@ #include #include #include -#include + +#include namespace { struct ImportantDate { @@ -222,11 +223,11 @@ void ControlWidget::onValueChange() { float delta; if (value < 0.f) { value = -value; - float d = std::pow(3, value / 10) - 1.f; + float d = pow(3, value / 10) - 1.f; delta = -d; } else { - float d = std::pow(3, value / 10) - 1.f; + float d = pow(3, value / 10) - 1.f; delta = d; } diff --git a/shaders/modules/plane/plane_fs.glsl b/shaders/modules/plane/plane_fs.glsl index c3f673f8cf..9e572651db 100644 --- a/shaders/modules/plane/plane_fs.glsl +++ b/shaders/modules/plane/plane_fs.glsl @@ -52,4 +52,8 @@ void main() ABufferStruct_t frag = createGeometryFragment(diffuse, position, depth); addToBuffer(frag); + + gl_FragDepth = depth; + if (diffuse.a == 0.0) + discard; } \ No newline at end of file diff --git a/shaders/modules/trails/path_fs.glsl b/shaders/modules/trails/path_fs.glsl index 0a5443713c..60535c0aba 100644 --- a/shaders/modules/trails/path_fs.glsl +++ b/shaders/modules/trails/path_fs.glsl @@ -24,7 +24,7 @@ #version __CONTEXT__ layout(location = 0) in vec4 vs_point_position; -layout(location = 1) in flat int isHour; +layout(location = 1) flat in int isHour; layout(location = 2) in vec4 vs_point_color; //in flat int isHour; //uniform vec4 campos; diff --git a/shaders/modules/trails/path_vs.glsl b/shaders/modules/trails/path_vs.glsl index 294179bca8..06f37f3876 100644 --- a/shaders/modules/trails/path_vs.glsl +++ b/shaders/modules/trails/path_vs.glsl @@ -55,14 +55,14 @@ uniform vec3 color; //uniform vec4 campos; layout(location = 0) out vec4 vs_point_position; -layout(location = 1) out flat int isHour; +layout(location = 1) flat out int isHour; layout(location = 2) out vec4 vs_point_color; #include "PowerScaling/powerScaling_vs.hglsl" void main() { - vec4 gray = { 0.6f, 0.6f, 0.6f, 0.8f}; + vec4 gray = vec4(0.6f, 0.6f, 0.6f, 0.8f); float cameraTooFar = 1 * pow(k, 10); float bigPoint = 5.f; float smallPoint = 2.f; diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 2ad9e0a6e7..0d32e117c4 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -148,6 +148,13 @@ bool OpenSpaceEngine::create( LDEBUG("Initialize FileSystem"); ghoul::filesystem::FileSystem::initialize(); +#ifdef __APPLE__ + ghoul::filesystem::File app(argv[0]); + std::string dirName = app.directoryName(); + LINFO("Setting starting directory to '" << dirName << "'"); + FileSys.setCurrentDirectory(dirName); +#endif + // Sanity check of values if (argc < 1 || argv == nullptr) { LFATAL("No arguments were passed to this function"); diff --git a/src/main.cpp b/src/main.cpp index d7a851db0f..0b7e94a4d9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -259,6 +259,7 @@ void postFXPass(){ } void setupPostFX(){ +#ifndef __APPLE__ sgct::PostFX fx[1]; sgct::ShaderProgram *shader; fx[0].init("OpacityControl", absPath("${SHADERS}/postFX_vs.glsl"), absPath("${SHADERS}/postFX_fs.glsl")); @@ -269,4 +270,5 @@ void setupPostFX(){ _postFXOpacityLoc = shader->getUniformLocation("Opacity"); shader->unbind(); _sgctEngine->addPostFX(fx[0]); +#endif } diff --git a/src/rendering/renderablepath.cpp b/src/rendering/renderablepath.cpp index 5e2b6702e9..319b09998f 100644 --- a/src/rendering/renderablepath.cpp +++ b/src/rendering/renderablepath.cpp @@ -67,6 +67,8 @@ RenderablePath::RenderablePath(const ghoul::Dictionary& dictionary) , _successfullDictionaryFetch(true) , _needsSweep(true) , _drawLine("drawline", "Draw Line", false) + , _start(0.0) + , _stop(0.0) { _successfullDictionaryFetch &= dictionary.getValue(keyBody, _target); _successfullDictionaryFetch &= dictionary.getValue(keyObserver, _observer); diff --git a/src/rendering/stars/renderablestars.cpp b/src/rendering/stars/renderablestars.cpp index 4d3927ebdf..bf8aa1886f 100644 --- a/src/rendering/stars/renderablestars.cpp +++ b/src/rendering/stars/renderablestars.cpp @@ -176,6 +176,7 @@ bool RenderableStars::deinitialize() { void RenderableStars::render(const RenderData& data) { glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA); + _program->activate(); // @Check overwriting the scaling from the camera; error as parsec->meter conversion diff --git a/src/scene/scenegraph.cpp b/src/scene/scenegraph.cpp index fdc5819c97..bc4a0bf59b 100644 --- a/src/scene/scenegraph.cpp +++ b/src/scene/scenegraph.cpp @@ -315,7 +315,8 @@ bool SceneGraph::sortTopologially() { } } - return true; + + return true; } bool SceneGraph::addSceneGraphNode(SceneGraphNode* node) {