Glide3 - a topic of its own
Now when glide 3 has arrived what can we expect of it?
I have been working with glide3 for a while and I have had the pleasure of witnessed
some speed improvements but most of all PROBLEMS. I have had a lot of problems with
the drivers and with inconsistencies and errors in the glide3 manual. Actually it took
me over two weeks to get clip coordinates to work properly...
As I already have told you it have been a lot of bugs in the glide3 drivers. Although
I have problems I don't think it's very serious problems, actually when I told 3dfx
about my problems they fixed them and sent me new drivers in a time of some days and my
problems was solved! I think that such a speedy responce from such a big company
is really great. If all software companys would act like 3dfx I think software would be a lot more
bugfree.
In this article you can find some info on how too manage glide3 before you get crazy,
I was very close to that I can tell you!
First of all:
In glide3 you have two kinds of coordinate systems.
- Window Coordinates
- Clip Coordinates
Window coordinates is exactly the same as glide2 coordinates. The application provides
x,y and oow and optionally r,g,b and texture coordinates. In glide2 you had too maintain
perspective projection of your own but in glide 3 you have the new clip coordinates.
In clip coordinates glide is doing perspective projection. This means that you need
to provide x,y and w. Glide is performing perspective projection using this formula:
xp = (x/w+1)(HorResolution/2)+valuex
yp = (y/w+1)(VerResolution/2)+valuey
This means that you need to specify x in the range of -w..w and y in the range of -w..w if
you want your pixel visible on the screen. I think the name clip coordinates is some confusing
because glide isn't performing any clipping at all. The clipping is even worser in glide3
as the old glide util clip functions is removed. As you can't clip polygons in 2d anymore
because glide is performing perspective projection we have too do real 3d clipping.
The 3d clipping is quite easy to do anyway since we have a 90 degree FOV (field of view)
in both x and y. This is caused of glides perspective projection formula.
(It seems like the guys at 3dfx knows a great deal of 3dengines...)
I have put up a new glide3x.dll for voodoo2 card in the filearea. The reason for this is that currently
the reference drivers at 3dfx homesite is buggy.
If you want to really watch glide3 in action
I recommends that you takes a look at my glide3 sample. It contains some
new glide3 functions such as clip coordinates and support for triangle fans and
the new glide3 grDrawVertexArray function call that is using the new triangle setup engine on
voodoo2 cards. It works on old voodoo's too but don't makes use of a triangle setup engine as
voodoo cards doesn't have one... All this is maintained by glide3 happily.
As the new glide3 is coming I guess you lccwin32 users want your compiler to work with
glide3 too. The steps for using glide3 with lccwin32 is as follows:
- Download glide3 sdk from 3dfx.
- Unzip it to some directory.
- Copy all glide3 header files (h files (glide.h glideutl.h and so on...)) to your lccwin32 include directory.
- Download the lccwin32 glide3 fix from the file section of this site.
- Unzip it to some directory.
- Copy the glide3.h, 3dfx.h and glideutl.h files included in the fix to your lccwin32 include directory.
- When you writes your glide program you need to link your program with the glide3.obj file in the
glide3 fix package you downloaded.
- When you writes a program you must call the LoadProcAddresses function before you
calls any glide funtion. This routine loads the glide3x.dll functions dynamically to
your application. (This is done automatically in MSVC++ but in lccwin32 we needs to
do this manually.)
You also need to #include the glide3.h file in the source where you are calling the
LoadProcAddresses function from.
- You can download a demonstration program that does all this. If you can compile
and run the program you can use glide3 with lccwin32.
A last little note:
My old article about getting lccwin32 to work with glide2x have some problems. First when
you do implib of glide2x.dll implib is creating glide2x.lib. The problem
is that a program that is linked to that glide2x.lib file requires glide2x.dll in the
directory where you did implib on. All users that is using your program must have
glide2x.dll in that directory. This isn't good but I didn't know this when I wrote the
article... My new method in the glide3 fix doesn't
have this problem anymore as the glide3 functions is loaded dynamically from
the users REAL windows system directory and that directory can vary between
windows installations.