Direct3D 10 Multi-Monitor Questions

Started by
5 comments, last by Headkaze 16 years, 9 months ago
I recently hooked up a secon monitor, and I'm curious how it works from a programming point of view. Is a device a graphics card, or a monitor? What happens when you drag the window to the other monitor? Does it reassociate, or is it still associated with the first one? What happens in-between? I'm just using one graphics card, but I want my programs to be as wide-open as possible, so how does it handle multiple graphics cards? Just more general questions like that. I just want a solid understanding of how this works.
Advertisement
Two monitors have nothing to do with D3D10. Your window will behave just like any other window/program you have open when dragging it around and stuff. Full screen is normally on the primary monitor but there are other variations.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

So, when you create a device, it's associated with the graphics card, and not the monitor? I guess that simplifies things.
Monitors don't really have much to do with it. It's your graphics card(s), but from a programming point of view video accelleration is only available on the monitor that the window handle is created on. If you want to support multiple monitors will full FPS, you have to handle if the user drags the window of your application to the other monitor. If this happens you perform the usual method of destroying the device and recreating present parameters. You can detect if a window is moved to another monitor using the API functions such as MonitorFromWindow, MonitorFromPoint or MonitorFromRect.

But with all that being said I'm not 100% sure about DirectX 10 or Vista as it's a completely new graphics engine, so the accelaration in Vista may have meant a re-write of the underlying way it handles multi-monitors. What I do know is that multi-monitor support is much improved in DirectX 10. I think multi-monitor support has always been tacked on in earlier versions of Windows, and I think the popularity of using multiple monitors is improving. I like using two on my development machine and it's certainly handy having another monitor of screen real estate available. In my own graphics engine I support multiple monitors, and I use the method I described earlier.
I've used multiple screens simultaneously with a high-performance app using a single Device object for several years now. The device has a large amount of data loaded, so using multiple devices is not an option. Sometimes a single surface is stretched across both screens. I assume the video driver or card is taking care of the details.

The older graphics cards are noticably slower on the secondary monitor. I cannot see any slowdown on my 8800, but I may need to run tests that tax it more.
Quote:Original post by Headkaze
Monitors don't really have much to do with it. It's your graphics card(s), but from a programming point of view video accelleration is only available on the monitor that the window handle is created on. If you want to support multiple monitors will full FPS, you have to handle if the user drags the window of your application to the other monitor. If this happens you perform the usual method of destroying the device and recreating present parameters. You can detect if a window is moved to another monitor using the API functions such as MonitorFromWindow, MonitorFromPoint or MonitorFromRect.

But with all that being said I'm not 100% sure about DirectX 10 or Vista as it's a completely new graphics engine, so the accelaration in Vista may have meant a re-write of the underlying way it handles multi-monitors. What I do know is that multi-monitor support is much improved in DirectX 10. I think multi-monitor support has always been tacked on in earlier versions of Windows, and I think the popularity of using multiple monitors is improving. I like using two on my development machine and it's certainly handy having another monitor of screen real estate available. In my own graphics engine I support multiple monitors, and I use the method I described earlier.


Wow I never experienced that on Windows 2000 or XP. I just dragged my window over to the other monitor, no slow down or anything. I used multiple cards too from both ATi and nVidia. Weird. I could also create a single window that took up both screens if I recall (it looked dumb to me and defeated the purpose so I think I only did it once or twice so I could be wrong) that ran fine.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

That is a bit strange, I use a 6600 GT but it only has 128 MB onboard. Perhaps it's a memory issue or something? But I do notice dragging a running DirectX application to the monitor the DirectX device wasn't created on the FPS drops noticibly. If I destroy/create the device it starts running at the full FPS again. Maybe newer cards solve this problem. I know people have had problems using VMR9 (hardware accellerated video) on both monitors at once. There is a noticable slow down on one of the monitors when they do this. Again, this could be solved in newer cards and/or DirectX 10.

This topic is closed to new replies.

Advertisement