mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -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,8 +25,9 @@
|
||||
#include <modules/webbrowser/webbrowsermodule.h>
|
||||
|
||||
#include <modules/webbrowser/include/browserinstance.h>
|
||||
#include <modules/webbrowser/include/screenspacebrowser.h>
|
||||
#include <modules/webbrowser/include/cefhost.h>
|
||||
#include <modules/webbrowser/include/eventhandler.h>
|
||||
#include <modules/webbrowser/include/screenspacebrowser.h>
|
||||
#include <openspace/engine/globals.h>
|
||||
#include <openspace/engine/globalscallbacks.h>
|
||||
#include <openspace/engine/windowdelegate.h>
|
||||
@@ -72,6 +73,7 @@ WebBrowserModule::WebBrowserModule()
|
||||
: OpenSpaceModule(WebBrowserModule::Name)
|
||||
, _updateBrowserBetweenRenderables(UpdateBrowserBetweenRenderablesInfo, true)
|
||||
, _browserUpdateInterval(BrowserUpdateIntervalInfo, 1.f, 1.0f, 1000.f)
|
||||
, _eventHandler(new EventHandler)
|
||||
{
|
||||
global::callback::deinitialize->emplace_back([this]() {
|
||||
ZoneScopedN("WebBrowserModule")
|
||||
@@ -105,7 +107,7 @@ void WebBrowserModule::internalDeinitialize() {
|
||||
return;
|
||||
}
|
||||
|
||||
_eventHandler.resetBrowserInstance();
|
||||
_eventHandler->resetBrowserInstance();
|
||||
|
||||
bool forceBrowserShutdown = true;
|
||||
for (BrowserInstance* browser : _browsers) {
|
||||
@@ -159,7 +161,7 @@ void WebBrowserModule::internalInitialize(const ghoul::Dictionary& dictionary) {
|
||||
);
|
||||
}
|
||||
|
||||
_eventHandler.initialize();
|
||||
_eventHandler->initialize();
|
||||
|
||||
// register ScreenSpaceBrowser
|
||||
auto fScreenSpaceRenderable = FactoryManager::ref().factory<ScreenSpaceRenderable>();
|
||||
@@ -199,17 +201,13 @@ void WebBrowserModule::removeBrowser(BrowserInstance* browser) {
|
||||
|
||||
void WebBrowserModule::attachEventHandler(BrowserInstance* browserInstance) {
|
||||
if (_enabled) {
|
||||
_eventHandler.setBrowserInstance(browserInstance);
|
||||
_eventHandler->setBrowserInstance(browserInstance);
|
||||
}
|
||||
}
|
||||
|
||||
EventHandler WebBrowserModule::eventHandler() {
|
||||
return _eventHandler;
|
||||
}
|
||||
|
||||
void WebBrowserModule::detachEventHandler() {
|
||||
if (_enabled) {
|
||||
_eventHandler.setBrowserInstance(nullptr);
|
||||
_eventHandler->setBrowserInstance(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user