Various small fixes

This commit is contained in:
Alexander Bock
2018-11-06 15:04:19 -05:00
parent 7c0268e87c
commit f8c27629f5
23 changed files with 174 additions and 246 deletions
+3 -15
View File
@@ -25,14 +25,6 @@
#include <modules/cefwebgui/include/guikeyboardhandler.h>
#include <openspace/engine/globalscallbacks.h>
#include <ghoul/filesystem/filesystem.h>
#include <ghoul/logging/logmanager.h>
#include <ghoul/opengl/programobject.h>
#include <ghoul/opengl/textureunit.h>
namespace {
constexpr const char* _loggerCat = "WebGUI:KeyboardHandler";
} // namespace
namespace openspace {
@@ -41,13 +33,9 @@ GUIKeyboardHandler::GUIKeyboardHandler() {
global::callback::keyboard.push_back(
[&](Key key, KeyModifier mod, KeyAction action) -> bool {
if (_keyConsumed) {
_keyConsumed = false;
return true;
}
else {
return false;
}
const bool previous = _keyConsumed;
_keyConsumed = false;
return previous;
}
);
}
+1 -9
View File
@@ -37,14 +37,6 @@ namespace {
namespace openspace {
GUIRenderHandler::GUIRenderHandler() {
initializeGL();
}
GUIRenderHandler::~GUIRenderHandler() {
deinitializeGL();
}
void GUIRenderHandler::initializeGL() {
LDEBUG("Initializing CEF GL environment...");
_programObject = ghoul::opengl::ProgramObject::Build(
"WebGUICEFProgram",
@@ -70,7 +62,7 @@ void GUIRenderHandler::initializeGL() {
LDEBUG("Initializing CEF GL environment... done!");
}
void GUIRenderHandler::deinitializeGL() {
GUIRenderHandler::~GUIRenderHandler() {
_programObject = nullptr;
glDeleteVertexArrays(1, &_vao);