VOGONS


Weird wrapper tricks

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

Needed a place to stash these ideas:

- Have a Glide3 wrapper that you'd like to try with a Glide2 game?
Colourless (Ryan Nunn) created GlideXP back in 2001. It was an upgraded Glide3x DLL for Voodoo cards and updated OpenGL ICD. Rather than write a Glide2x DLL as well, he wrote a wrapper which wrapped Glide2x to Glide3x. Conceivably, you could take the Glide2x.dll out of his driver package and use it with a Glide3x-to-Direct3D or Glide3x-to-OpenGL wrapper. In practice, I don't know if anyone's tried it, and Colourless made sure to note in the documentation of his final release that the "Glide2x Translator" was unfinished and had known bugs, so it'd be difficult to say where any visible bugs came from.
Note: We first posted on this here: Never saw this before: GlideXP
Site: http://wenchy.net/old/glidexp/

- Want to wrap OpenGL to Direct3D?
Well, you can always try SciTech Software's GLDirect, but consider this: some OpenGL ICDs for 3dfx Voodoo cards are effectively OpenGL-to-Glide wrappers. You can take a full ICD (like MesaFX) and combine it with a Glide3x-to-Direct3D wrapper like nGlide or dgVoodoo and see if that works.

In both cases extra layers of wrappers add additional complexity and potential for errors.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 1 of 15, by leileilol

User metadata
Rank l33t++
Rank
l33t++

There's also lots of fun to try with the wrappers that ship with Crime Cities. It has an OpenGL-to-Direct3D wrapper, an OpenGL-to-S3D wrapper, an OpenGL-to-MSI wrapper, an OpenGL-to-SGL wrapper, and also, it has an OpenGL-to-Glide wrapper...all wrappers written by Techland themselves. They also are unintentionally capable of running Q3A.

apsosig.png
long live PCem

Reply 2 of 15, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
leileilol wrote:

There's also lots of fun to try with the wrappers that ship with Crime Cities. It has an OpenGL-to-Direct3D wrapper, an OpenGL-to-S3D wrapper, an OpenGL-to-MSI wrapper, an OpenGL-to-SGL wrapper, and also, it has an OpenGL-to-Glide wrapper...all wrappers written by Techland themselves. They also are unintentionally capable of running Q3A.

Would these basically be MiniGL, then? Or something along those lines?

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 3 of 15, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

Another trick:
- early versions of dgVoodoo and Glidos, in 32-bit NTVDM command prompts, can make use of glide2x.ovl/glide.ovl to pass through Glide commands from DOS to their Windows Glide wrapper. DOSBox with Glide patch pretty much does the same. But, in theory, with Glidos and also with the DOSBox Glide wrapper patch, the Glide.dll/Glide2x.dll at the receiving end can be ANY Glide wrapper or native 3dfx Glide DLL, provided it wraps a similar version of Glide, with bugs/crashes here and there no doubt. Provided you're not trying to do something like expand the resolution to something the game did not support, this could quite possibly work. This will not work with dgVoodoo.

- Wrapper related: did you know there was a Glide 3.x for DOS? True story: when Glide went open-source on SourceForge.net, the people working on the project created a port of Glide 3.x to DOS. However, the prebuilt libraries on SourceForge are only for DJGPP, not Watcom C++ (which create the Glide OVL files, as far as I can remember). Daniel Borca's old website claims it should be compatible though if you build it from source. To my knowledge, no one has used it in any hobbyist DOS game so far. https://sourceforge.net/projects/glide/

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 4 of 15, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

I did this writeup over at nGlide forums and thought I'd bring it here:
http://www.zeus-software.com/forum/viewtopic. … hp?p=3998#p3998

Techland's "OpenGL" Drivers
Yes, Crime Cities is a Glide game - sorta. It's more like a miniGL game.

Crime Cities uses its own 3D engine that renders to OpenGL, but being as OpenGL on Windows for gaming was fairly new at the time, Techland considered that many videocards did not have full OpenGL ICD's and they wanted to support older cards, so they ended up creating OpenGL-like drivers for many cards and included them with the game. This includes 3dfx Glide.

These pages explain it:
http://web.archive.org/web/19981202024905/htt … glish/index.htm
http://web.archive.org/web/19981207072820/htt … lish/minigl.htm

This is basically what happened for id Software (and others) MiniGL games, although in that case many of the videocard manufacturers created the MinGL driver themselves. (Um, I think. Maybe it was id software instead.)

Here's some information on MiniGL: https://en.wikipedia.org/wiki/MiniGL

So Crime Cities (both the demo and the retail version) ships with Techland's "OpenGL-like" drivers (all named OpenGL32.dll) for 3dfx Voodoo cards (3dfx Glide, aka TC3DFX), Matrox Mystique cards (Matrox MSI, aka TCMSI), PowerVR Series 1 cards (PowerVR PowerSGL, TCSGL), and S3 Virge cards (S3 S3D, TCS3D), plus a generic Direct3D OpenGL driver of their creation (TCD3D). They also include SGI's "Cosmo" OpenGL32.dll, the generic Win9x OpenGL32.dll, and the beta OpenGL32.dll OpenGL ICD for 3dfx Voodoo series.

So in the case of Crime Cities and Glide, it's kinda like:
Crime Cities -> "OpenGL" -> TC3DFX -> Glide.
Adding nGlide to the mix would make it:
Crime Cities -> "OpenGL" -> TC3DFX -> Glide -> nGlide -> Direct3D
which is sorta pointless when it already can use Direct3D either through the ancient MS OpenGL for Win9x or through TCD3D.

We discovered Crime Cities and Techland's uniqueness over a year ago at VOGONS. Credit goes to leileilol. Since they implement a subset of OpenGL 1.x, they are also something fun to experiment with when you're using cards of that generation to try to get other OpenGL or MiniGL games working. You can rename their OpenGL32.dll to the filename required by the game.

In the thread on VOGONS you mention, leileilol was able to get MDK2 to work on a PowerVR Series 1 card by naming the Techland OpenGL32.dll file for PowerVR cards (let's call it TCPVR) "miniGL" as 3dfxgl.dll and then putting that in Windows/SYSTEM, as MDK2 is picky and strictly uses drivers from the Windows System folder.

Including games like Techland's Crime Cities, or miniGL games from id Software, in game lists that list "all Glide games" gets a bit interesting. Technically, you can think of these games as actually being OpenGL games. It's just that OpenGL for gamers really didn't exist or work well at the time (that's a very vague summary), so graphic card manufacturers and videogame publishers ended up making drivers that implemented the subset of OpenGL their games required to work. In many cases these drivers did not "directly use the cards" (most don't anyways) but called their various required 3D API DLLS, such as Glide2x.dll / Glide3x.dll for games that used id Software MiniGL's 3dfxgl.dll.

(And then there were hackers who, even though miniGL only implemented a subset of OpenGL, would take 3dfxgl.dll out of the game and rename it OpenGL32.dll and put it in game folders for games that only supported OpenGL... or other card owners with other miniGL's to OpenGL32.dll, and so on... because "it was faster" than their graphics card's OpenGL ICD, or other things. Mad compatibility issues abound, but sometimes you can get it to work. leileilol's experimenting with Techland's OpenGL driver for PowerVR cards proves that.)

leileilol puts it succinctly here:
Re: Do these DOS Glide games exist?

Claiming an API wrapper to another as native API support is like calling Direct3D games as Glide. […]
Show full quote

Claiming an API wrapper to another as native API support is like calling Direct3D games as Glide.

Native glide = GAME.EXE -> glide2x.dll/ovl || glide3x.dll

Native glide != GAME.EXE -> opengl32.dll (in folder) -> glide2x.dll
Native glide != GAME.EXE -> opengl32.dll (in system) -> 3dfxvgl.dll -> glide3x.dll

Still, wrapper authors like Zeus and game collectors like, um, Gamecollector have included these sort of games in their compatibility testing because wrappers require lots of testing with all sorts of games. They'll probably test it and add it to their compatibility list anyways. 😉 But in the detailed compatibility list, they'll mark it as using Techland OpenGL, and other games id Software MiniGL, and so on.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 6 of 15, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
F2bnp wrote:

Excellent write up 😀.

Techland were awesome, how many developers would do this, ever ?

Considering it seems that the videocard manufacturers made the MiniGL's, and Techland their "TCGL" (I'm gonna call it for now), I'm gonna guess none! 😁

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 7 of 15, by Gamecollector

User metadata
Rank Oldbie
Rank
Oldbie

3dfxvgl isn't minigl. It is the full OGL ICD for Voodoo2. So - you CAN rename it to opengl32.dll. And glsetup can install it as the system OGL driver.
Voodoo1/Rush/Banshee/3/4/5 uses 3dfxogl.dll but this .dll is the full OGL ICD too.
Both .dlls execute some (all?) opengl calls through glide3x calls and technically are OGL -> Glide wrappers.

Minigl can't be used as the system OGL ICD. It just lacks some basic functions.

Asus P4P800 SE/Pentium4 3.2E/2 Gb DDR400B,
Radeon HD3850 Agp (Sapphire), Catalyst 14.4 (XpProSp3).
Voodoo2 12 MB SLI, Win2k drivers 1.02.00 (XpProSp3).

Reply 8 of 15, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
Gamecollector wrote:

3dfxvgl isn't minigl. It is the full OGL ICD for Voodoo2. So - you CAN rename it to opengl32.dll. And glsetup can install it as the system OGL driver.
Voodoo1/Rush/Banshee/3/4/5 uses 3dfxogl.dll but this .dll is the full OGL ICD too.
Both .dlls execute some (all?) opengl calls through glide3x calls and technically are OGL -> Glide wrappers.

Fixed my typo.

Yeah, I've included them in our wrapper project despite not technically being promoted as "wrappers". Especially if they do ALL OpenGL 1.x calls (wish there was a way to test that).

It would be interesting to find out how many other early OpenGL ICDs are done in this manner. (Matrox / S3D / PowerVR / etc.)

Gamecollector wrote:

Minigl can't be used as the system OGL ICD. It just lacks some basic functions.

It never stopped people from renaming it to opengl32.dll and putting it in a GAME folder (instead of SYSTEM) folder to see what happened. Often times, crash!

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 10 of 15, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
Davros wrote:

I'd like a d3d to opengl wrapper that supports dx7 and earlier

DXGL is currently the one to watch. That or Wine on Windows (assuming you are on Windows.)
I talk about both here: Re: dgVoodoo 2 for DirectX 11

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 13 of 15, by Gamecollector

User metadata
Rank Oldbie
Rank
Oldbie

Well, I have tested 3dfxvgl.dll with realtech VR OpenGl Extensions viewer (renamed 3dfxvgl.dll to opengl32.dll and moved to this program directory).
It reports OGL 1.1 basic level. Ogl 1.2 (3/8), 1.3 (2/9) and 1.4 (2/15) are supported partially, as extensions.
As expected - if I try to test 3dfx minigl (1.49) - the program fails.

Asus P4P800 SE/Pentium4 3.2E/2 Gb DDR400B,
Radeon HD3850 Agp (Sapphire), Catalyst 14.4 (XpProSp3).
Voodoo2 12 MB SLI, Win2k drivers 1.02.00 (XpProSp3).

Reply 14 of 15, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
Gamecollector wrote:

Well, I have tested 3dfxvgl.dll with realtech VR OpenGl Extensions viewer (renamed 3dfxvgl.dll to opengl32.dll and moved to this program directory).
It reports OGL 1.1 basic level. Ogl 1.2 (3/8), 1.3 (2/9) and 1.4 (2/15) are supported partially, as extensions.
As expected - if I try to test 3dfx minigl (1.49) - the program fails.

Very well. People still tried it anyhow though (with errors and crashing galore) 😀

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto