PDA

View Full Version : dual view / multimonitor rendering


crmx
12-27-2006, 11:47 AM
Hello,
im working on a application with the purpose of VJing..
my question is, what could be the best way to build this app, where u are able to have a GUI + a preview window and also be able to render to other monitor/adapter in fullscreen without much loss on performance ?!?..

i tested with multidevice (no fullscreen mode) and once u pass one window to the other monitor u lose alot FPS, and also tried with swapchains, which does about the same thing..

my best idea was 2 devices/windows, one fullscreen mode and the other windowed mode where i can attach every button/slider i need and one other just for fullscreen mode which would go for the other monitor on device 2.. if it exists..

still i couldnt get it to work.. one window (with gui and preview) in windowed mode and on the other monitor the fullscreen window (fullscreen output)..

im looking for better ideas or suggestions

thanks in advance,

vic

Reedbeta
12-27-2006, 11:56 AM
If you're using a single video card, there's usually a primary monitor and that's the one that'll have the best performance. Better let that one be the monitor where you do your rendering, and keep your GUI/preview stuff on the secondary monitor, where you can render it at a lower framerate and resolution and it doesn't matter so much. The other thing to try would be using two separate video cards. Also, instead of using fullscreen "exclusive" mode, just make a window that covers the entire screen and set it to topmost so it covers up the task bar.

.oisyn
12-27-2006, 12:17 PM
If you're using a single video card, there's usually a primary monitor and that's the one that'll have the best performance.
Seriously? I've been using a dual monitor setup on a single card on with a lot of different cards (both nVidia and ATi), and I've never seen a performance drop when rendering to the other monitor. There usually is a slight drop when a window crosses the edge between the monitors however.

crmx
12-27-2006, 12:47 PM
for what i tried the loss in performance isnt that light..
rendering a simple object in main monitor (1) when i pass it to the secondary the loss is relevant.. say from 800 FPS to around 150..

Reedbeta,
i am using one single videocard (ati 9600xt) and i already tried the TOP_MOST option, but going into fullscreen exclusive should pull the FPS up am i right ?

Oysin,
i am interested in your method, is it possible for you to send me how you create your windows and setup the windows and its modes..
im using c++ and dx9

thanks in advance,

Reedbeta
12-27-2006, 12:56 PM
.oisyn: Hmm, maybe I'm wrong about the primary/secondary thing. I don't have much experience with multimonitor setups myself, but I thought I remembered hearing about the primary/secondary performance difference from past forum threads. Perhaps it's only true for older video cards (he is seeing the drop on an ATI 9600, which would seem to support that...)

crmx: Note that an 800 fps to 150 fps drop is not really as significant as it seems. Rendering a single simple object is not a good performance test. Consider this: at 800fps, it takes about 1.3ms to render a frame; at 150 fps, it takes about 6.7ms. That's a difference of 5.4ms. Now consider if you were rendering a more complicated scene and were running at 60 fps. Then it's taking about 16.7ms to render a frame, and adding 5.4 gives 22.1ms, which is equivalent to a framerate of 45 fps - a significant decline, but nowhere near as much as the 800 to 150 decline. So you see, analyzing performance in terms of FPS can be misleading; it's better to do it in terms of how many milliseconds it takes to render a frame.

crmx
12-27-2006, 02:14 PM
i was able to increase the framerate a little bit by creating the device on the secondary adapter (the top most window).. i also did a brute force render of a couple of objects to see what would happen..

well i am satisfied with the results, the loss wasnt that bad, like you said the difference isnt that much..

still i was wondering if it isnt possible to get a real exclusive mode on secondary adapter while maintaining the first one in windowed mode and all the GUI stuff on..

heres the process i am following:

- create 2 windows
one -> 320x240 (positioned at 0,0 )
two -> 800x600 (positioned at start of second monitor, with top_most)
- create d3d object
- get display mode from both adapters
- set up one present_parameters for each adapter
- create device with HWND_1 and with present_parameters for the second
adapter (top_most)
- get first swap chain
- create additional swap chain with present_parameters from second adapter

mainloop:
render scenery to both windows/swapchain



if any ideas of improvement, please let me know

Nils Pipenbrinck
12-27-2006, 07:43 PM
If I'm not mistaken (it's been a while since I've dealed with it) rendering will always be slower if you create a d3d device for one display and render to the other. I think you need two d3d devices to render onto two monitors at once without performance loss.

But it's years since I've done stuff like that, and it might be completely different nowadays.

Nils

Kenneth Gorking
12-28-2006, 07:56 AM
Is this (http://ati.amd.com/developer/samples/dx9/MultiHead.html) what you are trying to achieve?

crmx
12-28-2006, 12:28 PM
Nils,
the main problem with 2 devices is that u also need to alloc twice the memory u actually need, since u cant share resources between devices..

Kenneth,
yes, thats what i was looking for, but for one monitor i wanted a windowed mode preview window + GUI and the other a fullscreen mode..
but yea that is what i was looking for

thanks everyone for the help