Feature/globals handling (#1352)

* Cleaner handling of global state
* Prevent Lua memory corruption (closes #982)
* Initialize glfw first thing to prevent weird joystick loading bug during startup
This commit is contained in:
Alexander Bock
2020-10-21 22:30:05 +02:00
committed by GitHub
parent 1525a0490d
commit efffc25ce0
164 changed files with 1484 additions and 1390 deletions

View File

@@ -428,14 +428,14 @@ void RenderableMultiresVolume::initializeGL() {
);
_raycaster->initialize();
global::raycasterManager.attachRaycaster(*_raycaster);
global::raycasterManager->attachRaycaster(*_raycaster);
auto onChange = [&](bool enabled) {
if (enabled) {
global::raycasterManager.attachRaycaster(*_raycaster);
global::raycasterManager->attachRaycaster(*_raycaster);
}
else {
global::raycasterManager.detachRaycaster(*_raycaster);
global::raycasterManager->detachRaycaster(*_raycaster);
}
};