• Advertisement
Sign in to follow this  

Direct3D 10 Multi-Monitor Questions

This topic is 3931 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
So, when you create a device, it's associated with the graphics card, and not the monitor? I guess that simplifies things.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement