Rendering fullscreen stereo on 2 screens

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
AndreasT
Posts: 8
Joined: Mon Jul 20, 2009 8:27 pm

Rendering fullscreen stereo on 2 screens

Post by AndreasT »

Hi.
I want to render a scene with 2 cams on 2 screens at my nvidia 9600GT.
The resolution of the screens will be 640x480
I use an OpenGL device.
How would I best go about that?

Use one fullscreen window spanning the 2 screens and using the SplitScreen tutorial?
Or better 2 separate fullscreen windows.

To echo my question from the irc:

Any hints, no gos, caveats, best practices?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If you can sync the output for the "wide-screen" version it's probably much simpler than going for the second solution. Moreover, OpenGL cannot yet render to two different windows, so you'd also have to switch to DirectX otherwise. So, try to get option one going :)
AndreasT
Posts: 8
Joined: Mon Jul 20, 2009 8:27 pm

Post by AndreasT »

Thanks a million hybrid!
This is exactly the kind of headache-prophylactic information that I am looking for.

Anything else that would keep me sane for this endeavour would be highly appreciated.

I'll go for number one then.
AndreasT
Posts: 8
Joined: Mon Jul 20, 2009 8:27 pm

Post by AndreasT »

Thats what it looks like atm

(plz ignore the dirty keyboard, I'm working on a public system)Image

It is the Output of two Cams of an HMD, drawn into one window.
Now I will set up the cam scenenodes and try to render something.
Will probably take till tomorrow.
forX
Posts: 22
Joined: Thu Sep 09, 2010 6:26 am

Post by forX »

Hi, did somebody succed to create the dual screen like this? I try the same thing too. (I just started with irrlicht so that can be long to found how to do it.)
tank you
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, as suggested above, you can simply set up your screen as one huge and very wide one. Then render to it using two viewports. Should be no problem.
Also, OpenGL is now able to render to a manually given second window (in beginScene) just as Direct3D and probably also the other drivers. You just need to make sure you create the window properly.
forX
Posts: 22
Joined: Thu Sep 09, 2010 6:26 am

Post by forX »

in fact, now I need to found how to have each Camera who will be fps cam,
like AndreasT picture,
u have a right and left cam and both are fps cam who can ride on the map but each have a diffent view.

we have the onEvent who suggest THE cam who will run but I dont know how both of them can follow as fps.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Don't use two FPS cams, just one and a static cam as child. You don't have two independent cams.
forX
Posts: 22
Joined: Thu Sep 09, 2010 6:26 am

Post by forX »

I try but the static cam is stock on the first position I give.
I want the second follow the first one.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, just update the camera setting each frame, copying from the first cam.
forX
Posts: 22
Joined: Thu Sep 09, 2010 6:26 am

Post by forX »

its probably on
while(device->run())

seems like a redefineshapes on opengl

maybe I use
camera->setPosition
for the static camera
forX
Posts: 22
Joined: Thu Sep 09, 2010 6:26 am

Post by forX »

I use
camera[1]->setPosition (camera[0]->getAbsolutePosition ());
seems work with the "absolute", but the view cam, I search

tanks for your help
forX
Posts: 22
Joined: Thu Sep 09, 2010 6:26 am

Post by forX »

camera[1]->setTarget (camera[0]->getTarget ());

that's it,

tanks man, I will continu with that
Post Reply