diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 404193aa3a..0ce7698afe 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -21,9 +21,6 @@ #include #include -// include this before QGLWidget, which includes an earlier version of OpenGL -#include "InterfaceConfig.h" - #include #include #include diff --git a/interface/src/ui/ApplicationCompositor.cpp b/interface/src/ui/ApplicationCompositor.cpp index cd28ca0732..dad626ae44 100644 --- a/interface/src/ui/ApplicationCompositor.cpp +++ b/interface/src/ui/ApplicationCompositor.cpp @@ -9,8 +9,6 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include "InterfaceConfig.h" - #include "ApplicationCompositor.h" #include diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index 1ab1210881..ed2c68aba5 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -9,8 +9,6 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include "InterfaceConfig.h" - #include #include diff --git a/interface/src/ui/AudioStatsDialog.cpp b/interface/src/ui/AudioStatsDialog.cpp index 1d6d84a15b..116cc60b5e 100644 --- a/interface/src/ui/AudioStatsDialog.cpp +++ b/interface/src/ui/AudioStatsDialog.cpp @@ -9,9 +9,9 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include +#include "AudioStatsDialog.h" -#include "InterfaceConfig.h" +#include #include #include @@ -22,7 +22,6 @@ #include -#include "AudioStatsDialog.h" const unsigned COLOR0 = 0x33cc99ff; const unsigned COLOR1 = 0xffef40c0; diff --git a/interface/src/ui/LogDialog.cpp b/interface/src/ui/LogDialog.cpp index 0d2d0d11f6..c9a303461f 100644 --- a/interface/src/ui/LogDialog.cpp +++ b/interface/src/ui/LogDialog.cpp @@ -9,8 +9,6 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include "InterfaceConfig.h" - #if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdouble-promotion" diff --git a/interface/src/ui/overlays/Base3DOverlay.cpp b/interface/src/ui/overlays/Base3DOverlay.cpp index 108f092465..e1252836d7 100644 --- a/interface/src/ui/overlays/Base3DOverlay.cpp +++ b/interface/src/ui/overlays/Base3DOverlay.cpp @@ -8,10 +8,14 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // + +#include "Base3DOverlay.h" + +#include + +#include #include -#include "Application.h" -#include "Base3DOverlay.h" const float DEFAULT_LINE_WIDTH = 1.0f; const bool DEFAULT_IS_SOLID = false; diff --git a/interface/src/ui/overlays/Cube3DOverlay.cpp b/interface/src/ui/overlays/Cube3DOverlay.cpp index 7f6fd5f971..961d7f765b 100644 --- a/interface/src/ui/overlays/Cube3DOverlay.cpp +++ b/interface/src/ui/overlays/Cube3DOverlay.cpp @@ -9,14 +9,15 @@ // // include this before QGLWidget, which includes an earlier version of OpenGL -#include "InterfaceConfig.h" +#include "Cube3DOverlay.h" + +#include #include #include #include - -#include "Application.h" -#include "Cube3DOverlay.h" +#include +#include Cube3DOverlay::Cube3DOverlay(const Cube3DOverlay* cube3DOverlay) : Volume3DOverlay(cube3DOverlay) diff --git a/interface/src/ui/overlays/Grid3DOverlay.cpp b/interface/src/ui/overlays/Grid3DOverlay.cpp index ad64c6091b..956eae35ff 100644 --- a/interface/src/ui/overlays/Grid3DOverlay.cpp +++ b/interface/src/ui/overlays/Grid3DOverlay.cpp @@ -11,8 +11,12 @@ #include "Grid3DOverlay.h" +#include + +#include +#include #include -#include "Application.h" +#include Grid3DOverlay::Grid3DOverlay() : _minorGridWidth(1.0), diff --git a/interface/src/ui/overlays/ImageOverlay.cpp b/interface/src/ui/overlays/ImageOverlay.cpp index 73a3f7e39c..cad9010531 100644 --- a/interface/src/ui/overlays/ImageOverlay.cpp +++ b/interface/src/ui/overlays/ImageOverlay.cpp @@ -12,13 +12,10 @@ #include #include +#include +#include #include -#include "qapplication.h" - -#include "gpu/Context.h" -#include "gpu/StandardShaderLib.h" - ImageOverlay::ImageOverlay() : _imageURL(), _renderImage(false), diff --git a/interface/src/ui/overlays/Line3DOverlay.cpp b/interface/src/ui/overlays/Line3DOverlay.cpp index 4e2763d260..d026e5f56e 100644 --- a/interface/src/ui/overlays/Line3DOverlay.cpp +++ b/interface/src/ui/overlays/Line3DOverlay.cpp @@ -8,15 +8,11 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -// include this before QGLWidget, which includes an earlier version of OpenGL -#include "InterfaceConfig.h" +#include "Line3DOverlay.h" #include #include -#include "Line3DOverlay.h" - - Line3DOverlay::Line3DOverlay() : _geometryCacheID(DependencyManager::get()->allocateID()) { diff --git a/interface/src/ui/overlays/LocalModelsOverlay.cpp b/interface/src/ui/overlays/LocalModelsOverlay.cpp index 06b27f8f22..9a2733c739 100644 --- a/interface/src/ui/overlays/LocalModelsOverlay.cpp +++ b/interface/src/ui/overlays/LocalModelsOverlay.cpp @@ -9,10 +9,11 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include "Application.h" - #include "LocalModelsOverlay.h" +#include +#include + LocalModelsOverlay::LocalModelsOverlay(EntityTreeRenderer* entityTreeRenderer) : Volume3DOverlay(), _entityTreeRenderer(entityTreeRenderer) { @@ -33,13 +34,11 @@ void LocalModelsOverlay::render(RenderArgs* args) { float glowLevel = getGlowLevel(); // FIXME, glowing removed for now auto batch = args ->_batch; - Application* app = Application::getInstance(); - glm::vec3 oldTranslation = app->getViewMatrixTranslation(); Transform transform = Transform(); - transform.setTranslation(oldTranslation + getPosition()); + transform.setTranslation(args->_viewFrustum->getPosition() + getPosition()); batch->setViewTransform(transform); _entityTreeRenderer->render(args); - transform.setTranslation(oldTranslation); + transform.setTranslation(args->_viewFrustum->getPosition()); batch->setViewTransform(transform); } } diff --git a/interface/src/ui/overlays/ModelOverlay.cpp b/interface/src/ui/overlays/ModelOverlay.cpp index 5a399aef76..ed15e57d43 100644 --- a/interface/src/ui/overlays/ModelOverlay.cpp +++ b/interface/src/ui/overlays/ModelOverlay.cpp @@ -11,7 +11,7 @@ #include "ModelOverlay.h" -#include +#include "Application.h" ModelOverlay::ModelOverlay() : _model(), diff --git a/interface/src/ui/overlays/Overlays.cpp b/interface/src/ui/overlays/Overlays.cpp index 63b87a30ae..6f28cf8352 100644 --- a/interface/src/ui/overlays/Overlays.cpp +++ b/interface/src/ui/overlays/Overlays.cpp @@ -14,10 +14,11 @@ #include -#include #include #include +#include +#include "Application.h" #include "BillboardOverlay.h" #include "Circle3DOverlay.h" #include "Cube3DOverlay.h" diff --git a/interface/src/ui/overlays/Rectangle3DOverlay.cpp b/interface/src/ui/overlays/Rectangle3DOverlay.cpp index 0ab9174da8..1d5183b833 100644 --- a/interface/src/ui/overlays/Rectangle3DOverlay.cpp +++ b/interface/src/ui/overlays/Rectangle3DOverlay.cpp @@ -8,9 +8,6 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -// include this before QGLWidget, which includes an earlier version of OpenGL -#include "InterfaceConfig.h" - #include "Rectangle3DOverlay.h" #include diff --git a/interface/src/ui/overlays/Sphere3DOverlay.cpp b/interface/src/ui/overlays/Sphere3DOverlay.cpp index 8d751c73c5..307b60b2ce 100644 --- a/interface/src/ui/overlays/Sphere3DOverlay.cpp +++ b/interface/src/ui/overlays/Sphere3DOverlay.cpp @@ -8,14 +8,12 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -// include this before QGLWidget, which includes an earlier version of OpenGL -#include "InterfaceConfig.h" - -#include - #include "Sphere3DOverlay.h" -#include "Application.h" +#include +#include +#include +#include Sphere3DOverlay::Sphere3DOverlay(const Sphere3DOverlay* Sphere3DOverlay) : Volume3DOverlay(Sphere3DOverlay) diff --git a/interface/src/ui/overlays/Text3DOverlay.cpp b/interface/src/ui/overlays/Text3DOverlay.cpp index 17dc8d03a8..737b2d0bc5 100644 --- a/interface/src/ui/overlays/Text3DOverlay.cpp +++ b/interface/src/ui/overlays/Text3DOverlay.cpp @@ -8,9 +8,6 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -// include this before QGLWidget, which includes an earlier version of OpenGL -#include "InterfaceConfig.h" - #include "Text3DOverlay.h" #include diff --git a/interface/src/ui/overlays/TextOverlay.cpp b/interface/src/ui/overlays/TextOverlay.cpp index 597a630e3c..467014427d 100644 --- a/interface/src/ui/overlays/TextOverlay.cpp +++ b/interface/src/ui/overlays/TextOverlay.cpp @@ -8,21 +8,22 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -// include this before QGLWidget, which includes an earlier version of OpenGL -#include "InterfaceConfig.h" -#include "Application.h" #include "TextOverlay.h" -#include "OffscreenUi.h" -#include "text/FontFamilies.h" -#include + +#include + #include #include -#include #include +#include +#include #include #include +#include #include -#include + +#include "Application.h" +#include "text/FontFamilies.h" #define TEXT_OVERLAY_PROPERTY(type, name, initialValue) \ Q_PROPERTY(type name READ name WRITE set##name NOTIFY name##Changed) \