Feature/CMake (#1443)

General CMake cleanup/overhaul
* Enable precompiled headers for all projects
* Move specifications itto separate CMakeLists files
  * Add openspace-core as a subdirectory
  * Move handle_modules functionality into modules/CMakeLists.txt
  * Move handleapplications logic into apps/CMakeLists.txt
* Introduce openspace-module-collection interface library to simplify inclusion of modules in applications
* Turn module initialization into a two-step process to adapt to the new minimal dependency scenario
* Compile time speedup
  * Remove circular dependencies between modules and core preventing multithreaded compilation on MSVC
  * Build Spice multithreaded and as static library
  * Remove dependency from core to module-webbrowser
  * Remove unused dependency from kameleon
  * Remove additional unnecessary dependencies
  * Cleanup volume/kameleon/kameleonvolume modules
  * Fix visibility issues. Restrict include paths
  * Compile kameleon in parallel
* Other cleanup
  * Only copy CEF files from one target (hard-coded to OpenSpace right now)
  * Remove unused instrumentation code
  * Remove the ability to render AABB for globes as it caused a circular dependency between GlobeBrowsing and Debugging
  * Removing compiler and cppcheck warnings
  * Turn almost all includes into non-system includes
  * Don't warn on deprecrated copy
* Updated submodules
This commit is contained in:
Alexander Bock
2020-12-28 18:26:57 +01:00
committed by GitHub
parent feb3078641
commit ad8af3ffeb
181 changed files with 2250 additions and 2540 deletions

View File

@@ -103,37 +103,6 @@ namespace {
GL_COLOR_ATTACHMENT2,
GL_COLOR_ATTACHMENT3
};
void saveTextureToMemory(GLenum attachment, int width, int height,
std::vector<double>& memory)
{
memory.clear();
memory.resize(width * height * 3);
std::vector<float> tempMemory(width * height * 3);
if (attachment != GL_DEPTH_ATTACHMENT) {
glReadBuffer(attachment);
glReadPixels(0, 0, width, height, GL_RGB, GL_FLOAT, tempMemory.data());
}
else {
glReadPixels(
0,
0,
width,
height,
GL_DEPTH_COMPONENT,
GL_FLOAT,
tempMemory.data()
);
}
for (int i = 0; i < width * height * 3; ++i) {
memory[i] = static_cast<double>(tempMemory[i]);
}
}
} // namespace
namespace openspace {
@@ -1426,13 +1395,8 @@ void FramebufferRenderer::performDeferredTasks(
Deferredcaster* deferredcaster = deferredcasterTask.deferredcaster;
ghoul::opengl::ProgramObject* deferredcastProgram = nullptr;
if (deferredcastProgram != _deferredcastPrograms[deferredcaster].get()
|| deferredcastProgram == nullptr)
{
deferredcastProgram = _deferredcastPrograms[deferredcaster].get();
}
ghoul::opengl::ProgramObject* deferredcastProgram =
_deferredcastPrograms[deferredcaster].get();
if (deferredcastProgram) {
_pingPongIndex = _pingPongIndex == 0 ? 1 : 0;