Readme for the Glide3-to-OpenGL-Wrapper Version 1.3b (c) 2004 by Sven Labusch

content:
1. Preface
2. Files included
3. Requirements
4. Installation
5. File-descriptions
6. References/technical aspects
7. Version history
8. other


				1. Preface


First of all: Hello everybody!
To make it short: i was disappointed about the performance Diablo2 shows in the Direct3D-mode.
Because of the fact that the game runs far better in GLIDE-mode, I tried to find a way, to make the game run in GLide-mode even on my computers at home. Ther were two problems:
1. Glide-Device-Driver exist only fpr Voodoo-Graphiccards. Diablo2 needs at least a Voodoo-Card of the Voodoo-Rush-type, but my computers have "only" Geforce2MX-cards.
2. there are many GLIDE-wrappers, but I haven't found any that runs fine on my computers.
The patch 1.10 for the game didn't bring any improvements, so I decided to write my own wrapper, where I again want to point out:
This GLIDE-wrapper is explicitly written for the game Diablo2 (and its expansion "Lord of Destrucion", of course;)). You have to assume that it won't work together with other programs or at least that it will produce incorrect output.

Supplement:
This is the version 1.3b of the wrapper.
Big thanks go to "Shabazza", "Luzi", "mindphlux", "UnserenToten", "ChaosEnergy", "acesulfam"  and the staff from the indiablo.de-forum.


				2. Files included


4 files:

readme.txt	12692 Bytes
liesmich.txt	15549 Bytes
glide3x.dll	87552 Bytes
gl32oglinit.exe	78336 Bytes


				3. Requirements


needed:
- OpenGL supporting Graphiccard
- same requirements as the game
recommended:
- Graphiccard that supports OpenGL1.3-Extensions
- Graphiccard equal to Geforce256 or better with at least 32MB video-memory
- at least 256MB main-memory


				4. Installation


There are two possibilities:
1.
 Copy the file "glide3x.dll" into the windows-system-directory (i.e. "c:\windows\system").
2. 
 Copy the file "glide3x.dll" into the game-directory (i.e. "c:\games\diablo2").

The program "gl32oglinit.exe" creates a file named "gl32ogl.ini", this one has to be copied into the game-directory if the wrapper has to run with "non-default"-settings.

'cause of the fact that this wrapper ist explicitly written for this one game, I would prefer the 2nd way.

Once the files are copied, you have to run the Vid-Test of the game and to choose Glide.


				5. File-descriptions


  readme.txt
That's the file you are reading now.

  liesmich.txt
Like the readme.txt, but in german.

  glide3x.dll
Thats the base-file of the wrapper.
If the wrapper recognizes an error, a file named "gl32ogl.err" will be created, in which the problem will be described.

  gl32oglinit.exe
Here you can change some settings of the wrapper:

corner:
defines in which corner of the screen the infos have to be displayed, if any.
default setting: no

sort order:
with this button you can change the order, in which the infos have to be displayed.

framerate:
defines, if the framerate has to be displayed.
default setting: activated

clock:
defines, if the local time has to be displayed.
possible settings:
no
digital
small analogue
greater analogue
default setting: no

texturemass:
defines, if the wrapper has to display the total memory-amount needed for the textures.
default setting: deactivated

MB texture-memory:
defines, how much voodoo-texture-memory has to be emulated.
It is not advisable to set up too much texture-memory: part of it has to be taken out of the main-memory. 
How much is "too much"? That depends on the computer and the installed operating system. I would recommend the following:
on computers with:
less than 256MB main-memory: 8MB-16MB texture-memory
exactly 256MB main-memory: 16MB-32MB texture-memory
more than 256MB main-memory: 32MB texture-memory or more
after all, the emulated texture-memory should not lead the wrapper to create more textures, than the graphiccard can handle. How much textures are created by the wrapper can be analyzed with the "texturemass"-switch.
default setting: 16MB

GL_EXT_paletted_texture:
defines if this OpenGL-extension has to be used, if provided by the OpenGL-driver. With this extension, the wrapper needs only 8Bit/Texel, so that less physical texture-memory is needed with no cost of optical quality.
default setting: activated

GL_EXT_shared_texture_palette:
defines, if this OpenGL-extension has to be used, if provided by the OpenGL-driver and if GL_EXT_paletted_texture is used. This extension causes the OpenGL-driver to bind one single palette to all textures rather than to bind every single texture with its own palette. So this extension reduces the overhead.
default setting: activated

GL_EXT_packed_pixels:
defines, if this OpenGL-extension has to be used, if provided by the OpenGL-driver and if GL_EXT_paletted_texture is NOT used. This extensions leads into a faster texture-upload.
default setting: activated

DirectX for initialization:
defines, if the wrapper has to use DirectX in fullscreen-mode for setting up the resolution and the gamma/contrast-setting.

smooth resolution-change:
if activated, the wrapper does not switch back shortly to the desktop-resolution when joining/leaving a game. But on the other hand, if you switch back to the desktop by ALT-TAB, the monitor stays at the game-resolution if DirectX is not used.
default setting: activated

fixed gamma-table:
if activated, the wrapper takes control over the gamma/contrast-setting. If activated for the first time, the gamma/contrast-setting has to be done in the game first. The wrapper then creates a file named "gl32ogl.gma" in which these settings are stored.
default setting: deactivated

window-mode:
defines, if the wrapper has to draw the game-scene into a window and not on the whole screen.
default setting: deactivated

centred:
defines, if the wrapper has to draw the window in the centre of the screen rather than in the upper left corner.
There is an issue in the game, when the window is centred: at opening/closing a half-sided menu (like the inventory) the mouse-pointer jumps to the wrong place.
Is ignored, if window-mode is deactivated.
default setting: deactivated.

captured mouse:
when activated, the mouse-coursor cannot leave the game window. Prevents from accidently clicking outside the screen.
There is an issue in the game, when the computer is running with multiple monitors: even in fullscreen-mode the mouse-pointer can leave the screen and move to the other ones, if this setting is deactivated.
default setting: deactivated

english/Deutsch:
switches between these two languages:
default_setting: deutsch

save:
saves the settings in the file named "gl32ogl.ini". If not saved, the wrapper uses the default settings automatically.

quit:
leaves the progam. The settigs are not saved. You have to save the settings manually, if you want to make them taken by the wrapper.


				6. References/technical aspects


hmm, ok, where shall i begin? Ah yeah, let's start, what this wrapper makes so different  to the Direct3d-mode:
1. the Direct3d-mode of Diablo2 creates far less Textures than the Glide-mode, so the Direct3d-engine has to reload the Textures more often.
2. the wrapper uses OpenGL, the Direct3d-mode DirectX6. DirectX6 does not support 8-bit-textures.
3. the texture-administration differs between DirectX,OpenGL and Glide.
DirectX is totally object oriented, OpenGL is "opject using" and Glide has no real texture-administration: the game engine has to do it by its own.
Thats why, programming in glide is more complex, but therefore you can access the graphiccard more directly, what is really favourably if you have to use dynamic textures. And here's the key: Diablo2 has so much textures, that they won't fit on any graphiccard, so nearly all of the textures have to be loaded dynamically. And in this point Direct3D fails totally: the dynamic loading of textures is damn slow (in OpenGL its average).
As a work-around of this issue, the wrapper has to create far more physical textures , than are used in Glide. It is posssible, that the wrapper creates 64MB physical textures, when it it set to emulate only 16MB voodoo-texture-memory.

I want to mention, that you don't have to make hasty reproaches at Blizzard's programmers:
if you turn back time and look at the technical state of the art, as it was, when the game had been programmed, you had the problem, that you had to econimze the few resources which were available. With this in mind, the Direct3d-engine of Diablo2 uses as much performance as is reachable with DirectX6. But that's not much, or "state of the art" has changed, so that it could be more if you write a whole new engine..... and switch to OpenGL .... or the graphiccard-manufacturer release REAL Glide-device-driver.

But back to wrapper itself.
it uses (as already mentioned) OpenGL and has some requirements.
following OpenGL-extensions are needed for totally correct rendering:
GL_EXT_texture_env_combine
GL_EXT_bgra
the following OpenGL-extensions are favourable:
GL_EXT_vertex_array
GL_EXT_paletted_texture
GL_EXT_shared_texture_palette
GL_EXT_packed_pixels

so a graphiccard providing OpenGL1.3 is needed for correct rendering.
if the extension GL_EXT_paletted_texture is provided, the wrapper can use 8bit-textures instead of 16bit-textures, what speeds up the texture-reloading significantly.

The wrapper uses OpenGL, that's why there is the 60Hz-bug, too, if you have Windows2000 ot WindowsXP installed as the operating system and if the wrapper is not set to use Directx for initialization.
There are many solutions for solving this problem: just search the web or take a look into the internet-presentations of some game-magazines.


				7. Version history


version 1.3b
in the glide3x.dll:
combiner-modes changed, the problem with the texture-outlines ist solved, switching between combiner-modes ist faster now.
If GL_EXT_vertex_array is not provided by the Graphiccard, the wrapper uses its own routines, so the wrapper works on those machines, too. GL_EXT_texture_env_combine and GL_EXT_bgra are not totally necessary anymore. But there will be glitches, if they are not provided by the driver. Changes made to the settings of the wrapper are taken on the fly: switch back to desktop, change settings, turn back to game, ready.
in the gl32oglinit.exe:
Frontend changed
switch for info sort order added
switch for language-change added
renamed the "readme.txt" to "liesmich.txt" and translated it to the now english version "readme.txt"

version 1.3a
in the glide3x.dll:
few changes at the combiner-modes. Compatibility-issues should be appear less often.
in the gl32oglinit.exe:
switches added:
"Uhr"
"zentriert"
"DirectX zum Einrichten"
"feste Gamma-Tabelle"
"Maus begrenzen"

version 1.3
in the glide3x.dll:
GL_EXT_vertex_arrays are used and required. The wrapper can be advised to not switch back to desktop-resolution first when changing resolution. Joining/leaving a game is far faster this way, but when switching manually to the desktop, the resolution stays at the game-resolution.
in the gl32oglinit.exe:
switch added: "weicher Auflösungswechsel"

version 1.2
in the glide3x.dll:
texture-management of the wrapper modified, so that less processor-power is needed, bur therefor more physical texture-memory is needed. Beside of the framerate it is possible let the wrapper show, how much physical textures are created.
in the gl32oglinit.exe:
switch added: "stats"
range for the texture-memory reset to 8MB-108MB

version 1.1
in the glide3x.dll:
changed the texture-memory-configuration told to the game, the game manages the textures more efficiently. Upload of 16Bit-textures changed.
in the gl32ogl.exe:
splitted the switch "8-Bit-Texturen" into three switches:
"GL_EXT_palettized_textures"
"GL_EXT_shared_texture_palette"
"GL_EXT_packed_pixels"
default setting for texture-memory reset to 16MB
range for the texture-memory reset to 8MB-64MB


				8. other


This wrapper is freeware, it may be copied as long as the files stay unchanged and altogether.
At the programming, my highest priority was to make a stable running program, but unfortunately i can't give any warranty that the wrapper runs perfectly on every system. There are too much possibilities which could cause the wrapper to malfunction. So you have to use this program at your own risk.

But anyway: on the computers where i use this wrapper now, i have a significantly performance-increase.
bye
 Sven Labusch