Chris' WinGlide Page
Last updated August 5, 2000
[News]
[What is WinGlide]
[WinGlide credits]
[Installation instructions]
[WinGlide v1.03]
[Mesa WinGlide]
[WinGlide v0.5]
[Improving WinGlide performance]
[WinGlide compatibility]
[Advanced options]
[Future plans]
[Contact]
[Links]
8/5/00
What's next
Now that the final WinGlide release is out, I'll be able to focus on another project I've been working on for a
while: The multiprocessor OpenGL acceleration layer. A large part of the thread exit bug fix that went into
WinGlide v1.03 was actually developed and debugged while working on this project. It contains similarities to
the multiprocessor support in WinGlide in that it's a DLL and it uses a thread to send work to a second processor.
I ran into certain thread/event synchronization scenarios with this project that never came up during WinGlide
testing. This helped make the final thread exit bug fix considerably more reliable. I also need a new web page that
can, in part, serve as a home for some video cards rants that I just have to write something about, but that's a long
ongoing story. Although I don't have anymore WinGlide releases planned, I am planning on keeping this page here for
the foreseeable future.
7/30/00
WinGlide v1.03 released
WinGlide v1.03 has been released. This WinGlide release fixes a thread exit deadlock bug that can cause some applications
to hang when exiting or switching video modes on a multi-processor system. In addition to this bug fix, a number of minor
code cleanup updates are also in this release.
WinGlide v1.03 can be downloaded from the [WinGlide] section of the page.
WinGlide v1.03 for Glide 3.0 can be downloaded from the
WinGlide for Glide 3.0 page.
7/3/00
Plans for a final WinGlide release
I have one more WinGlide release planned. This release will only be a minor update and will contain a fix for the thread
exit deadlock bug that occurs on multi-processor systems. It has taken a while to come up with what I feel is a good
solution to this problem. Some of my previous attempts were able to fix the current deadlock problem, but introduced other
potential deadlock situations. There are also a couple of minor code cleanup things I'd like to add and the new compiler
is generating a slightly smaller DLL.
3/1/00
Remember, Voodoo Graphics and Voodoo2 only
Since I'm still getting a couple questions about Voodoo3s, I'm making this update to remind everyone that WinGlide does not
work with and is not intended to work with Voodoo3 based graphics cards. It only works with 3D only cards with 3dfx
chipsets such as those that use the Voodoo Graphics or Voodoo2 chipset. WinGlide brings a certain amount of windowed
rendering support to these 3D only cards by copying completed frames back from the card and drawing them in a window on the
main video card.
Since WinGlide only works with Voodoo Graphics and Voodoo2 based cards, it will not be able to help with any windowed
rendering problems you may have with a Voodoo3 card. If you are having trouble with windowed rendering on a Voodoo3
graphics card make sure to try out the latest drivers from
3dfx for your card.
If you actually did try to install the supersampling capable WinGlide release with a Voodoo3 card and thought you saw
something different or perhaps actually did see something different, there are a couple of possible explanations for this:
1. It could just be an imagined difference.
2. I suppose it's possible that some sort of unexpected side effect occurred that could cause things to be rendered
differently. I think this is very unlikely, but it might be possible. On the slight chance something like this did occur,
you would probably not be observing supersample antialiasing at all.
Some indications that the supersampling capable WinGlide release is not installed correctly
If you installed the supersampling capable WinGlide release and are getting over 20 frames per second at 400x300 antialiased
with anything, you probably do not have it installed correctly. On the vast majority of the hardware out there, it
is not possible for it to get over 20 frames per second at 400x300 antialiased. Throughput when reading data back over the
PCI bus from a Voodoo Graphics or Voodoo2 based card guarantees that its performance will never surpass this level on most
hardware. The only possible exceptions to this that I can think of right now would be a Voodoo2 based card running in an
AGP slot (I believe Quantum 3D made one of these) or a 66 MHz capable Voodoo2 based card (if such a thing exists) in a
66 MHz PCI slot.
Visit the WinGlide news archive for older news.
You can download old versions of WinGlide from the
WinGlide file archive.
WinGlide allows Voodoo graphics cards to output to a window.
Besides the version of WinGlide designed to work with Mesa, I've tested the other versions of WinGlide on this page with
GLQuake .97 and Quake 2 unless otherwise stated.
Other programs that use Glide may or may not work with WinGlide.
Although I have never seen WinGlide running with a Voodoo2, I have received emails from people who are successfully using
WinGlide with Voodoo2s.
Some important notes about WinGlide
- Frame rate will go down considerably when using WinGlide to run glide applications in a window.
- Possibly incompatible with some applications. Not all of glide2x.dll is passed through.
- Will not work with applications that do not supply a window handle.
See the WinGlide FAQ for more information about WinGlide (The FAQ is still being worked on and only
covers a few things right now).
WinGlide v0.5 was written by Justin Frankel of
Nullsoft. All of the versions of WinGlide
that I have written and made available on this page are based on the source code Justin released
with WinGlide v0.5.
WinGlide installation instructions
|
Each version of WinGlide comes with the file glide2x.dll. To install WinGlide, put this file in
the same directory as the program you want to use WinGlide with. To use WinGlide with Quake 2,
put the included glide2x.dll in your Quake 2 directory. The glide2x.dll that comes with WinGlide
is not a complete implementation of Glide and needs the original glide2x.dll from 3Dfx to
function properly.
Many versions of WinGlide from this page also read configuration information from an ini file called
wg.ini. This file should also be put in the same directory as the WinGlide glide2x.dll.
DO NOT copy the WinGlide glide2x.dll into your Windows or Windows\System directory.
WinGlide supports multiple modes of operation. These modes can be selected by editing the [Mode]
section of the ini file wg.ini. For more information about a specific mode, visit the section of
the page for that mode:
[B2 WinGlide mode]
[StretchBlt WinGlide mode]
[Overlay WinGlide mode]
[Off-screen Surface WinGlide mode]
Information about the various modes supported by WinGlide can also be found in the readme.txt file
that comes with WinGlide. Many of WinGlide's features in addition to choosing a mode can be
configured in its ini file wg.ini. The readme.txt file contains information about wg.ini settings
and instructions for configuring these settings.
DO NOT copy the WinGlide glide2x.dll into your Windows or Windows\System directory.
WinGlide v1.03: wg103.zip
Some notes about mode settings
The [Mode] section of wg.ini contains a key for each mode that WinGlide supports. To select a mode, set the
key in the [Mode] section with the name of the desired mode equal to 1 and make sure that all other keys in
the [Mode] section are set equal to 0, commented out with a leading ; in front of them, or not present in the
[Mode] section at all. See the readme.txt file for additional details and examples regarding mode settings.
WinGlide for Glide 3.0
A version of WinGlide that works with some programs that use Glide 3.0 can be downloaded from the
WinGlide for Glide 3.0 page.
B2 WinGlide is generally the most compatible of the WinGlide modes so it is the mode to try first
or to fall back to if you are having problems with one of the other modes.
- Designed to be used with 3Dfx OpenGL Beta 2 or 3Dfx OpenGL Beta 2.1 to support some programs
that use OpenGL to render to a single window. Also works with the MiniGL.
- Programs that use OpenGL to render to multiple windows are not supported.
- Handles window resizing.
- Has gamma correction support.
- Has MMX optimizations.
- Will not work with scanline interleaved systems.
- Supports multi-threading for improved performance on multi-processor systems.
StretchBlt WinGlide allows the output displayed by WinGlide to be stretched. The two other modes
[Overlay WinGlide mode]
and
[Off-screen Surface WinGlide mode]
that use DirectDraw to stretch the WinGlide output are likely to perform better than this mode so you
may want to use one of these modes instead if your video hardware supports the right features. If you
are having reliability problems when using one of the WinGlide modes that supports stretching and uses
DirectDraw, there is a chance that using StretchBlt WinGlide instead could solve these problems.
- The output window can be stretched.
- Only use this WinGlide mode with a program that displays its output in a fixed sized window
with a title bar. WinGlide will modify this window and give it resizing borders so that the
output can be stretched.
- Has gamma correction support.
- Has MMX optimizations.
- Will not work with scanline interleaved systems.
- Supports multi-threading for improved performance on multi-processor systems.
Overlay WinGlide uses DirectDraw to gain access to hardware overlays and allows the output displayed
by WinGlide to be stretched. This WinGlide mode offers better performance than some of the other
modes that use intermediate DIB sections in system memory because it copies each frame from the 3Dfx
card directly to the 2D card. If you have a multi-processor system running Windows NT, B2 WinGlide
should be faster than Overlay WinGlide when B2 WinGlide's multi-threading feature is enabled, but unlike
Overlay WinGlide, B2 WinGlide does not support stretching.
To use Overlay WinGlide, you must have a 2D video card that supports hardware overlays through DirectDraw.
A video card that supports RGB 565 overlays is strongly recommended.
The Overlay WinGlide hardware compatibility list has
information about Overlay WinGlide compatibility with various video cards.
- Uses hardware overlays to boost performance and add additional features to WinGlide.
- Requires DirectDraw and a video card that supports RGB 565 or YUY2 hardware overlays.
- The output window can be stretched to any size supported by your video hardware. Many video
cards will support stretching an overlay with interpolation at no performance cost. With this
feature, you can use a low resolution like 320x240 or 400x300 to get a good framerate and then
stretch the output window so it covers more of the screen without reducing the framerate.
Stretching with interpolation should also provide better image quality than pixel doubling.
- Only use this WinGlide mode with a program that displays its output in a fixed sized window
with a title bar. WinGlide will modify this window and give it resizing borders so that the
output can be stretched.
- Has the option to use a double buffered or triple buffered overlay for improved performance.
- If WinGlide is unable to clip the overlay surface it is using for some reason and it is covering
up other windows, it is possible to make the overlay go away by minimizing the window displaying
the overlay.
- Has gamma correction support.
- Has MMX optimizations.
- Will not work with scanline interleaved systems.
Tips for getting Overlay WinGlide to work on your computer
If you do not see anything in the window after the application being used with WinGlide has
finished initializing, your video card may have a minimum overlay stretch factor that is greater
than 1. Make the window larger or maximize it to see if the overlay will start working. Also,
try starting the application at a low resolution such as 320x240 so that there will be more room
to make the window larger.
Sometimes Quake 2 will capture the mouse, preventing you from moving or resizing the window.
To move or resize the window, bring the console down so that you can use the mouse again or
make another window active and then click on the title bar or resizing border of the inactive
Quake 2 window.
If you are running Quake 2 at 512x384 or 640x480 and cannot get overlays to work (possibly
because of a minimum overlay stretch factor that is too large), you can press Alt+Enter to
tell Quake 2 to switch back to full screen.
If you have the DirectX control panel applet that comes with the DirectX 5 SDK, you can see what
your minimum and maximum overlay stretch factors are by looking at the overlay capabilities on
the DirectDraw tab. If your video card does not support overlays, this can also be determined by
looking at the information reported on the DirectDraw tab.
Running GLQuake or Quake 2 at 320x240 and stretching the overlay to whatever size you want the
output window to be should give you a very playable frame rate. 400x300 will be slower but
should still be able to provide a decent frame rate with improved image quality over 320x240.
Overlays require extra video memory. If you are running at a high resolution on a 2MB video
card, there may not be enough memory left to create the overlay. The number of bytes required
by the overlay is equal to width * height * 2. A 640x480 overlay requires 640 x 480 x 2 =
614.4KB. A 320x240 overlay only requires 153.6KB. The width and height used to calculate the
memory needed by the overlay is the width and height that the Glide application is using, not
the width and height of the stretched output window. Running GLQuake at 320x240 and stretching
the output window to 640x480 (or any other size supported by the hardware) would still only
require 153.6K of video memory.
Overlay WinGlide hardware compatibility list
Click here to see the Overlay WinGlide hardware compatibility
list.
Click here if you would like to submit information about
Overlay WinGlide and your video card to the Overlay WinGlide hardware compatibility list.
Some additional notes about overlay stretching
Overlay WinGlide requires a 2D card that supports the stretching of hardware overlays. Most 2D
cards that support the stretching of overlays will stretch the overlay at no cost.
The benefit of running GLQuake at a low resolution and stretching the output window is a higher
framerate. 320x240 stretched to 640x480 will not look as good as 640x480, but it will run much
faster and it should look better than pixel doubled 320x240 since most cards that support
hardware overlays support stretching with interpolation. Many cards that support hardware
overlays can also stretch the overlay to any size at no performance cost. You can choose a base
resolution of 320x240 or 400x300 to get a good framerate and then stretch the window to whatever
size you want it to be. This no cost stretching can be very beneficial if your running at a
resolution of 1024x768 or higher because a 320x240 or 400x300 window is small at these
resolutions.
My OEM Diamond Stealth 3D 2000 (ViRGE 325) supports hardware overlays but has some limitations.
Certain cards including my card have a minimum overlay stretch factor that varies depending on
which video mode the card is running and which refresh rate is being used. At 800x600x32K at
85Hz, my card has a minimum stretch factor of 2. This means that I need to run GLQuake or
Quake 2 at a resolution of 320x240 and then resize the window so that its width is greater than
or equal to 640 in order to make the overlay work. At 1024x768x32K, if I run GLQuake or Quake 2
at 320x240 and stretch the output window so it almost covers the desktop or maximize it, the
overlay will work but only if the refresh rate is less than or equal to 75Hz. If you have the
DirectX 5 control panel for Windows 95, you can see what the minimum and maximum overlay stretch
factors are for your card and current resolution and refresh rate by looking at the overlay
capabilities on the DirectDraw tab.
Off-screen Surface WinGlide mode
|
Off-screen Surface WinGlide provides a way to get hardware stretching support on some video cards
that do not work with Overlay WinGlide. Like Overlay WinGlide, Off-screen Surface WinGlide also
requires certain hardware support.
- Requires DirectDraw and a video card that supports off-screen YUY2 surfaces and functions
that can StretchBlt data from these surfaces to the primary surface.
- The output window can be stretched.
- Only use this WinGlide mode with a program that displays its output in a fixed sized window
with a title bar. WinGlide will modify this window and give it resizing borders so that the
output can be stretched.
- Has gamma correction support.
- Has MMX optimizations.
- Will not work with scanline interleaved systems.
To use Off-screen Surface WinGlide mode, it will be necessary to make another change to the default
wg.ini file that comes with WinGlide in addition to selecting the Off-screen Surface WinGlide mode.
The UseFourCCSurface key in the [Overlay] section of wg.ini will need to be set equal to 1. The
FourCC key must be set equal to YUY2 (this is the default setting). Additional details about these
settings can be found in the readme.txt file.
Gerhard Pfeiffer's version of WinGlide that works with Mesa allows some programs that use
Mesa Voodoo driver
to be run in a window on 3Dfx fullscreen only 3D cards.
More information about the Mesa Voodoo driver
If you would like to learn more about the Mesa Voodoo driver, visit the
Mesa Voodoo driver page.
If you would like to learn more about Mesa, visit the
The Mesa 3-D graphics library page.
DO NOT copy the Mesa Voodoo driver dlls into your Windows or Windows\System directory.
DO NOT copy the WinGlide glide2x.dll into your Windows or Windows\System directory.
Gerhard Pfeiffer's WinGlide that works with Mesa:
wglidepg.zip
Gerhard Pfeiffer's version of WinGlide with Chris' WinGlide performance enhancements:
vrewg095.zip
Mesa Voodoo Driver dlls: Can be downloaded from
Phil Frisbie's Programming Page
Justin's WinGlide v0.5. Right now, this is the only version of WinGlide on this page that will
work with scanline interleaved systems.
With source code: wglide05.zip
Improving WinGlide performance
|
WinGlide should run fastest if your video card is set to a 16 bit per pixel video mode. Compared
to the other versions of WinGlide, Overlay WinGlide's performance will probably not be hurt as
much (if at all) when your video card is not set to use 16 bits per pixel.
Environment variables that help WinGlide performance:
SET SST_FASTMEM=1
SET SST_FASTPCIRD=1
Gamma correction and P6 WinGlide performance
On P5 processors (Pentium and Pentium MMX), enabling gamma correction will decrease WinGlide performance a little bit.
On P6 processors (Pentium Pro and Pentium II), enabling gamma correction can increase WinGlide performance considerably.
For maximum performance on P6 processors, always enable WinGlide's gamma correction feature. If you do not want gamma
correction but want improved performance, enable gamma correction and set the gamma correction factor to 1.0. Enabling MMX
and gamma correction will offer the best performance on Pentium II processors. Based on the benchmarks I have received,
using WinGlide v0.91 with gamma correction enabled and UseP5Code=1 will offer the best performance on Pentium Pro processors.
Although the readme.txt that comes with WinGlide v0.91 says that UseP5Code should not be set to 1 when used with P6
processors, setting it to 1 will actually result in better performance on P6 processors.
WinGlide Benchmarks
If you would like to see how WinGlide performed on my computer, I posted some
WinGlide benchmarks
on August 7, 1998.
Why does WinGlide work with GLQuake and Quake 2 but not certain other programs that use Glide or use Glide through the
3Dfx MiniGL or 3Dfx OpenGL Beta 2.1?
Right now, WinGlide will only run programs in a window if they are designed to be run in a
window. If a program wants to run fullscreen, WinGlide will just pass everything through to
the glide2x.dll in the windows or system directory and the program should run just like it would
if WinGlide were not installed. Since the 3Dfx Voodoo cards are fullscreen only cards there are
not many programs that are designed to use cards with Voodoo chipsets and have the option of
running in a window.
Does WinGlide work with programs that use OpenGL to render to multiple windows?
No.
3Dfx OpenGL Beta 2.1 and the Mesa Voodoo driver only support programs that use OpenGL to render to a single window. Since
multiple windows are not supported, many programs that use OpenGL will not work with WinGlide and 3Dfx OpenGL Beta 2.1 or
the Mesa compatible version of WinGlide and the Mesa Voodoo driver.
I have received many emails asking if 3D Studio MAX R2 will work with WinGlide. It will not work because it uses OpenGL to
render to multiple windows.
Advanced options (use with caution)
|
Loading a renamed glide2x.dll with WinGlide v1.00
An optional Glide2x key can be added to the [WinGlide] section of wg.ini. This can be used to tell WinGlide to load a
renamed glide2x.dll from the system directory. For example, if Glide2x=glide2y.dll in the [WinGlide] section, WinGlide
will try to load Glide 2x functions from the dll in the system directory called glide2y.dll. By loading a renamed
glide2x.dll, it is possible to rename the glide2x.dll from 3Dfx that is in the system directory and then put one copy of
WinGlide in the system directory and tell it to load the renamed glide2x.dll from 3Dfx.
WinGlide will always read the value of the Glide2x key from the wg.ini that is in the same directory as the WinGlide
glide2x.dll. When reading other keys from wg.ini, WinGlide will first look for a wg.ini in the directory of the application
that is using WinGlide and read initialization from that wg.ini if it exists. Otherwise, WinGlide will read initialization
information from the wg.ini in the same directory as the WinGlide glide2x.dll if it is different than the directory of the
application that is using WinGlide.
If you decide to install WinGlide is the system directory, this wg.ini search order can allow default WinGlide settings and
the name of the original glide2x.dll from 3Dfx to be specified in the wg.ini in the system directory. If you want to use
different WinGlide settings with certain applications, simply put a wg.ini with the different settings in the directory of
that application and WinGlide will read initialization information from that wg.ini. Since the Glide2x key is always
read out of the wg.ini file in the same directory that WinGlide is in, you will only have to list this key in the one
wg.ini in the system directory even if you have many other wg.ini files in the directories of other applications being used
with WinGlide.
Adding some internal performance measurement capabilities and a way to view this information while WinGlide is running
would be cool.
If you have any questions or comments about WinGlide, send me an email at
cwdohnal@ucdavis.edu
Visit |
 |
Still under construction but if you have NFS SE, visit the The Need for Speed SE page. |
Blue's News
Winamp
3Dfx Interactive
id Software
Voodoo Extreme
DemoNews
Nullsoft's WinGlide page
3DFILES.COM
Designed with Notepad.
Copyright 1999-2000 Chris Dohnal