Full screen with two monitors

Started by
6 comments, last by kubera 11 years, 11 months ago
Hi, I'm looking for a way to run my game on two monitors (with the same resolution) in fullscreen.

Would it be possible to treat two monitors that is say, vertical aligned, as one in fullscreen mode? That would be the easiest solution for me. But I could not find an example of how to do that.


I also tried creating a second GraphicsDevice when hooking on to the graphics.PreparingDeviceSetting event. I could not find a working example of this either, but this is what I'm trying:

GraphicsAdaptor ga = GraphicsAdaptor.Adapters.ElementAt(1); // My second monitor
IntPtr p = ga.MonitorHandle;
PresentationParameters pp = new PresentationParameters();
GraphicsDevice secondDevice = new GraphicsDevice(ga, DeviceType.Hardware, p, pp);

Doing this I get a InvalidOperationException. Can someone point me in the right direction here or even better, provide a working example that runs on two monitors in fullscreen mode.

Thanks,
slackerJr
Advertisement
The first step is to check your video card drivers. Inside ATI/NVIDIA control panels, you can choose how to handle multiple monitors. If you choose horizontal/vertical span, it will threat both monitor as a big large one, so a single fullscreen application would handle the way you want for every games without anything special in your code. However, it also stretch the window desktop, taskbar and everything and most people don't use this.

The other method is called DualView and let both monitors handle their own resolution. I never tried it, but in this mode with DirectX10+/XNA you can create multiple viewports with different resolutions and draw to both independently, but I don't think there's a way to create a big viewport spanning on both, cause as I said they are initialized with different resolutions and their own settings.

Someone correct me if I'm wrong.
Quote:Original post by Dunge
Someone correct me if I'm wrong.


AFAIK you are right.

----------

I've already done 2-monitors fullscreen applications both ways (span, dual view), but unfortunatelly only in DX9/C++ and I have no idea how it works in XNA.

The span mode shouldn't affect anything, for directx it behaves simply as a very very very wide monitor :)

The second configuration is described here:
http://msdn.microsoft.com/en-us/library/bb147217%28VS.85%29.aspx



Feel free to ask if you have any further questions.
Thanks a lot both of you for quick replies.

I'll check for drivers since that would work perfectly for this project. If it doesn't work, I'll dig deeper in the DualView solution.
Hi everyone,

Im having a similar problem. I have an game that I want to display across two monitors each being 1024 x 768. I made the window 2048 x 768 and set the monitors up to act as one big desk top. This works but the performance is really bad, about 11 FPS. the system is running Windows XP, dual core with Ati Radian HD 3200. Any idea what this could be. I have tested it on other systems and it works fine.

Thanks.
A Radeon HD 3200 is not exactly the most capable card on the market. If you've tried this on XP systems running on comparable hardware, then it could just be drivers.

EDIT: whooaaaa, thread necro. This is almost two years old, Martin, you may be better off making a new one.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.
Yea thats very true, Ill make one now. Having major problems and I think its to do with the windows style. Ill create a thread. thanks. Oh I tried updating the drivers of direct x and the graphics card and there all uptodate. Also im not rendering any graphics apart from some text to tell me the frame rate so even tho its not very powerful I would think it would handle that.

Thanks,
Martin
I am not sure, but I remember, that Direct3D11 and Direct3D10(.1) are supporing only one monitor for the full screen mode
in multimonitor support. The second monitor should be in the windowed mode (not a real full screen).

This topic is closed to new replies.

Advertisement