mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-05 10:59:47 -05:00
Various small fixes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user