mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
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:
@@ -25,20 +25,20 @@
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
|
||||
|
||||
set(HEADER_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabledebugplane.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/debugrenderer.h
|
||||
rendering/renderabledebugplane.h
|
||||
rendering/debugrenderer.h
|
||||
)
|
||||
source_group("Header Files" FILES ${HEADER_FILES})
|
||||
|
||||
set(SOURCE_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabledebugplane.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/debugrenderer.cpp
|
||||
rendering/renderabledebugplane.cpp
|
||||
rendering/debugrenderer.cpp
|
||||
)
|
||||
source_group("Source Files" FILES ${SOURCE_FILES})
|
||||
|
||||
set(SHADER_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/debugshader_vs.glsl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/debugshader_fs.glsl
|
||||
rendering/debugshader_vs.glsl
|
||||
rendering/debugshader_fs.glsl
|
||||
)
|
||||
|
||||
source_group("Shader Files" FILES ${SHADER_FILES})
|
||||
|
||||
@@ -225,24 +225,4 @@ void DebugRenderer::renderCameraFrustum(const RenderData& data, const Camera& ot
|
||||
glEnable(GL_CULL_FACE);
|
||||
}
|
||||
|
||||
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
|
||||
const DebugRenderer::Vertices DebugRenderer::verticesFor(
|
||||
const globebrowsing::AABB3& screenSpaceAABB) const
|
||||
{
|
||||
Vertices vertices(8);
|
||||
for (size_t i = 0; i < 8; i++) {
|
||||
const bool cornerIsRight = i % 2 == 0;
|
||||
const bool cornerIsUp = i > 3;
|
||||
const bool cornerIsFar = (i / 2) % 2 == 1;
|
||||
|
||||
const double x = cornerIsRight ? screenSpaceAABB.max.x : screenSpaceAABB.min.x;
|
||||
const double y = cornerIsUp ? screenSpaceAABB.max.y : screenSpaceAABB.min.y;
|
||||
const double z = cornerIsFar ? screenSpaceAABB.max.z : screenSpaceAABB.min.z;
|
||||
|
||||
vertices[i] = glm::vec4(x, y, z, 1);
|
||||
}
|
||||
return vertices;
|
||||
}
|
||||
#endif // OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -27,10 +27,6 @@
|
||||
|
||||
#include <openspace/util/updatestructures.h>
|
||||
|
||||
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
|
||||
#include <modules/globebrowsing/src/basictypes.h>
|
||||
#endif // OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
|
||||
|
||||
#include <ghoul/glm.h>
|
||||
#include <ghoul/opengl/ghoul_gl.h>
|
||||
#include <memory>
|
||||
@@ -132,15 +128,6 @@ public:
|
||||
void renderCameraFrustum(const RenderData& data, const Camera& otherCamera,
|
||||
const glm::vec4& rgba = { 1.f, 1.f, 1.f, 0.3f }) const;
|
||||
|
||||
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
|
||||
/**
|
||||
* Takes a AABB3 in screen space and returns vertices representing the corner points
|
||||
* of the AABB. The ordering of the corner points is compatible with the box
|
||||
* rendering methods in this class.
|
||||
*/
|
||||
const Vertices verticesFor(const globebrowsing::AABB3& screenSpaceAABB) const;
|
||||
#endif // OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
|
||||
|
||||
protected:
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> _programObject;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user