Second screen on full screen

Hi, i was wondering: is there is a way of selecting a second screen on fullscreen from my “of” app?
Is there is a command for this ? Or do i need a addon?

You can use the ofxFenster addon from underdoeg to handle creating a second window http://forum.openframeworks.cc/t/ofxfenster-addon-to-handle-multiple-windows-rewrite/6499/0 or do it yourself using whatever the windowing for your OS is. The addon is substantially easier though :slight_smile:

Hi, i been experimenting with the ofxFenster addon, when i want my second window on second screen at full screen i can define the corrdinates of my second window and the size, so i can positionate on my second screen with a full screen size.

But i have some problems with this approach : one problem is that this is dependent on the configuration of my resolution, if i change the resolution to a smaller one , my second window wont appear where is suppose to be.

How can i solve this problem? Is there a way of saying my second window allways appear in my second screen at fullscreen?
and what about the borders of my windows? is it possible to have real fullscreen without those borders of my second window?

what do you recommend me?

im on macosx

thanks!!

what do you recommend me?

I have a few projects where I use ofxFenster to create 2 different windows: 1 with a control/debug panel, 1 for projector output (i.e. fullscreen).

Since I often don’t know in advance the display setup on which I will work on, I normally handle the situation like this:

  • I render the output stuff inside an FBO and I dinamically stretch it on the surface of my output window
  • I create both windows in the default position, on the primary screen
  • I simply drag my output window in the right place (projector, triple head to go, etc)
  • I ofToggleFullScreen() my output window and (tadaan! :)) I have real fullscreen in the right place

I have been trying to get a second screen going as well but on the iphone. Does ofxFenster work for iphone as well? Is there a way to do this through code and not use ofxFenster?

Hi naus3a, why are you using FBO?
I been experimenting with ofxFenster for generating my secondary window and im a little confused, In the example that comes with the ofxFenster addon it creates a new object for new addional window it generates.
I just need to have a second window with the same content as the first.
I was wondering which should be the best way to do this?
ive tried to add an testApp object to the listener of my second window, but its not working.

any idea why is not working?

win->addListener(new testApp());

cheers

hey guys

Hi, i been experimenting with the ofxFenster addon, when i want my second window on second screen at full screen i can define the corrdinates of my second window and the size, so i can positionate on my second screen with a full screen size.

Yes, this is a pending feature on mac and windows. If you look at the library there is a class called ofxDisplayManager that will return infos about the screen. It sure won’t be long until it will work on mac as well but it is linux only for now… As naus3a said: What you should be able to do tough is to use ofGetScreenWidth() that should return the size of the main screen and then move the second window accordingly. If you now call fenster->setFullscreen(true); it should automatically fill the second monitor.

I have been trying to get a second screen going as well but on the iphone. Does ofxFenster work for iphone as well? Is there a way to do this through code and not use ofxFenster?

no ofxFenster does not work on the iPhone. Where would you need a second window there? Does the iPhone have a video output like HDMI? If so it definitely would be cool to have ofxFenster cover that area. But that’s not an easy task because ghost won’t support it. So everything would have to be coded using a different window library or from scratch using obj-c. Interesting thing though. I know some Samsung phones have hdmi output…

any idea why is not working?

win->addListener(new testApp());

testApp extends ofBaseApp and ofxFenster is looking for a ofxFensterListener. If you change your code

  
class testApp : public ofBaseApp {  

to

  
class testApp : public ofxFensterListener {  

everything should work just fine. Or you can upgrade to the latest version on github which now contains a ofxFenster::addListener(ofBaseApp*) function.
Aside of that your approach is correct on how to draw the same content on your second screen. But don’t forget that when you add a listener twice not only will draw get called twice, but also update. So whatever you do in update will be calculated two times.

cheers, philip

Hi @underdoeg,

I’d like to know how to do this with the latest version which contains a ofxFenster::addListener(ofBaseApp*) function ?

I’ve tried with

  class testApp : public ofxFensterListener {

but I’ve got the latest update of ofxFenster and it doesn’t seem to work anymore…

Thank a lot !

Cyril

ofxFenster seem to be depracted and merged into core. How do you access it? How do you call it?

So I’ve found out this is the way to activate 2 apps on 2 different screens in full screen:
windowSettings.windowMode = OF_FULLSCREEN;
windowSettings.monitor = 0;
ofCreateWindow(windowSettings);
app->setFullScreen(true);

And for the second one
windowSettings.windowMode = OF_FULLSCREEN;
windowSettings.monitor = 1;
ofCreateWindow(windowSettings);
app->setFullScreen(true);