Display window across two screens out of four

I am trying to display a window across 2 screens. The system (windows based) has 4 monitors with the other two monitor running separate applications.
How can I configure my application to run full screen across two specific monitors only.

I have tried to do the following:
> ofAppGLFWWindow win;

    ofRunApp(new ofApp());

But this shall run on all 4 monitors, I want it to run only on two monitors.
Please advise.

I think you need first to setup those 2 monitors to behave as a single monitor in your OS. You can probably do this from Nvidia or Catalyst control panel, depending if you have an Nvidia or AMD card.

Then you’ll have a 3 monitor setup (one of which corresponds to 2 of your physical monitors) and you can set OF to start fullscreen on the one you need.

I did something similar in 0.8.4, in ofAppGLFWWindow this line selects which monitor to use:

windowP = glfwCreateWindow(w, h, "", monitors[0], NULL);

You can replace




But maybe this is supported some other way in current OF versions.

That way of initializing the window is not recomended anymore, if you want to use fullscreen across several monitors but not all the only way to do it is using an undecorated window:

ofGLFWWindowSettings settings;
settings.width = //width of the 2 monitors combined
settings.height = //height of the 2 monitors combined
settings.decorated = false;
return ofAppRun(new ofApp());

i’m not 100% sure right now that settings.monitor will do the right thing for windowed mode, set the window starting at monitor 2. if it doesn’t then you can specify the position in the settings as well setting it for example to the width of the 2 first monitors for x and 0 for y.

This seems to have done the trick,