SFML community forums

Help => Graphics => Topic started by: morrisb on February 14, 2011, 08:06:23 pm

Title: fullscreen on second monitor
Post by: morrisb on February 14, 2011, 08:06:23 pm
Fullscreen seems to work fine for me on my primary monitor, but I haven't been able to figure out how to open a fullscreen window on a second (or third or fourth) monitor.  I'm using windows 7, both 32 and 64 bit on separate machines and using VS 2010 as my IDE.

thanks,

morris
Title: fullscreen on second monitor
Post by: Laurent on February 14, 2011, 08:10:02 pm
You can't.
Title: fullscreen on second monitor
Post by: morrisb on February 14, 2011, 09:14:25 pm
Oh well....

Any ideas how that might be done as a work around, or even going outside sfml and creating a window to render in to?  Also, is this a windows thing, or an sfml design thing and is it a permanent design thing?

thanks,

morris
Title: fullscreen on second monitor
Post by: Groogy on February 14, 2011, 09:20:23 pm
You can go trough the OS and create a window there on the display you want and then give SFML the window handle.

Or am I wrong? Never tried it myself.
Title: fullscreen on second monitor
Post by: morrisb on February 14, 2011, 09:47:36 pm
Another thought, can I create an "undecorated" window with sfml?  Then I can just put it at the correct coordinates for the second monitor and size it to the full resolution.

thanks,

morris
Title: fullscreen on second monitor
Post by: Laurent on February 14, 2011, 11:11:09 pm
Quote
Also, is this a windows thing, or an sfml design thing and is it a permanent design thing?

None :)
This is a SFML implementation thing, that will hopefully be improved in the future.

Quote
Another thought, can I create an "undecorated" window with sfml? Then I can just put it at the correct coordinates for the second monitor and size it to the full resolution.

That should work, yes. To create an undecorated window, use the sf::Style::None style when you create your window.
Title: fullscreen on second monitor
Post by: Groogy on February 14, 2011, 11:12:47 pm
The problem there will be that you won't be able to change the actual resolution of the display. Meaning you have to always use the desktop resolution.
Title: fullscreen on second monitor
Post by: morrisb on February 15, 2011, 12:34:40 am
The resolution is very tightly controlled for my project, so it should work out fine.

One more question though, and this is probably a platform thing, but as far as rendering goes, is there any difference between a "fullscreen" window and a "fake" fullscreen window?  In other words is there any change in the acceleration or timing (vertical sync is a must for me) of the 3d being displayed?

morris
Title: fullscreen on second monitor
Post by: Laurent on February 15, 2011, 08:10:49 am
Quote
One more question though, and this is probably a platform thing, but as far as rendering goes, is there any difference between a "fullscreen" window and a "fake" fullscreen window? In other words is there any change in the acceleration or timing (vertical sync is a must for me) of the 3d being displayed?

There is a difference, but I don't know if it shows. Should be ok in my opinion.
Title: fullscreen on second monitor
Post by: Hiura on February 15, 2011, 09:38:17 am
I agree with Laurent. From what I've read in the Apple doc (should be more or less the same on other OSes) if there is a difference it's about performance but with nowadays computers this shouldn't be very noticeable.
Title: fullscreen on second monitor
Post by: morrisb on February 15, 2011, 01:17:21 pm
Thanks for all the info.  I really appreciate your help.

morris
Title: fullscreen on second monitor
Post by: l0calh05t on February 15, 2011, 01:37:50 pm
Quote from: "Groogy"
The problem there will be that you won't be able to change the actual resolution of the display. Meaning you have to always use the desktop resolution.


It is possible in windows with changedisplaysettingsex, afaik
Title: fullscreen on second monitor
Post by: devlin on February 15, 2011, 07:33:20 pm
Quote from: "morrisb"
is there any difference between a "fullscreen" window and a "fake" fullscreen window?

In the "good old days" - you usually only got hardware acceleration when using a true fullscreen window - this is mostly not the case now.

However, some drivers - at least a few years ago (or more, 10 years feels like mere weeks...) - use page flipping in fullscreen and block transfers in windowed mode for double-buffered applications. This can have huge implications on framerate (especially for SLI/crossfire setups).

In short: don't worry too much about it these days; but benchmark it in case you see severe performance issues.