Keep output in second monitor running in background and visible

Hi! I got to send output to second monitor following this
https://forum.openframeworks.cc/t/fullscreen-on-second-monitor/37356

and in main.cpp:
settings.windowMode = ofWindowMode::OF_GAME_MODE;

but whenever I touch anything in the first monitor and the output to the second monitor goes in the background, it stops being visible.
I would need to make it run and visible while I’m able to control parameters of other applications in the first monitor. Anyone know how I can achieve this?
Thanks a lot in advance!

Ups! I forgot to say I’m running on windows10!

Here is the complete main.cpp code that allows to send output to second screen (where insectarivm is the name I use instead of ofApp) if it could be useful to anyone.


#include "ofMain.h"
#include "ofAppGLFWWindow.h"
#include "insectarivm.h"

//========================================================================
int main() {
	ofGLFWWindowSettings settings;
	settings.setSize(1024, 768);
	settings.monitor = 1; //set it to use the second monitor
	settings.windowMode = ofWindowMode::OF_GAME_MODE;
	auto mainWindow = ofCreateWindow(settings);
	shared_ptr<insectarivm> mainApp(new insectarivm);
	ofRunApp(mainWindow, mainApp);
	ofRunMainLoop();
}

Hi, I got it to work changing the coordinates position of the output and avoiding fullscreen.
It’s actually working, even I’m writing this on first monitor, but I would prefer not needing to know the size of both screens for making it work.
If anyone knows how to make possible what I achieved in the beginning of this thread, both possibilitties would be clear for future researchers with this same problem.
Thousands of thanks!

Below is the code used in main.cpp for setting position of the window at the end of the first monitor and the beginning of the second one.

ofGLFWWindowSettings settings;
settings.setSize(1920, 1080);
settings.setPosition(ofVec2f(1920, 0)); 
settings.windowMode = ofWindowMode::OF_WINDOW;
auto mainWindow = ofCreateWindow(settings);
shared_ptr<insectarivm> mainApp(new insectarivm);
ofRunApp(mainWindow, mainApp);
ofRunMainLoop();
1 Like