PDA

View Full Version : Dual Monitors - Windowed mode



JensPedersen
06-24-2008, 02:18 AM
Hi
I am new to OpenGl but I have a problem in DirectX that could cause me shift to OpenGl.
I run on WinXp and have a windowed application that render to a window on the primary screen. Now I want a copy of that image on the secondary screen. The primary screen is in portrait mode and the secondary screen is in landscape mode. The resolution is also different.
Now i DirectX I can easily do this but with a large performance drop when the image copy is placed on the secondary screen.
The only way DirectX can handle a dual-heap device effectively is when it runs full-screen on both monitors and that not what I want.
Now I ask you OpenGL guys, is this easily done in OpenGl with no performance problem?
I there some example code somewhere I can use to get going and make a test?

sqrt[-1]
06-24-2008, 07:23 AM
I am confused, are you saying the second screen is only display a copy of what is on the first screen? (eg. Copy screen to texture and display on a second window) I cannot really see how this could be slow?

Or are you saying the second window is also rendering the same image?

Are both monitors connected to the same video card?

In general, OpenGL is better in WinXP at rendering in windowed mode.

If you want to test - perhaps download a multiple window example using GLUT and drag the second window to the other monitor?

V-man
06-24-2008, 08:28 PM
I'm not sure what a dual-heap device is.

Sounds like you have 2 graphics cards and you want to read back the result and then display on the other graphics card. Have you considered just rendering again on the other graphics card?

If you do want to read back and diplay, then with GL you use glReadPixels and store the data in RAM. For the second monitor, make a texture and display as a fullscreen quad.

I think that both cards would have to be of similar brand like 2 nVidias else you don't get hw acceleration on the second monitor.

Ilian Dinev
06-25-2008, 01:26 AM
I've had success with DX9 rendering a window across 2 monitors with same resolution/color-depth and 1 GF7600 videocard (with 2 outputs). No extra code was necessary, it just ran as expected.
Couldn't and can't test with different resolutions.

JensPedersen
06-25-2008, 03:30 AM
Hi
The HW is a integrated graphics device with two monitor outputs.
I work with a specific HW (probably Intel 945 or 965 integrated graphics chipset) and not a general PC.

On the primary screen is an application with multiple windows. One of the windows are a rendered image. The rest is just controls - seldom changed.
On the secondary screen should be a copy of the rendered image on the primary screen - maybe scaled. And some other controls.
I do the rendering by first render to a texture and then copy this texture to first the primary screen window and then to the secondary screen window (with scaling).
It works fine. The problem is speed.

Can you point to a OPENGL / GLUT example with multiple windows?

JensPedersen
06-25-2008, 03:35 AM
Hi
Sorry if I have misspelled something.
The HW is a dual head device. I will use a specific integrated graphics device. Probably an Intel 945 or 965 integrated graphics chipset.
On the primary screen is an application with multiple windows. One of the windows are a rendered image. The rest is just controls - seldom changed.
On the secondary screen should be a copy of the rendered image on the primary screen - maybe scaled. And some other controls.
I do the rendering by first render to a texture and then copy this texture to first the primary screen window and then to the secondary screen window (with scaling).

The primary screen will be in portrait mode and the secondary in landscape mode - maybe even with another screen resolution.