Here is my solution. First, make sure that you are able to span multiple displays with a single window. Since OSX Maverics each display is considered a separate “space” and you can have one app window on one screen, no spanning. This can be disabled.
Make sure that your additional displays are placed to the right from your main display. Use the following code in main.cpp to create a window without the title-bar.
This will span your window across two FullHD screens. If you have more screens connected and want the app window away from the main window, use the following code in ofApp::setup() to adjust positioning.
int screenWidth = ofGetScreenWidth();
int screenHeight = ofGetScreenHeight();
int monitorCount;
GLFWmonitor** monitors = glfwGetMonitors(&monitorCount);
if(monitorCount >= 3 || (screenWidth != 1920 || screenHeight != 1080)){
int monitorCountUsedByWindow = monitorCount - 1; // All monitors, except the main one.
int windowWidth = monitorCountUsedByWindow * 1920;
int windowHeight = 1080;
ofSetWindowPosition(screenWidth, 0);
ofSetWindowShape(windowWidth, windowHeight);
}
This will work if you have two or more FullHD monitors connected. If there is only one monitor connected, make sure that your main monitor has different resolution. But this is only one possible scenario. You can change it depending on your context.