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

Dual/Multiple Monitors

Started by slack Sep 21, 2005 at 5:47 PM 5 replies 2.3k views
Original Post
slack
slack
I am trying to use two monitors with a DirectX application and experience slow framerates on the secondary monitor. On one system with a fast video card, it is not very noticable. On another system, it is unacceptably slow. I read on one site that a device must be created for each monitor, but I haven't seen much else about this. Does anyone have any ideas on how to approach this? How is rendering performed if textures/meshes/shaders are created for one device object and they need to be used for the other? Is there another solution besides multiple devices? Thanks!
circlesoft
circlesoft
Quote:
Original post by slack
Does anyone have any ideas on how to approach this? How is rendering performed if textures/meshes/shaders are created for one device object and they need to be used for the other? Is there another solution besides multiple devices?

As far as I know, creating two devices is the only way. You can't share resources between them, so you are going to have to create them separate on each device. It is pretty inefficient.

You also have to be aware that things aren't going to be very fast at all, especially if you are creating both devices on the same card. For example, my single 9600xt card has 2 enumerable devices. However, performance isn't very good if you use both of them at once. I don't recommend doing it, if at all possible.
slack
slack
Thanks. My texture data is far too large to create a duplicate copy, so I may try rendering to a surface on the primary device, read the surface into system memory, and render it with the secondary device to viewports on the second monitor. That'll be pretty slow, but I'm wondering if it'll be faster than whatever DX is doing now.
NovaCaine
NovaCaine
Is your display in horizontal span or dual view( dual view is when you click the "Exten my dektop to this monitor" checkbox in the display properties ), or are you using 2 vidoecards?

My understanding of this is that when in dual view the second monitor is using software to render everything on that display, including dirextX, whereas in horizontal span, the videocard is 'tricked' into thinking you have a really wide monitor and will create a hardware buffer to work with this.

I am currently writing a DirectX app in this way and am still getting acceptable framerates, can post some code if you want or even write a small directX app for you, as it would be a cutdown version of my app.
turnpast
turnpast
If you are infact using a multihead card you should not have to create multiple devices. The docs suggest that you can create a multihead device by passing the D3DCREATE_ADAPTERGROUP_DEVICE behavior flag at device creation. This device should have a number of swap chains (one for each monitor) that you can aquire by calling GetSwapChain with the number of the monitor. By setting the the back buffer from the swap chain of your choice as the render target you should be able to draw on each monitor seperately. I have not done this, just talking out of the docs. For more search the DX9 docs for multihead.
NovaCaine
NovaCaine
infact, heres a small sample of what im doing

http://www.geocities.com/novacaineindustries/MultiMonApp.zip

just make sure your running in horizontal span, for nVidia cards it's in Display Properties->Settings->Advanced->YourCardsName->nView Display Settings.

ATi cards i think you need to get the catalyst drviers and it's somewhere in there. not too sure as i've never owned an ATi card.

Just noticed the post above, in my app i am only using one device. Just have a double width backbuffer and change the viewport.
slack
slack
Got it working acceptably with no code changes. I'm using a single ATI card and downloaded their HydraVision software. It seems to support what NVidia calls horizontal span. Rendering on the second monitor is nearly as fast as the primary monitor now.

BTW, nice looking game Nova.

Topic Locked

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

Sign in to reply to this topic.