1 Mesa 5.0.1 DOS/DJGPP Port v1.4
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 Well, guess what... this is the DOS port of Mesa 5.0.1, for DJGPP fans... Whoa!
10 The driver has its origins in ddsample.c, written by Brian Paul and found by me
18 Mesa copyright applies, provided this package is used within Mesa. For anything
28 make -f Makefile.DJ [OPTIONS...]
32 Environment variables:
33 CPU optimize for the given processor.
35 GLU=[mesa|sgi] specify GLU directory; can be `sgi' (requires GNU/C++)
38 GLIDE path to Glide3 SDK; used with FX.
39 default = $(TOP)/glide3
40 FX=1 build for 3dfx Glide3. Note that this disables
41 compilation of most DMesa code and requires fxMesa.
42 As a consequence, you'll need the DJGPP Glide3
43 library to build any application.
45 MATROX=1 build for Matrox Millennium I (MGA2064W) cards.
46 This is experimental and not intensively tested.
48 HAVE_X86=1 optimize for i386.
50 HAVE_MMX=1 allow MMX specializations, provided your assembler
51 supports MMX instruction set. However, the true CPU
52 capabilities are checked at run-time to avoid lockups.
54 HAVE_SSE=1 (see HAVE_MMX)
56 HAVE_3DNOW=1 (see HAVE_MMX)
64 clean: remove object files
65 realclean: remove all generated files
70 CPU: AMD Athlon XP 1800+
71 Mainboard: EP-8KTA3 w/ 128 MB SDRAM
72 Video card: Voodoo5 5500 AGP w/ 64 MB SDRAM
73 DJGPP: djdev 2.04 + gcc v3.2.2 + make v3.80
83 Q) `make' barfs and exits because it cannot find some stupid file.
84 A) You need LFN support.
85 A) When compiling for Glide (FX=1), pay attention to Glide path.
87 Q) Libraries built OK, but linker complains about `vsnprintf' every time I
89 A) Upgrade to DJGPP 2.04.
90 A) Add `vsnprintf.c' to the CORE_SOURCES in `src/Makefile.DJ' (untested!).
91 A) Patch `src/mesa/main/imports.c' with the following line:
92 #define vsnprintf(buf, max, fmt, arg) vsprintf(buf, fmt, arg)
93 This hack should be safe in 90% of the cases, but if anything goes wrong,
94 don't come back to me crying.
96 Q) `make' complains about DXE3 or something, yet it builds the libraries.
97 A) DXE3 refers to the DJGPP dynamic modules. You'll need either the latest
98 DJGPP distro, or download the separate package from my web page. Read the
99 DXE3 documentation on how to use them.
100 A) When compiling for Glide (FX=1), make sure `glide3x.dxe' can be found in
101 LD_LIBRARY_PATH (or top `lib' directory).
103 2. Using Mesa for DJGPP
105 Q) DMesa is so SLOOOW! The Win32 OpenGL performs so much better...
106 A) Is that a question? If you have a 3dfx Voodoo Banshee or higher card,
107 you're lucky (check http://sourceforge.net/projects/glide for the DJGPP
108 port). If you have a Matrox Millennium I card, you just MIGHT be lucky...
109 If you haven't, sorry; everything is done in software. Suggestions?
111 Q) I tried to set refresh rate w/ DMesa, but without success.
112 A) Refresh rate control works only for VESA 3.0. If you were compiling for
113 Glide, see Glide info. If not, sorry!
115 Q) I made a simple application and it does nothing. It exits right away. Not
117 A) The pure software drivers (VESA/VGA) support only double-buffered modes.
118 A) Another weird "feature" is that buffer width must be multiple of 8 (I'm a
119 lazy programmer and I found that the easiest way to keep buffer handling
120 at peak performance ;-).
122 Q) The GLUT is incomplete.
127 libGLUT (the toolkit):
128 ~~~~~~~~~~~~~~~~~~~~~~
130 Well, this "skeletal" GLUT implementation was taken from AllegGL project and
131 heavily changed. Thanks should go to Bernhard Tschirren, Mark Kilgard, Brian
132 Paul and probably others (or probably not ;-). GLUT functionality will be
133 extended only on an "as needed" basis.
135 GLUT talks to hardware via PC_HW package which was put together from various
136 pieces I wrote long time ago. It consists from the keyboard, mouse and timer
139 My keyboard driver used only scancodes; as GLUT requires ASCII values for keys,
140 I borrowed the translation tables (and maybe more) from Allegro -- many thanks
141 to Shawn Hargreaves et co. Ctrl-Alt-Del (plus Ctrl-Alt-End, for Windows users)
142 will shut down the GLUT engine unconditionally: it will raise SIGINT, which in
143 turn will (hopefully) call the destructors, thus cleaning up your/my mess ;-)
144 NB: since the DJGPP guys ensured signal handlers won't go beyond program's
145 space (and since dynamic modules shall) the SIGINT can't be hooked (well, it
146 can, but it is useless), therefore you must live with the 'Exiting due to
147 signal SIGINT' message...
149 The mouse driver is far from complete (lack of drawing, etc), but is enough to
150 make almost all the demos work. Supports the CuteMouse WheelAPI.
152 The timer is pretty versatile for it supports multiple timers with different
153 frequencies. While not being the most accurate timer in the known universe, I
154 think it's OK. Take this example: you have timer A with a very high rate, and
155 then you have timer B with very low rate compared to A; now, A ticks OK, but
156 timer B will probably loose precision!
158 As an addition, stdout and stderr are redirected and dumped upon exit. This
159 means that `printf' can be safely called during graphics. A bit of a hack, I
160 know, because all messages come in bulk, but I think it's better than nothing.
161 "Borrowed" from LIBRHUTI (Robert Hoehne).
163 Window creating defaults: (0, 0, 300, 300), 16bpp. However, the video mode is
164 chosen in such a way that first window will fit. If you need high resolution
165 with small windows, set initial position far to the right (or way down); then
166 you can move them back to any position right before the main loop.
168 The following environment variables can customize GLUT behaviour:
169 GLUT_FPS - print frames/second statistics to stderr
170 DMESA_GLUT_REFRESH - set vertical screen refresh rate (VESA3)
171 DMESA_GLUT_BPP - set default bits per pixel (VGA needs 8)
172 DMESA_GLUT_ALPHA - set default alpha bits (8)
173 DMESA_GLUT_DEPTH - set default depth bits (16)
174 DMESA_GLUT_STENCIL - set default stencil bits (8)
175 DMESA_GLUT_ACCUM - set default accum bits (16)
186 + added 3dfx Glide3 support
187 + added refresh rate control
188 + added fonts in GLUT
189 * lots of minor changes
196 + enabled OpenGL 1.4 support
197 + added MMX clear/blit routines
198 + enabled SGI's GLU compilation
199 + added samples makefile
200 + added new GLUT functions
201 + added color-index modes
202 + added Matrox Millennium MGA2064W driver
203 + added 8bit FakeColor (thanks to Neil Funk)
204 + added VGA support (to keep Ben Decker happy)
205 ! fixed some compilation errors (reported by Chan Kar Heng)
206 * optimized driver for faster callback access... yeah, right :)
207 * overhauled virtual buffer and internal video drivers
208 * better fxMesa integration
213 + enabled GLUT fonts with DXE
214 + truly added multi-window support in GLUT (for Adrian Woodward)
215 * accomodated makefiles with the new sourcetree
216 * fixed some ALPHA issues
217 x hacked and slashed the 3dfx driver (w/ help from Hiroshi Morii)
225 E-mail: dborca@users.sourceforge.net
226 WWW: http://www.geocities.com/dborca/