Multi Window support in Rendering Manager and Display View

Important reshape of Rendering Manager to support creation of multiple output windows. The Display View is now designed to allow creating and manipulating output windows. Settings are incompatible with previous version.
This commit is contained in:
Bruno Herbelin
2023-02-26 23:04:38 +01:00
parent b11f6d5b3b
commit c3bb29182e
10 changed files with 961 additions and 684 deletions

View File

@@ -24,6 +24,7 @@
#include <iomanip>
#include <regex>
#include <GLFW/glfw3.h>
#include "osc/OscOutboundPacketStream.h"
#include "Log.h"
@@ -36,10 +37,7 @@
#include "ActionManager.h"
#include "TransitionView.h"
#include "NetworkToolkit.h"
#include "UserInterfaceManager.h"
#include "RenderingManager.h"
#include <GLFW/glfw3.h>
#include "ControlManager.h"
@@ -378,14 +376,6 @@ bool Control::init()
//
terminate();
//
// set keyboard callback
//
GLFWwindow *main = Rendering::manager().mainWindow().window();
GLFWwindow *output = Rendering::manager().outputWindow().window();
glfwSetKeyCallback( main, Control::keyboardCalback);
glfwSetKeyCallback( output, Control::keyboardCalback);
//
// load OSC Translator
//
@@ -1181,7 +1171,7 @@ void Control::sendOutputStatus(const IpEndpointName &remoteEndpoint)
}
void Control::keyboardCalback(GLFWwindow* window, int key, int, int action, int mods)
void Control::keyboardCalback(GLFWwindow* w, int key, int, int action, int mods)
{
if (UserInterface::manager().keyboardAvailable() && !mods )
{
@@ -1197,9 +1187,7 @@ void Control::keyboardCalback(GLFWwindow* window, int key, int, int action, int
}
else if (_key == GLFW_KEY_ESCAPE && action == GLFW_PRESS )
{
static GLFWwindow *output = Rendering::manager().outputWindow().window();
if (window==output)
Rendering::manager().outputWindow().exitFullscreen();
Rendering::manager().window(w)->exitFullscreen();
}
Control::manager().input_access_.unlock();
}