Jump to content
  • Advertisement
Sign in to follow this  
Desdemona

OpenGL Dualhead + OpenGL

This topic is 4902 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

The end-all goal for my application is to have hardware accelerated 3D graphics on two monitors in windowed mode using a Matrox P650. I am using OpenGL at the moment. I was pretty nieve when I began the program, and my line of thought was pretty much "just move the window to the 2nd monitor" and that is all there is too multi-monitor programming. How wrong I was... ;) If I disable the 2nd display and run my application, it runs great. But if I enable the 2nd display, performance goes down the drain. Looks like its reverting back to software mode. I was reading a FAQ on www.realtimesoft.com and learned that OpenGL just doesn't have any mechanisms for multi-monitor programming. Supposedly nVidia cards support hardware accelerated OpenGL on dualhead systems, but changing hardware is not an option for me. It also states that, if programmed correctly, DirectX -should- be hardware accelerated across both monitors. (However the DirectX SDK seems to indicate this acceleration only affects fullscreen apps, though the website says it works for windowed mode too.) I'd like to try fixing what I have before I try redoing everything in DirectX. Is there anyone who has done dualhead, hardware accelerated OpenGL programming that could share some information? Thanks Joe

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Desdemona
Is there anyone who has done dualhead, hardware accelerated OpenGL programming that could share some information?


int x = ::GetSystemMetrics( SM_XVIRTUALSCREEN );
int y = ::GetSystemMetrics( SM_YVIRTUALSCREEN );
int width = ::GetSystemMetrics( SM_CXVIRTUALSCREEN );
int height = ::GetSystemMetrics( SM_CYVIRTUALSCREEN );
DWORD style = WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;

HWND handle = ::CreateWindowEx( ... , style, x, y, width, height, ... );

This creates a borderless window which fills full desktop on my system, spanning across both displays and both appear to be hardware-accelerated... you do all drawing like in any regular openGL window. Note this is with Radeon 9000, i have no idea if Matrox doesn't have some limitations when it comes to acceleration. ^^;

Share this post


Link to post
Share on other sites
That is what I've been doing - just moving the window to the appropriate monitor.

Something else though. I'm running two processes. Each process has a single window, one for each monitor. Are there issues I should be aware of regarding multiple processes and hardware acceleration? Is it even possible to have multiple processes hardware accelerated? Or would it just be limited to the first process?

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!