Q:Where do I get Timothy's Glide 3.x Tutorials ?
A:This document and others can be obtained via the web at http://www.icon.co.za/~tsb
Q:Where can I mail any comments/flames/etc ?
A:All mail can be sent to tsb@icon.co.za
Ok now on with the show :)
I won't waste your time by going through setting up Microsoft Visual C 5 and other compilers.
What I'm going to do is give you some example source and explain the parts I think you need to know.
I'm going to use MS Visual C 5 throughout the tutorials but other languages should also work with
the same code.
Code Skeleton.
--------------
This is the piece of code that every glide program will need in order to work correctly.
Remember C is case sensitive!
>>>>>>>>>>>>>>> CUT HERE >>>>>>>>>>>>>>>> #include [windows.h] #include [stdio.h] #include [conio.h] #include [glide.h] int n; void main() { GrContext_t context; grGlideInit(); if (! grGet(GR_NUM_BOARDS, sizeof(n), &n)) printf("ERROR: no 3Dfx Interactive Graphics Accelerator!\n"); grSstSelect(0); context = grSstWinOpen( 0, GR_RESOLUTION_640x480, GR_REFRESH_60Hz, GR_COLORFORMAT_RGBA, GR_ORIGIN_LOWER_LEFT, 2, 0); //Program starts here //Program ends here //Wait for keyboard hit to end while ( !kbhit() ); grSstWinClose(context); grGlideShutdown(); } >>>>>>>>>>>>> CUT HERE >>>>>>>>>>>>>>
This program should Initialise your Glide card and then wait for you to press a key before quiting.
The 3DFX logo should be displayed etc..
In the tut 2 I will start with real stuff like drawing polys :)
-Timothy S. Bowers
tsb@icon.co.za
http://www.icon.co.za/~tsb