How to render using several screens?

Problems building or running the engine, queries about how to use features etc.
Post Reply
Kai-Peter
Greenskin
Posts: 133
Joined: Tue Oct 15, 2002 10:14 am
Location: Helsinki, Finland
x 1
Contact:

How to render using several screens?

Post by Kai-Peter »

If I have multiple monitors set up on the system, how do I render on several of them? It seems like D3D9 is the onle rendersystem supporting this even remotely.. :)
Kai Backman, programmer (Blog)
ShortHike - Space Station Game
Lodes
Google Summer of Code Student
Google Summer of Code Student
Posts: 228
Joined: Mon Mar 17, 2003 12:02 am
Location: San Jose, CA, USA

Post by Lodes »

Hi,

I haven't tried it yet, but it is something that I'd like to do someday as well and here's how I would tackle the problem if I tried today.

But first, here's how Microsoft Flight Simulator 2004 handles it. What you have to do in that game is to get the game in window mode and "undock" a new view. Then you drag that new window with the view you undocked to your secondary monitor and press alt-enter to go full screen. What happens then is you have both your monitors go in fullscreen mode with the two seperate views.

This sounds really really hacky but hum this is the only game that I know can handle dual monitors.

I would create my own window (probably using wxwidget or the win32 api if I didn't want to be cross platform). I would create two embedded renderwindows and then drag one window to the secondary monitor. Now about going fullscreen.. I have no idea how to handle it. I guess that's something I should try this weekend since I've got time.

Lodes.

PS: There seems to be a lot of gotchas with dual/multiple monitors. Here's some links.

http://www.realtimesoft.com/multimon/faq.asp
http://www.realtimesoft.com/multimon/products.asp
http://graphics.tomshardware.com/graphi ... index.html
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

I saw the capabilities of this when I was adding swachain support, but since I don't have dualhead it wasn't something I could test. Patches welcome :)
User avatar
bana
Greenskin
Posts: 132
Joined: Mon Aug 02, 2004 7:40 am
Location: Austin, Texas
Contact:

Post by bana »

It depends on the specific effects that you are looking for, I am using Nvidia drivers in linux and I can span OpenGL programs across two monitors with both being accelerated. Then with camera::setAutoAspectRatio(true) I can have a 2880x1200 screen that looks good. If you want to divide these up then you could use multiple viewports (IIRC).

Although if you had a different driver configuration, then you might have to go into something a bit more exotic.
A proud member of the OpenFrag Coding Team.
http://coolhands.blogspot.com/
Lodes
Google Summer of Code Student
Google Summer of Code Student
Posts: 228
Joined: Mon Mar 17, 2003 12:02 am
Location: San Jose, CA, USA

Post by Lodes »

Yeah you can only do this with nvidia cards. This is not possible with ATI cards since the drivers don't support it. I wished it would work on ATI as well as it would make everything very very easy.
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

Ati has a multihead demo for Dx9 with source code and an explaining PDF :

http://www.ati.com/developer/samples/dx9/MultiHead.html


Here is a demo with a multimonitor patch that use 2 monitors :

http://www.idvinc.com/html/pangaea_main.htm
Kai-Peter
Greenskin
Posts: 133
Joined: Tue Oct 15, 2002 10:14 am
Location: Helsinki, Finland
x 1
Contact:

Post by Kai-Peter »

Using DX9 the different monitors show up as devices so that way I'm able to spawn a window to a second monitor. I would imagine that creating two renderwindows (and hacking around with the viewports) would create a spanning screen if you wanted to.

Currently running fullscreen on a dual setup is quite limited. When Ogre is running fullscreen on one of the monitors, if you then click on any application it minimizes Ogre. And when you maximize again you get a nasty crash.. I'll see if I can patch this up somehow .. ;)
Kai Backman, programmer (Blog)
ShortHike - Space Station Game
Post Reply