diff --git a/ext/ghoul b/ext/ghoul index 36294ad9f4..c660815ff5 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 36294ad9f4fb1c5251d336ffe809582b17d13f86 +Subproject commit c660815ff59b3d1be8f81d6614f84f420b39684b diff --git a/ext/sgct b/ext/sgct index 0a2d0241f4..70cde82e33 160000 --- a/ext/sgct +++ b/ext/sgct @@ -1 +1 @@ -Subproject commit 0a2d0241f40ffbabac22bcd5c55a8c782a938685 +Subproject commit 70cde82e331406d8bfe406d0e606fefa89d873c7 diff --git a/include/openspace/engine/wrapper/sgctwindowwrapper.h b/include/openspace/engine/wrapper/sgctwindowwrapper.h index 2b6ab89b61..7a07e2e5b2 100644 --- a/include/openspace/engine/wrapper/sgctwindowwrapper.h +++ b/include/openspace/engine/wrapper/sgctwindowwrapper.h @@ -42,7 +42,7 @@ public: bool windowHasResized() const override; double averageDeltaTime() const override; - double deltaTime() const override; + double deltaTime() const override; glm::vec2 mousePosition() const override; uint32_t mouseButtons(int maxNumber) const override; glm::ivec2 currentWindowSize() const override; diff --git a/include/openspace/interaction/controller.h b/include/openspace/interaction/controller.h index 636b810ebe..3afb45b8df 100644 --- a/include/openspace/interaction/controller.h +++ b/include/openspace/interaction/controller.h @@ -50,4 +50,4 @@ protected: } // namespace interaction } // namespace openspace -#endif // __CONTROLLER_H__ \ No newline at end of file +#endif // __CONTROLLER_H__ diff --git a/include/openspace/interaction/deviceidentifier.h b/include/openspace/interaction/deviceidentifier.h index 0497699149..e021fac9aa 100644 --- a/include/openspace/interaction/deviceidentifier.h +++ b/include/openspace/interaction/deviceidentifier.h @@ -52,4 +52,4 @@ private: } // namespace openspace -#endif \ No newline at end of file +#endif diff --git a/include/openspace/interaction/externalcontrol/externalcontrol.h b/include/openspace/interaction/externalcontrol/externalcontrol.h index 986749135b..10dad0815e 100644 --- a/include/openspace/interaction/externalcontrol/externalcontrol.h +++ b/include/openspace/interaction/externalcontrol/externalcontrol.h @@ -26,4 +26,4 @@ protected: } // namespace openspace -#endif \ No newline at end of file +#endif diff --git a/include/openspace/network/messagestructures.h b/include/openspace/network/messagestructures.h index 16f3a8fd8b..e2e3adc313 100644 --- a/include/openspace/network/messagestructures.h +++ b/include/openspace/network/messagestructures.h @@ -162,4 +162,4 @@ namespace openspace{ } // namespace openspace -#endif // __MESSAGESTRUCTURES_H__ \ No newline at end of file +#endif // __MESSAGESTRUCTURES_H__ diff --git a/include/openspace/network/networkengine.h b/include/openspace/network/networkengine.h index a2e8f6fdb3..9a4febd7aa 100644 --- a/include/openspace/network/networkengine.h +++ b/include/openspace/network/networkengine.h @@ -75,4 +75,4 @@ private: } // namespace openspace -#endif // __NETWORKENGINE_H__ \ No newline at end of file +#endif // __NETWORKENGINE_H__ diff --git a/include/openspace/network/parallelconnection.h b/include/openspace/network/parallelconnection.h index d47c157eb3..9073d1f18b 100644 --- a/include/openspace/network/parallelconnection.h +++ b/include/openspace/network/parallelconnection.h @@ -205,4 +205,4 @@ namespace openspace{ } // namespace openspace -#endif // __OSPARALLELCONNECTION_H__ \ No newline at end of file +#endif // __OSPARALLELCONNECTION_H__ diff --git a/include/openspace/properties/optionproperty.h b/include/openspace/properties/optionproperty.h index 50fea9aaeb..42bca29af6 100644 --- a/include/openspace/properties/optionproperty.h +++ b/include/openspace/properties/optionproperty.h @@ -125,4 +125,4 @@ private: } // namespace properties } // namespace openspace -#endif // __STRINGPROPERTY_H__ \ No newline at end of file +#endif // __STRINGPROPERTY_H__ diff --git a/include/openspace/properties/selectionproperty.h b/include/openspace/properties/selectionproperty.h index dc482badfe..b86aea9870 100644 --- a/include/openspace/properties/selectionproperty.h +++ b/include/openspace/properties/selectionproperty.h @@ -79,4 +79,4 @@ bool PropertyDelegate>>::toString(std::string& } // namespace properties } // namespace openspace -#endif // __SELECTIONPROPERTY_H__ \ No newline at end of file +#endif // __SELECTIONPROPERTY_H__ diff --git a/include/openspace/properties/stringproperty.h b/include/openspace/properties/stringproperty.h index 3b06601b13..eb01a2dc07 100644 --- a/include/openspace/properties/stringproperty.h +++ b/include/openspace/properties/stringproperty.h @@ -35,4 +35,4 @@ REGISTER_TEMPLATEPROPERTY_HEADER(StringProperty, std::string); } // namespace properties } // namespace openspace -#endif // __STRINGPROPERTY_H__ \ No newline at end of file +#endif // __STRINGPROPERTY_H__ diff --git a/include/openspace/query/query.h b/include/openspace/query/query.h index a48c55aed3..98d2844f68 100644 --- a/include/openspace/query/query.h +++ b/include/openspace/query/query.h @@ -48,4 +48,4 @@ std::vector allProperties(); } // namespace -#endif // __QUERY_H__ \ No newline at end of file +#endif // __QUERY_H__ diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h index d33d3ede7f..51c851a7c9 100644 --- a/include/openspace/rendering/renderengine.h +++ b/include/openspace/rendering/renderengine.h @@ -68,15 +68,15 @@ public: Post }; - enum class FrametimeType { - DtTimeAvg = 0, - FPS, - FPSAvg - }; + enum class FrametimeType { + DtTimeAvg = 0, + FPS, + FPSAvg + }; static const std::string KeyFontMono; static const std::string KeyFontLight; - static const std::vector FrametimeTypes; + static const std::vector FrametimeTypes; RenderEngine(); ~RenderEngine(); @@ -104,7 +104,7 @@ public: void takeScreenshot(); void toggleInfoText(bool b); - void toggleFrametimeType(int t); + void toggleFrametimeType(int t); // Performance measurements void setPerformanceMeasurements(bool performanceMeasurements); diff --git a/include/openspace/util/camera.h b/include/openspace/util/camera.h index 4132dde173..8fce241dfc 100644 --- a/include/openspace/util/camera.h +++ b/include/openspace/util/camera.h @@ -214,4 +214,4 @@ namespace openspace { }; } // namespace openspace -#endif // __CAMERA_H__ \ No newline at end of file +#endif // __CAMERA_H__ diff --git a/include/openspace/util/syncbuffer.h b/include/openspace/util/syncbuffer.h index db60750fee..6a63b41a9a 100644 --- a/include/openspace/util/syncbuffer.h +++ b/include/openspace/util/syncbuffer.h @@ -116,4 +116,4 @@ private: } // namespace openspace -#endif // SYNCBUFFER_H \ No newline at end of file +#endif // SYNCBUFFER_H diff --git a/modules/base/rendering/renderableplanet.h b/modules/base/rendering/renderableplanet.h index 089c8b1ab2..b698613ff0 100644 --- a/modules/base/rendering/renderableplanet.h +++ b/modules/base/rendering/renderableplanet.h @@ -216,4 +216,4 @@ private: } // namespace openspace -#endif // __RENDERABLEPLANET_H__ \ No newline at end of file +#endif // __RENDERABLEPLANET_H__ diff --git a/modules/base/rendering/screenspaceimage.cpp b/modules/base/rendering/screenspaceimage.cpp index b0106d129a..fa208ee104 100644 --- a/modules/base/rendering/screenspaceimage.cpp +++ b/modules/base/rendering/screenspaceimage.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/modules/base/shaders/screenspace_fs.glsl b/modules/base/shaders/screenspace_fs.glsl index bd72b4a47f..9ab37b56af 100644 --- a/modules/base/shaders/screenspace_fs.glsl +++ b/modules/base/shaders/screenspace_fs.glsl @@ -32,9 +32,7 @@ in vec4 vs_position; #include "fragment.glsl" #include "PowerScaling/powerScaling_fs.hglsl" - - -Fragment getFragment(){ +Fragment getFragment() { Fragment frag; // power scale coordinates for depth. w value is set to 1.0. @@ -44,6 +42,7 @@ Fragment getFragment(){ if(frag.color.a == 0.0f){ discard; } + frag.depth = denormalizeFloat(depth); return frag; diff --git a/modules/base/shaders/screenspace_vs.glsl b/modules/base/shaders/screenspace_vs.glsl index f29f63a06a..02849b3537 100644 --- a/modules/base/shaders/screenspace_vs.glsl +++ b/modules/base/shaders/screenspace_vs.glsl @@ -36,6 +36,6 @@ out vec4 vs_position; void main(){ vs_st = in_st; - vs_position = ViewProjectionMatrix*ModelTransform*in_position; + vs_position = ViewProjectionMatrix * ModelTransform * in_position; gl_Position = vec4(vs_position); -} \ No newline at end of file +} diff --git a/modules/globebrowsing/chunk/chunkrenderer.h b/modules/globebrowsing/chunk/chunkrenderer.h index aaf53e8485..7649c38146 100644 --- a/modules/globebrowsing/chunk/chunkrenderer.h +++ b/modules/globebrowsing/chunk/chunkrenderer.h @@ -42,6 +42,7 @@ #include +#include namespace ghoul { diff --git a/modules/globebrowsing/geometry/aabb.h b/modules/globebrowsing/geometry/aabb.h index ac02a3b39b..d153c5bd7e 100644 --- a/modules/globebrowsing/geometry/aabb.h +++ b/modules/globebrowsing/geometry/aabb.h @@ -96,4 +96,4 @@ namespace openspace { } // namespace openspace -#endif // __AABB_H__ \ No newline at end of file +#endif // __AABB_H__ diff --git a/modules/globebrowsing/meshes/grid.h b/modules/globebrowsing/meshes/grid.h index b78eddbd73..ef9493f0e6 100644 --- a/modules/globebrowsing/meshes/grid.h +++ b/modules/globebrowsing/meshes/grid.h @@ -71,4 +71,4 @@ protected: const int _ySegments; }; } // namespace openspace -#endif // __GRIDGEOMETRY_H__ \ No newline at end of file +#endif // __GRIDGEOMETRY_H__ diff --git a/modules/globebrowsing/meshes/trianglesoup.cpp b/modules/globebrowsing/meshes/trianglesoup.cpp index d064a1ad2f..b37e9c058c 100644 --- a/modules/globebrowsing/meshes/trianglesoup.cpp +++ b/modules/globebrowsing/meshes/trianglesoup.cpp @@ -175,4 +175,4 @@ void TriangleSoup::drawUsingActiveProgram() { glBindVertexArray(0); } -} // namespace openspace \ No newline at end of file +} // namespace openspace diff --git a/modules/globebrowsing/meshes/trianglesoup.h b/modules/globebrowsing/meshes/trianglesoup.h index 23b3e6d04f..92142bd7a5 100644 --- a/modules/globebrowsing/meshes/trianglesoup.h +++ b/modules/globebrowsing/meshes/trianglesoup.h @@ -100,4 +100,4 @@ private: } // namespace openspace -#endif // __TRIANGLESOUP_H__ \ No newline at end of file +#endif // __TRIANGLESOUP_H__ diff --git a/modules/iswa/rendering/textureplane.cpp b/modules/iswa/rendering/textureplane.cpp index 6276fb9900..2f032f1062 100644 --- a/modules/iswa/rendering/textureplane.cpp +++ b/modules/iswa/rendering/textureplane.cpp @@ -21,9 +21,11 @@ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ + #include #include #include +#include namespace { const std::string _loggerCat = "TexturePlane"; diff --git a/modules/iswa/util/dataprocessor.h b/modules/iswa/util/dataprocessor.h index 75ecd78da0..767c75d80b 100644 --- a/modules/iswa/util/dataprocessor.h +++ b/modules/iswa/util/dataprocessor.h @@ -76,4 +76,5 @@ protected: }; } // namespace openspace -#endif //__DATAPROCESSOR_H__ \ No newline at end of file + +#endif //__DATAPROCESSOR_H__ diff --git a/modules/newhorizons/util/hongkangparser.h b/modules/newhorizons/util/hongkangparser.h index 1a739cd4b6..ef1db0023d 100644 --- a/modules/newhorizons/util/hongkangparser.h +++ b/modules/newhorizons/util/hongkangparser.h @@ -75,4 +75,4 @@ private: }; } -#endif //__HONGKANGPARSER_H__ \ No newline at end of file +#endif //__HONGKANGPARSER_H__ diff --git a/modules/newhorizons/util/instrumentdecoder.cpp b/modules/newhorizons/util/instrumentdecoder.cpp index f945e31e4c..b575f0cf32 100644 --- a/modules/newhorizons/util/instrumentdecoder.cpp +++ b/modules/newhorizons/util/instrumentdecoder.cpp @@ -73,4 +73,4 @@ std::vector InstrumentDecoder::getTranslation(){ return _spiceIDs; } -} // namespace openspace \ No newline at end of file +} // namespace openspace diff --git a/modules/newhorizons/util/labelparser.h b/modules/newhorizons/util/labelparser.h index 65fe473c01..c0cf393ce6 100644 --- a/modules/newhorizons/util/labelparser.h +++ b/modules/newhorizons/util/labelparser.h @@ -75,4 +75,4 @@ private: bool _badDecoding; }; } -#endif //__LABELPARSER_H__ \ No newline at end of file +#endif //__LABELPARSER_H__ diff --git a/modules/newhorizons/util/scannerdecoder.cpp b/modules/newhorizons/util/scannerdecoder.cpp index fdb836c620..aae509a0a9 100644 --- a/modules/newhorizons/util/scannerdecoder.cpp +++ b/modules/newhorizons/util/scannerdecoder.cpp @@ -50,4 +50,4 @@ void ScannerDecoder::setStopCommand(std::string stopCommand){ _abort = stopCommand; } -} // namespace openspace \ No newline at end of file +} // namespace openspace diff --git a/modules/newhorizons/util/targetdecoder.cpp b/modules/newhorizons/util/targetdecoder.cpp index 05f1253699..d0b48033ed 100644 --- a/modules/newhorizons/util/targetdecoder.cpp +++ b/modules/newhorizons/util/targetdecoder.cpp @@ -48,4 +48,4 @@ std::vector TargetDecoder::getTranslation(){ return _names; } -} // namespace openspace \ No newline at end of file +} // namespace openspace diff --git a/src/engine/wrapper/sgctwindowwrapper.cpp b/src/engine/wrapper/sgctwindowwrapper.cpp index 34499a8cd5..abe92d0ebe 100644 --- a/src/engine/wrapper/sgctwindowwrapper.cpp +++ b/src/engine/wrapper/sgctwindowwrapper.cpp @@ -63,7 +63,7 @@ double SGCTWindowWrapper::averageDeltaTime() const { } double SGCTWindowWrapper::deltaTime() const { - return sgct::Engine::instance()->getDt(); + return sgct::Engine::instance()->getDt(); } glm::vec2 SGCTWindowWrapper::mousePosition() const { diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 06b4d17eb5..dd97728c9c 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -107,9 +107,9 @@ namespace openspace { const std::string RenderEngine::KeyFontMono = "Mono"; const std::string RenderEngine::KeyFontLight = "Light"; const std::vector RenderEngine::FrametimeTypes({ - RenderEngine::FrametimeType::DtTimeAvg, - RenderEngine::FrametimeType::FPS, - RenderEngine::FrametimeType::FPSAvg + RenderEngine::FrametimeType::DtTimeAvg, + RenderEngine::FrametimeType::FPS, + RenderEngine::FrametimeType::FPSAvg }); RenderEngine::RenderEngine() @@ -734,12 +734,12 @@ scripting::LuaLibrary RenderEngine::luaLibrary() { "bool", "Toggles the showing of render information on-screen text" }, - { - "toggleFrametimeType", - &luascriptfunctions::toggleFrametimeType, - "int", - "Toggle showing FPS or Average Frametime in heads up info" - }, + { + "toggleFrametimeType", + &luascriptfunctions::toggleFrametimeType, + "int", + "Toggle showing FPS or Average Frametime in heads up info" + }, { "setPerformanceMeasurement", &luascriptfunctions::setPerformanceMeasurement, diff --git a/src/scene/ephemeris.cpp b/src/scene/ephemeris.cpp index 77ea663dba..f7088b3234 100644 --- a/src/scene/ephemeris.cpp +++ b/src/scene/ephemeris.cpp @@ -64,4 +64,4 @@ bool Ephemeris::initialize() { void Ephemeris::update(const UpdateData& data) {} -} // namespace openspace \ No newline at end of file +} // namespace openspace diff --git a/src/util/progressbar.cpp b/src/util/progressbar.cpp index 0b667d713c..d38dd33c82 100644 --- a/src/util/progressbar.cpp +++ b/src/util/progressbar.cpp @@ -55,4 +55,4 @@ void ProgressBar::print(int current) { _previous = iprogress; }; -} // namespace openspace \ No newline at end of file +} // namespace openspace diff --git a/src/util/screenlog.cpp b/src/util/screenlog.cpp index 18d0e7e5de..6299b87a7b 100644 --- a/src/util/screenlog.cpp +++ b/src/util/screenlog.cpp @@ -65,4 +65,4 @@ const std::vector& ScreenLog::entries() const { return _entries; } -} // namespace openspace \ No newline at end of file +} // namespace openspace diff --git a/support/cmake/support_macros.cmake b/support/cmake/support_macros.cmake index 4bb9480342..eb126467b7 100644 --- a/support/cmake/support_macros.cmake +++ b/support/cmake/support_macros.cmake @@ -68,7 +68,12 @@ function (set_compile_settings project) set_property(TARGET ${project} PROPERTY CXX_STANDARD_REQUIRED On) if (MSVC) - target_compile_options(${project} PUBLIC "/MP" "/ZI" "/wd4201" "/wd4127") + target_compile_options(${project} PUBLIC + "/MP" # Multi-threading support + "/ZI" # Edit and continue support + "/wd4201" # Disable nameless struct warning + "/wd4127" # Disable conditional expression is constant warning + ) if (OPENSPACE_WARNINGS_AS_ERRORS) target_compile_options(${project} PUBLIC "/WX") endif ()