Post Reply

Forums -> Multiple monitors -> OpenGL multimon gaming thoughts
WillD   2000-10-01 14:44
In on a recent discussion on the Matrox tech support forums, one of the Matrox folks posted:

* There isn't much we can do about OpenGL in Windows 98 in multi display mode.

* Here is how open GL games like Half-Life, Quake, Quake2 load the OpenGL drivers:

* The game will call for the Microsoft OpenGL driver, it looks in c:\WINDOWS\SYSTEM\ for Opengl32.dll. This file will then look for an ICD file (Installable Client Driver) and will find the Matrox file G400ICD.DLL (G200ICD.DLL for G200 cards) to launch the game.

* If the MS OpenGL32.dll detects a multi display setup it will not call the Matrox ICD and will revert to software mode and some games like Quake 3 do not have a software mode so it will crash your system or it will dump you back to the desktop.

* The difference with the Turbo GL is that this is a MCD (Mini Client Driver), which bypasses the Microsoft Open GL drivers, and goes directly to our Open GL drivers.

* That is why multi display works under these conditions.

The issue was that, prior to the recent v6.04 G400 drivers, they had included a "turbogl", which was basically a mini-gl in the classic 3dfxgl sense, an opengl32.dll that you dropped into the game directory. Now that the ICD is performing up to par, they no longer "need" the turbogl.

The problem, then, is that without the turbogl, I can't play Half-Life without first disabling the second monitor, which is a royal pain, and given that I've been able to play for a year without doing that, I'm not in a mind to accept that. :P

To repeat the Matrox explanation, then, as I understand it, turbogl works because:

- the system opengl32.dll doesn't accept dualhead

- but, the game loads the local opengl32.dll rather than the system pengl32.dll

- the local opengl32.dll doesn't mind (or notice) dualhead

- the local opengl32.dll handles all the opengl calls

This lead to several thoughts. Why can't they (whoever; IHV driver developers, Microsoft, anyone else) write a simple "stub" DLL that drops in the game directory, and redirects calls to the appropriate hardware ICD dll (G400icd.dll in this particular case)? That would allow one to work around the problem of having to disable the second monitor, just as having the turbogl does, except that it doesn't have to be maintained as separate code from the ICD (which I'm presuming was being done). And if I had any inkling of how this was done, I'd try to do it myself. Unfortunately, my Windows programming kung fu is very weak.

Or, to go back to the original problem even, why does Microsoft's opengl32.dll not accept multi-monitors? It clearly works - as long as you don't use MS's opengl32.dll. :) This I _really_ don't understand, unless it's a result of the usual "We hate opengl" attitude at MS, in which case, that's just stupid...

The other thought I had was, could I just copy g400icd.dll into the game dir, and rename it to opengl32.dll. Tried it, but it didn't work.

Now, at the office I'd just put in a V3. I dropped a Mystique 220 in alongside it to test things out there. With the V3, of course, you have mini-gl drivers all over the place - one comes with Half-Life, 3Dfx had theirs (probably the same), and Wicked3D has a nice one as well. Using those, of course, works just as well as turbogl did on the G400 - I can play the game happily without disabling the second monitor. Interestingly, though, I also tried copying 3dfxogl.dll from the system dir (which I presume is the ICD) to the game dir, and renaming it to opengl32.dll, and it seemed to work fine.

I'm curious if the Geforce or TNT cards work in this manner or not; I don't have one convenient to test.

In any case, this does open up the ability to run GL games, to some extent, on multi-monitor systems without disabling the second display - if you can find something to act as a mini-gl in the game directory. I've since swapped the office V3/mystique with the home G400, so I can play Counterstrike without being annoyed...

So far it seems to be working fine; the only problem I've seen, though, is that the screensaver (mystify) doesn't operate quite right on the secondary display. It doesn't clean up after itself, it leaves all the old lines around. That is, it should only ever have 5 lines drawn at one time; however, it has _all_ the lines ever drawn during the particular session. It doesn't erase old ones as new ones are drawn. It ends up leaving a kind visual mess, but doesn't seem to be a problem other than that.
Christian Studer   2000-10-02 09:26
No idea why the Win9x opengl32 switches to software mode on multimon systems, but you can always use braindead's workaround, which disables secondary monitors during the initialization phase only.

Nvidia also doesn't have OpenGL acceleration on Win9x, but they do have multimon OGL on Win2000 (if you use only Nvidia cards, and you can't mix TNT and GeForce boards). See the OpenGL section for details.

Christian Studer
www.realtimesoft.com
WillD   2000-10-03 04:16
Yeah, I saw that workaround on braindead's page, but it indicated:

"You'll also have to start all programs you want on the secondary display after it is turned back on, since all prior opened windows will be moved to the primary display once you run the batch file."

which I didn't really find acceptable.

I'm not sure I follow your statement "Nvidia also doesn't have OpenGL acceleration on Win9x". I'm guessing you mean OGL multimon acceleration? Since I'm pretty sure it has normal OGL acceleration, else no one would be playing Quake/Halflife with the cards. :) My real curiosity was whether NV cards either (a) had a mini-gl driver of any sort, or (b) would work if you copy/rename the ICD dll to opengl32.dll in the game dir. If so, I think that's a better workaround than disabling (even temporarily) the second display. And, as I said, this works under V3 (and probably V5). I was curious what _other_ cards this might also work under.

Also, I was kinda curious why it works to rename the ICD for V3, but not for the G400 (if anyone has any guesses).

Anyway, you might want to add that info to the opengl page (using mini-gl drivers to get around having to disable the second display).
Christian Studer   2000-10-03 05:09
Use UltraMon 2 with braindead's batch file, and all windows will be moved to their original positions as soon as the secondary monitors are re-enabled.

I just tested renaming the Nvidia OpenGL driver (nvopengl.dll) to opengl32.dll and copying it to the app directory. Didn't work, the app failed with a missing exports error. I guess that 3dfxogl.dll exports all functions exported from opengl32.dll, that's why it works. To see a DLL's exports, look for depends.exe in the Platform SDK.

Christian Studer
www.realtimesoft.com
DrSiN   2000-12-19 02:11
Why doesnt someone just hack mickysoft's OpenGL driver so that it never sees more than just your primary display. Shouldn't that just fix the problem.
Forums -> Multiple monitors -> OpenGL multimon gaming thoughts

Post Reply