Jump to content
  • Advertisement
Sign in to follow this  
TTK-Bandit

OpenGL DualMonitors ?

This topic is 3350 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just wondering how you would add support for dualmonitor display with opengl. I don't have a second monitor, so I cant try it, just would like to find some resources to get started and then test it somewhere else. I have googled quite a bit, but couldn't find anything. could it be that you just size the window-width to the double size of the screen ? Or do you have to use multiple windows and move the second window to the center of both monitors ? Question goes for Win32, Linux, MacOsX.

Share this post


Link to post
Share on other sites
Advertisement
It is a very platform specific topic, I am afraid, although some high-end windowing toolkits provide support for it. Look around for windowing solutions which also target Virtual Reality applications, and you should have some luck.

Share this post


Link to post
Share on other sites
I know its a platform specific topic, thats why I asked for win32, linux and macosx.
and another toolkit is no solution for me.

Share this post


Link to post
Share on other sites
Create one OpenGL window/context/whatever for each monitor =P It's as simple as that, although it can lead to headaches if you have to adapt code that was originally made for a single monitor (normally it's just a matter of setting what context to render next, but you never know what stupid quirk the code may have...).

Share this post


Link to post
Share on other sites
You might run into a problem too...

In all the dual monitor setups I've seen, only one monitor had hardware accelerated graphics.

IE if you had a windowed game running, you'd get a lot higher FPS on one monitor vs the other.

Just somethin to be aware of!

Share this post


Link to post
Share on other sites
It also depends how the user has configured their dual monitors.

Most often it's set up as "dual view", where they are two independent displays. However, the user may have configured them to act as a single (Large) monitor with a weird resolution, in which case you just have to support this large-resolution and know where the split occurs.
I've worked on a system that used this mode in the past, and found that only one half of the large virtual-screen (i.e. one physical screen) would use quality-enhancements such as AA or Aniso-filtering...

To get around the "only one monitor is HW accelerated" problem mentioned above, you can render the slow screen's content to a texture using the accelerated context. The slow context then just has to blit this texture to the screen.

Share this post


Link to post
Share on other sites
All dual monitor setups I've seen so far (and including mine) had a) hardware acceleration for all screens and b) consisted of a single desktop area that was not rectangular (eg. 1600x1200 with the right border leading into a 1920x1080 screen). Does anyone really use it as mirrored or separate screens?

Supreme Commander supports this nicely, you have two fully functional game screens, usually I leave the left one zoomed out to act as an overhead map and use the right one to play. Or zoom the left one to my army and the right one to the place I want to arrange them at, so I don't need to scroll to select the different units.

It's a D3D game, though. In Direct3D, a dual-head graphics card with two monitors attached simply appears as two Direct3D devices with different supported resolutions. I guess it's similar in OpenGL, you'd just create two windows and two contexts.

The only problem is if you move a 3D rendering window between the two screens. The application needs to detect this and recreate another D3D device / OGL context for the other screen. And if the window is placed in the middle between two screens, you either have to do a slow memory copy (that's what XNA does) or keep two devices/contexts around.

Share this post


Link to post
Share on other sites
Quote:
Original post by Cygon
All dual monitor setups I've seen so far (and including mine) had a) hardware acceleration for all screens and b) consisted of a single desktop area that was not rectangular (eg. 1600x1200 with the right border leading into a 1920x1080 screen). Does anyone really use it as mirrored or separate screens?
What you just described is two separate screens. The "single virtual screen" setting would show up as a single device, e.g. 3200x1200.
Also, in the case I mentioned, both screens were accelerated, but one still took shortcuts (ignoring quality hints/preferences).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!