Skip to main content
GameDev.net gamedev.net
🔒 Locked

Multiple Fullscreen Windows

Started by Oxidative Apr 26, 2007 at 10:09 AM 8 replies 1.4k views
Original Post
Oxidative
Oxidative
I want to create an application that has muliple OpenGL windows on multiple displays, all fullscreen at the same time. Is this possible with OpenGL+Windows? My plan is to use 4 monitors and a GeForce Quadro FX 4500 X2 (without using SLI). Could the WGL_NV_gpu_affinity extension be a solution for me? Do you have a better idea to get my application spawn across all 4 monitors? Thank for any help!
sevensevens
sevensevens
I've never played with mutliple monitors before, but you could create WS_POPUP windows, and align them on the screen boundary (i.e. if the screen res is 1024x768 for each monitor, make every window that size, and tile them across). That would probably be easier than finding hardware dependent solutions, and might actually work better if one screen is a HUD and the other screen is the game.
CodeMunkie
CodeMunkie
There should be some setting in the driver that handles how the display is handled across the different monitors. For example, in the nView wizard you can choose "Horizonal Span" option and the two monitors are treated as one. When you request a fullscreen display for your app, the display will span both monitors. I have never tried it for 4 monitors, but I imagine there will be some extra options for this.
"When you die, if you get a choice between going to regular heaven or pie heaven, choose pie heaven. It might be a trick, but if it's not, mmmmmmm, boy."
How to Ask Questions the Smart Way.
MrRage
MrRage
I’d give you a better example if I had more time but the basic idea is you want to call ‘EnumDisplayDevices’ and get the display devices. From there you want to create a window in each display device, using the usual OpenGL context setup. From there make each window the size of the monitor you wish to fill.

There are some tricks out there with managing multiple contexts of OpenGL so look into that too.

You will have to maintain a list of all the HWND you make for each window so your single WinProc function can enumerate though the list to find wich window its getting the message from so it can make all the correct calls to the correct window.

Google these topics to help you get started.
EnumDisplayDevices creating window
multiple OpenGL Contexts
multiple OpenGL Windows

I’ll try to post something more meaningful later on but this should get you started.
MrRage
MrRage
Another good resource.
http://www.realtimesoft.com/multimon/programming/basics.asp
Oxidative
Oxidative
First: Thanks for all those replys!

I want to use all 4 monitors for the game content, basically providing some kind of 180° view. So I would run some heavy 3D content in those windows.

The use of one big desktop spawning one window across all 4 monitors won't work, since only the monitors of one card can be combined into one desktop (I would end up with two big desktops that way).

My idea now is to run the game distributed. Since I already have working network code, I could easily start the game 4x and let them interact as one game (it's really no big deal to do that, I got plenty of CPU and GPU power). Then I'd just need to create the windows for every instance of the game on a separate monitor and make them look fullscreen by using WS_POPUP. That way I wouldn't have to handle all the windows or contexts in the program. I would just have to find a way to tell the instances of the game which graphic device to use, so that each of my Quadro Cards handles two of the windows.
MrRage
MrRage
What kind of hardware are you testing this with?
Oxidative
Oxidative
I'm running an AMD Opteron 2216 (4 Cores @ 2.4GHz), 4 GB RAM and a Quadro FX 4500 X2 (two GPUs).

Do you know how to tell an application which graphic device to use in OpenGL? Can I choose the device by opening the window on one of the two monitors of that device?
Exomondo
Exomondo
Quote:
Original post by Oxidative
The use of one big desktop spawning one window across all 4 monitors won't work, since only the monitors of one card can be combined into one desktop (I would end up with two big desktops that way).


Im sure there is a way to create 1 big desktop. Personally i did it with 2x QuadroFX 4500 X2s for a total of 8 monitors and had 1 enormous desktop. However this was under Fedora, not windows. However on a hardware level it CAN be done.

Oxidative
Oxidative
So true, I'd know how to get multiple fullscreen windows on linux, it's a lot easier there. But I'm stuck to windows for this one :-P

I didn't find any options in the nvidia control panel which would allow to combine the desktops of two seperate graphic devices.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.