Cleaning up window delegate

This commit is contained in:
Alexander Bock
2020-05-10 15:17:51 +02:00
parent 1b60ab1038
commit 3b427bfd15
9 changed files with 27 additions and 144 deletions

View File

@@ -420,11 +420,6 @@ void OpenSpaceEngine::initializeGL() {
rendering::helper::initialize();
// clear the screen so the user doesn't have to see old buffer contents left on the
// graphics card
LDEBUG("Clearing all Windows");
global::windowDelegate.clearAllWindows(glm::vec4(0.f, 0.f, 0.f, 1.f));
LDEBUG("Adding system components");
// Detect and log OpenCL and OpenGL versions and available devices
SysCap.addComponent(
@@ -1378,10 +1373,7 @@ void OpenSpaceEngine::mouseButtonCallback(MouseButton button,
// Check if the user clicked on one of the 'buttons' the RenderEngine is drawing
if (action == MouseAction::Press) {
bool isConsumed = global::renderEngine.mouseActivationCallback(
global::windowDelegate.mousePosition()
);
bool isConsumed = global::renderEngine.mouseActivationCallback(_mousePosition);
if (isConsumed) {
return;
}
@@ -1401,6 +1393,8 @@ void OpenSpaceEngine::mousePositionCallback(double x, double y) {
global::navigationHandler.mousePositionCallback(x, y);
global::interactionMonitor.markInteraction();
_mousePosition = glm::vec2(static_cast<float>(x), static_cast<float>(y));
}
void OpenSpaceEngine::mouseScrollWheelCallback(double posX, double posY) {
@@ -1547,15 +1541,6 @@ scripting::LuaLibrary OpenSpaceEngine::luaLibrary() {
"Returns whether the current OpenSpace instance is the master node of a "
"cluster configuration. If this instance is not part of a cluster, this "
"function also returns 'true'."
},
{
"clusterId",
&luascriptfunctions::clusterId,
{},
"",
"Returns the zero-based identifier for this OpenSpace instance in a "
"cluster configuration. If this instance is not part of a cluster, this "
"identifier is always 0."
}
},
{