Code for 3dfx without ruin yourself - the guide for us poor people...
The plauge says:
- "If you think my english is WeIRd then you are right, english isn't my strongest side, so I hope you can stand the pain!"
Are you like me often out of money?
When I first wanted to start to code 3d graphics with the 3d Blaster Voodoo2 card (It costed
me a fortune only that alone!) I couldn't dream about purchasing Microsoft Visual C++, the development tool easiest to configure for Glide (3dfx own 3d graphics API), of cource there are others such as Borlands and Watcoms C/C++ compilers which is easy to use with Glide but the big problem with these compilers is that they are expensive and as you will see we can use a free C compiler system to do the same things, just requiring some modifications and tricks to be compatible with the Glide SDK. In this guide I will show you how to do this step by step but first lets talk about 3d graphics.
You not only need a compiler system to make your super graphics programs/games/demos,
you need a 3d editor, a good 2d graphics program (to make the textures) and of course talent! If you are serious about 3d graphics you have most likely checked out 3d Studio MAX, a wonderful 3d graphics enviroment and I guess you have looked at the price to...
There are "cheaper" alternatives such as the wonderful Lightwave series but to expensive for me
anyway.
To begin with you really need a free 3d editor, I have looked around the Internet for a free,
good 3d editor to use as a tool for making the models to my 3d games, I have only found
one editor that is good enough for me and if you look at the features this editor has you are most likely going to be amazed about that this program is free! It's a realtime 3d graphics modeller/renderer with texture mapping support with multiple light sources and a lot of good tools and have plugin support!
One thing which is VERY good with this program is that it includes a lot of information/libraries/
headerfiles to be used by programmers which want to use it for programming applications/games/demos that uses the file format generated by the 3d editor, perfect for
us 3d graphics phreaks! A important feature is that it can import models in the Lightwave format, very nice. The author tells use that in the future this program will include hardware accelaration support through Direct3d and that it will support common 3d graphics fileformats such as 3df, the format used by 3d Studio! One disappointment with it is that it has some minor bugs but they don't affects the modelling, just save your models often! The program is called Genesis 3d and can be downloaded from
this site.
I just say one thing, very much thank you to the author!
Now you are probably wondering about the compiler system, don't worry, LccWin32 is a good
free C compiler system that I after some work have got to work with Glide, it works with DirectX
to! LccWin32 is a very good alternative for us 3d graphics programmers because the floating point performance is good and that it has support for MMX instructions in the inline assembler
and directly in the C language itself! The compiler system includes many tools including
resource editor, GUI programming enviroment, compiler, linker, make tool and many more.
You can download LccWin32 from the LccWin32 homepage.
Ok, at last you need a 2d graphics program, you can download Paint Shop Pro
here, a very good shareware program!
Have you downloaded and installed the programs, if you have you are propably more than ready to enter the third dimension, now follow the steps to make the LccWin32 C compiler work with Glide SDK. If you haven't downloaded and installed Glide SDK then download it from
3dfx's homesite before you proceeds. When you have downloaded Glide SDK you don't need to run the setup program, just use WinZip to extract the files. The Setup program of the Glide SDK do not recognice Voodoo2 cards so you Voodoo2 card owners shall NEVER try to do this (until 3dfx have fixed it in a later version of course).
Ok! You now have unzipped the Glide SDK, now I suggests that you downloads Acrobat Reader because the Glide SDK programmers guide/reference guide files is in two versions, one in PDF format (acrobat reader) and one in DOC format. The DOC format files doesn't work with Windows95's Write so I suggests that you downloads Acrobat Reader and use the PDF files.
You can download Acrobat Reader here.
Now run the setuplcc program in the LccWin32 base directory, this program specifies where the
include and library files resides. As include directory specify the include directory in the LccWin32 base directory and as library directory specify the lib directory in the LccWin32 base
directory.
To make Glide to work with LccWin32 you need some tweaked include files and you can download them here.
When you have downloaded the zip file, unzip the files to a temporary directory, copy all files
to the include directory in the LccWin32 base directory.
Now you shall locate your glide2x.dll file (exists in the windows\system directory if you have installed the drivers provided with your 3dfx card). Now you need
to open a DOS consol. Change directory to the LccWin32 bin directory. Now execute this
command line:
IMPLIB path_to_your_glide2x.dll_file
path_to_your_glide2x.dll_file are the path to your glide2x.dll file.
Now implib should have created a file named glide2x.lib. Copy this file to the lib directory of
your LccWin32 base directory.
Now it's time to download a demo program to test if LccWin32 works with glide. You can download a test program here. Unzip it and you should have a
*.c file (c source file).
LccWin32 has a GUI programming enviroment from which you can access everything you need
to build programs so now it's time to setup the GUI enviroment.
Start the wedit program (located in the bin directory off the LccWin32 base directory).
Now create a new project file, add the demo1.c source file to the project. The demo program is a Win32 consol program so remember to set the type of project to consol application.
Now you need to set some project options.
Go in under Options/Configuration/Compiler
and set the include file path to the include directory of the LccWin32 base directory. Then go in under Options/Configuration/Linker and set the additional libraries to the lib directory of the
LccWin32 base directory.
Now LccWin32 should be able to build and run the demo program. Choose Compiler/Generate Makefile and then Compiler/Make. After the program have been built choose Compiler/Execute demo1.exe. If the 3dfx flashscreen shows up then CONGRATULATIONS, LccWin32 now works
with Glide! If it doesn't work (maybe the compiler/link/make tool complains then you must have
made something wrong. I suggests that everyone reads the documentation of LccWin32, it is really easy to use when you get to know it!
That's enough for now but if you have any questions of any kind of getting this stuff to work then feel free to contact me.