OpenGL on a Dual-Head PC

I have a problem reported by a couple of testers for my game who are running on dual-head PCs. The problem is that the game fails to initialize OpenGL on systems with dual video cards and both cards being used to provide space on the windows desktop (as opposed to say 1 card being used for the desktop and then a voodoo2 card which wouldn’t, which works fine for my game). The exact location where it fails is at wglCreateContext(), which reports back that an “Invalid device context (DC) handle” was supplied. The actual hardware that is being used is an nVidia GeForce card in the AGP slot and then a cheapy Matrox PCI card. I guess I am wondering what I can do programatically to fix this? If it was D3D instead of OpenGL I could just enumerate the displays and let the user pick one, but in OpenGL on the PC I seem to have no such option. Is there a common solution to this problem? Any help is appreciated!

Originally posted by DJ Tricky S:
I have a problem reported by a couple of testers for my game who are running on dual-head PCs. The problem is that the game fails to initialize OpenGL on systems with dual video cards and both cards being used to provide space on the windows desktop (as opposed to say 1 card being used for the desktop and then a voodoo2 card which wouldn’t, which works fine for my game). The exact location where it fails is at wglCreateContext(), which reports back that an “Invalid device context (DC) handle” was supplied. The actual hardware that is being used is an nVidia GeForce card in the AGP slot and then a cheapy Matrox PCI card. I guess I am wondering what I can do programatically to fix this? If it was D3D instead of OpenGL I could just enumerate the displays and let the user pick one, but in OpenGL on the PC I seem to have no such option. Is there a common solution to this problem? Any help is appreciated!

Go search for my post about dual monitors on nvidia cards.

You’ll find that when running multimonitor with a nvidia card set as the primary, the nvidia opengl driver crashes… which in turn returns an invalid pixel format, which in turn fails to create a valid context.

Nvidia was supposed to fix this (essentially, you should get only software rendering if you want to “span” across screens) in their latest driver, but I don’t know if they have or not.

Anyways, its a nvidia bug… switch to your other card as the primary and it should work fine.

Siwko

PS - I was the one that first discovered and reported this bug to nvidia, and worked with them to try to fix it. Try Det3 v6.32 reference drivers from nvidia and see if they help.

Hang tough… just found out that this fix will be included in nvidia drivers soon to come (v6.45)!

Siwko

This bug is NOT fixed in 6.32. This bug is fixed in versions 6.45 and later.

You’ll either have to wait for some moron to leak 6.45 or later [no, despite all the conspiracy theories, we don’t leak drivers intentionally], or wait for another official 6.xx update release.

  • Matt

Thanks for the info, it’s much appreciated as always!