blob: 7feda6f33f73ad1463f8ca597b0ece7caf3db91e [file] [log] [blame]
Brian Paulf9eae7b1999-02-23 03:34:40 +00001
Brian Paul795ae302002-10-14 14:19:11 +00002 3Dfx Glide device driver
Brian Paulf9eae7b1999-02-23 03:34:40 +00003
4
Brian Paul795ae302002-10-14 14:19:11 +00005
Daniel Borca05cb9462004-11-15 08:01:20 +00006Requirements:
7-------------
Daniel Borca0219d112003-10-14 14:56:45 +00008
Daniel Borca05cb9462004-11-15 08:01:20 +00009A Voodoo-based videocard/accelerator
10DOS (with DJGPP), Windows9x/2k (with MinGW), Linux
11Glide3x library for your OS
Daniel Borca0219d112003-10-14 14:56:45 +000012
Daniel Borca05cb9462004-11-15 08:01:20 +000013http://sourceforge.net/projects/glide/
Daniel Borca1b6cca62003-10-21 11:15:52 +000014
15
16
17How to compile:
18---------------
19
Daniel Borca05cb9462004-11-15 08:01:20 +000020DJGPP:
Daniel Borca1b6cca62003-10-21 11:15:52 +000021 Place the Glide3 SDK in the top Mesa directory:
Daniel Borca00b7aba2004-12-20 08:09:25 +000022 $(MESA)/glide3/include/
Daniel Borca05cb9462004-11-15 08:01:20 +000023 3dfx.h, g3ext.h, glide.h, glidesys.h, glideutl.h, sst1vid.h
Daniel Borca1b6cca62003-10-21 11:15:52 +000024 $(MESA)/glide3/lib/
Daniel Borca05cb9462004-11-15 08:01:20 +000025 libgld3x.a, libgld3i.a, glide3x.dxe
Daniel Borca1b6cca62003-10-21 11:15:52 +000026 Type:
Daniel Borcafb776682004-04-13 07:08:34 +000027 make -f Makefile.DJ X86=1 FX=1
Daniel Borca05cb9462004-11-15 08:01:20 +000028 Look into the makefile for further information.
29
30MinGW:
31 Place the Glide3 SDK in the top Mesa directory:
Daniel Borca00b7aba2004-12-20 08:09:25 +000032 $(MESA)/glide3/include/
Daniel Borca05cb9462004-11-15 08:01:20 +000033 3dfx.h, g3ext.h, glide.h, glidesys.h, glideutl.h, sst1vid.h
34 $(MESA)/glide3/lib/
35 libglide3x.a, glide3x.dll
36 Type:
Daniel Borcafb776682004-04-13 07:08:34 +000037 make -f Makefile.mgw X86=1 FX=1
Daniel Borca05cb9462004-11-15 08:01:20 +000038 Look into the makefile for further information.
Daniel Borca1b6cca62003-10-21 11:15:52 +000039
40Linux:
41 Place the Glide3 SDK in /usr/local/glide
Daniel Borca00b7aba2004-12-20 08:09:25 +000042 /usr/local/glide/include/
Daniel Borca05cb9462004-11-15 08:01:20 +000043 3dfx.h, g3ext.h, glide.h, glidesys.h, glideutl.h, sst1vid.h
Daniel Borca00b7aba2004-12-20 08:09:25 +000044 /usr/local/glide/lib/
Daniel Borca05cb9462004-11-15 08:01:20 +000045 libglide3x.a, libglide3x.so
Daniel Borca1b6cca62003-10-21 11:15:52 +000046 Type:
47 make linux-glide
Daniel Borca0849ed12004-01-15 07:17:31 +000048 or
49 make linux-x86-glide
50
51
52
Daniel Borca71c7c1f2004-03-29 06:51:41 +000053Compilation defines:
54--------------------
55
56FX_DEBUG
57 enable driver debug code
58FX_TRAP_GLIDE
59 enable Glide trace code
Daniel Borcad9873c52004-09-24 07:03:53 +000060FX_PACKEDCOLOR
61 use packed color in vertex structure
Daniel Borca71c7c1f2004-03-29 06:51:41 +000062FX_TC_NAPALM
Daniel Borca05cb9462004-11-15 08:01:20 +000063 map GL_COMPRESSED_RGB[A] to FXT1. Works with VSA100-based cards only.
Daniel Borca71c7c1f2004-03-29 06:51:41 +000064FX_COMPRESS_S3TC_AS_FXT1_HACK
65 map S3TC to FXT1
66FX_RESCALE_BIG_TEXURES_HACK
67 fake textures larger than HW can support
68 (see MESA_FX_MAXLOD environment variable)
69
70
71
72Environment variables:
73----------------------
Daniel Borca0849ed12004-01-15 07:17:31 +000074
75The following environment variables affect MesaFX. Those that affect Glide
Daniel Borcaedf4f532004-04-14 08:00:52 +000076only, are beyond the scope of this section. Entries that don't have a "Value"
Daniel Borca0849ed12004-01-15 07:17:31 +000077field, can have any value whatsoever
78 ex: set MESA_FX_IGNORE_CMBEXT=y
79
80"Note" (*) means that the environment variable affects Glide, too; also, if
81the var is not found in the environment, it is searched in windoze registry.
82"Note" (!) means that the environment variable is not working as expected;
83may have undefined effects, might have effects only at Glide level or might
84not have any effect whatsoever. Caveat emptor! Those are to be revised soon.
85
86It is recommended to leave the envvars alone, so that Mesa/Glide will run with
87default values. Use them only when you experience crashes or strange behavior.
88
89FX_GLIDE_NUM_TMU
90 OS: all
Daniel Borca14c532f2004-08-20 08:29:24 +000091 HW: dual-TMU cards (Voodoo2, Avenger, Napalm)
Daniel Borca0849ed12004-01-15 07:17:31 +000092 Desc: force single-TMU
93 Note: (*)
94 Value: "1"
95FX_GLIDE_SWAPPENDINGCOUNT
96 OS: all
97 HW: all
98 Desc: max # of buffers allowed to build up
99 Note: (*) (!)
Daniel Borca00b7aba2004-12-20 08:09:25 +0000100 Value: "0", "1", "2", "3", "4", "5" or "6"
Daniel Borca0849ed12004-01-15 07:17:31 +0000101FX_GLIDE_SWAPINTERVAL
102 OS: all
103 HW: all
104 Desc: number of vertical retraces to wait before swapping
105 Note: (*) (!) works only at Glide-level?
106SSTH3_SLI_AA_CONFIGURATION
107 OS: all
108 HW: VSA100-based cards
109 Desc: SLI/AA setup
110 Note: (*) (!) works only at Glide-level?
111 Value:
112 1, 2, 4 chip cards
113 "0" - SLI & AA disable
114 "1" - SLI disabled, 2 sample AA enabled
115 2, 4 chip cards
116 "2" - 2-way SLI enabled, AA disabled
117 "3" - 2-way SLI enabled, 2 sample AA enabled
118 "4" - SLI disabled, 4 sample AA enabled
119 4 chip cards
120 "5" - 4-way SLI enabled, AA disabled
121 "6" - 4-way SLI enabled, 2 sample AA enabled
122 "7" - 2-way SLI enabled, 4 sample AA enabled
123 "8" - SLI disabled, 8 sample AA enabled
124SST_DUALHEAD
125 OS: win32
126 HW: ?
127 Desc: ?
128 Note: (!) disabled?
129MESA_FX_NO_SIGNALS
130 OS: linux
131 HW: all
132 Desc: avoid installing signals
133 Note: (!) untested!
134MESA_FX_INFO
135 OS: all
136 HW: all
137 Desc: verbose to stderr
Daniel Borca89625ef2004-02-09 07:39:03 +0000138 Value: any; special value "r" to redirect stderr to MESA.LOG
Daniel Borca2b0f5892004-08-31 06:32:34 +0000139MESA_FX_NOSNAP
140 OS: all
141 HW: Voodoo1, Rush, Banshee
142 Desc: do not snap vertices inside Mesa
Daniel Borca05cb9462004-11-15 08:01:20 +0000143 Note: to be used with Glide3x that snaps vertices internally
Daniel Borcaedf4f532004-04-14 08:00:52 +0000144MESA_FX_POINTCAST
145 OS: all
146 HW: dual-TMU cards (some Voodoo1, Voodoo2, Avenger, Napalm)
147 Desc: try to use pointcast palette
148 Note: may give adverse effects on UMA cards (Avenger, Napalm)
Daniel Borca0849ed12004-01-15 07:17:31 +0000149MESA_FX_IGNORE_PALEXT
150 OS: all
151 HW: all
152 Desc: disable 6666 palette
153MESA_FX_IGNORE_PIXEXT
154 OS: all
155 HW: Napalm
156 Desc: force 565 16bpp mode (traditional Voodoo, no 32/15bpp)
157MESA_FX_IGNORE_TEXFMT
158 OS: all
159 HW: Napalm
Daniel Borca89625ef2004-02-09 07:39:03 +0000160 Desc: disable 32bit textures
Daniel Borca0849ed12004-01-15 07:17:31 +0000161MESA_FX_IGNORE_CMBEXT
162 OS: all
163 HW: Napalm
164 Desc: disable Napalm combiners (color/alpha/texture)
Daniel Borcaedf4f532004-04-14 08:00:52 +0000165 Note: this option allows dual-TMU cards perform single-pass
166 trilinear, but some advanced (multi)texturing modes
167 won't work (GL_EXT_texture_env_combine)
Daniel Borca0849ed12004-01-15 07:17:31 +0000168MESA_FX_IGNORE_MIREXT
169 OS: all
170 HW: all
171 Desc: disable mirror extension
172MESA_FX_IGNORE_TEXUMA
173 OS: all
174 HW: all
175 Desc: disable UMA
176MESA_FX_IGNORE_TEXUS2
177 OS: all
178 HW: all
179 Desc: disable Texus2
180MESA_FX_MAXLOD
181 OS: all
182 HW: non VSA-100 cards
183 Desc: enable large texture support using SW rescaling
184 Value:
185 "9" - 512x512 textures
186 "10" - 1024x1024 textures
187 "11" - 2048x2048 textures
Daniel Borca00b7aba2004-12-20 08:09:25 +0000188MESA_FX_ALLOW_VP
189 OS: all
190 HW: all
191 Desc: allow vertex program extensions
Daniel Borcaa863d4b2004-05-20 06:11:16 +0000192MESA_GLX_FX
Daniel Borca3dc3cc92004-06-14 09:11:13 +0000193 OS: linux
194 HW: Voodoo1, Rush, Voodoo2
195 Desc: display mode
Daniel Borca05cb9462004-11-15 08:01:20 +0000196 Note: (!) experimental
Daniel Borcaa863d4b2004-05-20 06:11:16 +0000197 Value:
Daniel Borca3dc3cc92004-06-14 09:11:13 +0000198 "w" - windowed mode
199 "f" - fullscreen mode
200 "d" - disable glide driver
Daniel Borca05cb9462004-11-15 08:01:20 +0000201 OS: win32
202 HW: Rush, Banshee, Avenger, Napalm
203 Desc: display mode
204 Note: (!) experimental
205 Value:
206 "w" - windowed mode
Daniel Borca1b6cca62003-10-21 11:15:52 +0000207
208
209
210Contact:
211--------
212
Daniel Borca4a1d4a22004-05-07 06:00:53 +0000213Daniel Borca <dborca 'at' users 'dot' sourceforge 'dot' net>
214Hiroshi Morii <koolsmoky 'at' users 'dot' sourceforge 'dot' net>
Daniel Borca0219d112003-10-14 14:56:45 +0000215
216
217
Daniel Borca0849ed12004-01-15 07:17:31 +0000218WARNING! The info below this line is outdated (yet some of it useful). WARNING!
219*******************************************************************************
Daniel Borca1b6cca62003-10-21 11:15:52 +0000220
221
222
Brian Paul795ae302002-10-14 14:19:11 +0000223Info for Mesa 4.1
224-----------------
225
226The 3dfx Glide driver in Mesa is disabled by default. Not too many people
227use this driver anymore and at some point down the road it will be dropped.
228
229To use/enable the Glide driver either do this:
230
231'./configure --with-glide=DIR' Where DIR is the location of Glide, like
232 /usr/ or /usr/local
233
234OR
235
236'make linux-x86-glide' If using the old-style Makefile system.
237
238The rest of this file hasn't changed since Mesa 3.3. Some of it's out of
239date, but some is still valid.
Brian Paula5738032001-09-23 16:10:02 +0000240
241
Brian Paulf9eae7b1999-02-23 03:34:40 +0000242
243What do you need ?
244------------------
245
246 - A PC with a 3Dfx Voodoo1/2 Graphics or Voodoo Rush based board
247 (Pure3D, Monster 3D, R3D, Obsidian, Stingray 128/3D, etc.).
248 The Quantum3D Obsidian3D-2 X-24 requires some special env. setting
249 under Linux (more information in the "Useful Glide Environment
250 Variables");
251
Brian Paulf9eae7b1999-02-23 03:34:40 +0000252 - The 3Dfx Glide library 2.3 or later for your OS (the 2.4 works fine).
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000253 The Voodoo2 requires the Glide library 2.51. The Glide 3.1 is not
Brian Paulf9eae7b1999-02-23 03:34:40 +0000254 compatible with the Glide 2.x so it doesn't work with the current
255 version of the driver;
256
257 - A compiler supported by the Glide library (Micro$oft VC++ (tested),
258 Watcom (tested), GCC for Linux (tested), etc.);
259
Brian Paulf9eae7b1999-02-23 03:34:40 +0000260 - It's nice to have two monitors - one for your normal graphics
261 card and one for your 3Dfx card. If something goes wrong with
262 an application using the 3Dfx hardware you can still see your
263 normal screen in order to recover.
264
265
266
267Tested on:
268----------
269 Windows 95 - David Bucciarelli
270 Windows NT - Henri Fousse
271 MS-DOS
272 Linux - Daryll Strauss, Brian Paul, David Bucciarelli
273 FreeBSD
274 BeOS - Duncan Wilcox
275 MacOS - Fazekas Miklos
276
277
278What is able to do ?
279--------------------
280
281 - It is able accelerate points, lines and polygon with flat
282 shading, gouraud shading, Z-buffer, texture mapping, blending, fog and
283 antialiasing (when possible). There is also the support for rendering
284 in a window with a slow trick for the Voodoo Graphics (available only
285 for Linux) and at full speed with the Voodoo Rush chipset.
286 Under Linux is also possible to switch on-the-fly between the fullscreen
287 and in-window rendering hack.
288 There is also the support for using more than one Voodoo Graphics in the
289 some application/PC (you can create one context for each board and use
290 multiple video outputs for driving monitors, videoprojectors or HMDs).
291 The driver is able to fallback to pure software rendering when afeature
292 isn't supported by the Voodoo hardware (however software rendering is
293 very slow compared to hardware supported rendering)
294
295
296
297How to compile:
298---------------
299
300Linux:
301------
302 Here are the basic steps for using the 3Dfx hardware with Mesa
303 on Linux:
304
305 - You'll need the Glide library and headers. Mesa expects:
306 /usr/local/glide/include/*.h // all the Glide headers
307 /usr/local/glide/lib/libglide2x.so
308
309 If your Glide libraries and headers are in a different directory
310 you'll have to modify the Mesa-config and mklib.glide files.
311
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000312 - Unpack the MesaLib-3.1.tar.gz and MesaDemos-3.1.tar.gz archives;
Brian Paulf9eae7b1999-02-23 03:34:40 +0000313
314 - If you're going to use a newer Mesa/Glide driver than v0.27 then
315 unpack the new driver archive over the Mesa directory.
316
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000317 - In the Mesa-3.1 directory type "make linux-glide"
Brian Paulf9eae7b1999-02-23 03:34:40 +0000318
319 - Compilation _should_ finish without errors;
320
321 - Set your LD_LIBRARY_PATH environment variable so that the
322 libglide2x.so and Mesa library files can be found. For example:
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000323 setenv LD_LIBRARY_PATH "/usr/local/glide/lib:/SOMEDIR/Mesa-3.1/lib"
Brian Paulf9eae7b1999-02-23 03:34:40 +0000324
325 - You'll have to run Glide-based programs as root or set the suid
326 bit on executables;
327
328 - Try a demo:
329 cd gdemos
330 su
331 setenv MESA_GLX_FX f
332 ./gears (hit ESC to exit)
333
334 - You can find the demos especially designed for the Voodoo driver in
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000335 in the Mesa-3.1/3Dfx/demos directory (type "make" in order to compile
Brian Paulf9eae7b1999-02-23 03:34:40 +0000336 everything).
337
338MacOS:
339------
340 Check the WEB page at http://valerie.inf.elte.hu/~boga/Mesa.html
341
342MS Windows:
343-----------
344
345 For the MSVC++:
346 - The glide2x.lib have to be in the default MSVC++ lib directory;
347
348 - The Glide headers have to be in the default MSVC++ include directory;
349
350 - You must have the vcvars32.bat script in your PATH;
351
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000352 - Go to the directory Mesa-3.1 and run the mesafx.bat;
Brian Paulf9eae7b1999-02-23 03:34:40 +0000353
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000354 - The script will compile everything (Mesa-3.1/lib/OpenGL32.{lib,dll},
355 Mesa-3.1/lib/GLU32.{lib,dll}, Mesa-3.1/lib/GLUT32.{lib,dll} and
Brian Paulf9eae7b1999-02-23 03:34:40 +0000356 Voodoo demos);
357
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000358 - At the end, you will be in the Mesa-3.1/3Dfx/demos directory;
Brian Paulf9eae7b1999-02-23 03:34:40 +0000359
360 - Try some demo (fire.exe, teapot.exe, etc.) in order to check if
361 everything is OK (you can use Alt-Tab or Ctrl-F9 to switch between
362 the Voodoo screen and the windows desktop);
363
364 - Remember to copy the Mesa OpenGL32.dll, GLU32.dll and GLUT32.dll in the
365 some directory were you run your Mesa based applications.
366
367 - I think that you can easy change the Makefile.fx files in order
368 to work with other kind of compilers;
369
370 - To discover how open the 3Dfx screen, read the sources under
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000371 the Mesa-3.1/3Dfx/demos directory. You can use the GLUT library or
Brian Paulf9eae7b1999-02-23 03:34:40 +0000372 the Diego Picciani's wgl emulator.
373
374 NOTE: the MSVC++ 5.0 optimizer is really buggy. Also if you install the
375 SP3, you could have some problem (you can disable optimization in order
376 solve these kind of problems).
377
378
379Doing more with Mesa & Linux Glide:
380-----------------------------------
381
382 The MESA_GLX_FX environment variable can be used to coax most
383 GLX-based programs into using Glide (and the __GLUT library
384 is GLX-based__).
385
386 Full-screen 3Dfx rendering:
387 ---------------------------
388
389 1. Set the MESA_GLX_FX variable to "fullscreen":
390
391 ksh:
392 export MESA_GLX_FX = "fullscreen"
393 csh:
394 setenv MESA_GLX_FX fullscreen
395
396 2. As root, run a GLX-based program (any GLUT demo on Linux).
397
398 3. Be careful: once the 3Dfx screen appears you won't be able
399 to see the GLUT windows on your X display. This can make using
400 the mouse tricky! One solution is to hook up your 3Dfx card to
401 a second monitor. If you can do this then set these env vars
402 first:
403
404 setenv SST_VGA_PASS 1
405 setenv SST_NOSHUTDOWN
406
407 or for the Voodoo2:
408
409 setenv SSTV2_VGA_PASS 1
410 setenv SSTV2_NOSHUTDOWN
411
412 Rendering into an X window with the help of the Voodoo hardware:
413 ----------------------------------------------------------------
414
415 1. Start your X server in 16 bpp mode (XFree86: startx -- -bpp 16)
416 in order to have the best performance and the best visual
417 quality. However you can use any visual depth supported by X.
418
419 2. Set the following environment variables:
Brian Paulf174cda2000-06-29 14:31:31 +0000420 export MESA_GLX_FX="window" # to enable window rendering
421 export SST_VGA_PASS=1 # to stop video signal switching
422 export SST_NOSHUTDOWN=1 # to stop video signal switching
Brian Paulf9eae7b1999-02-23 03:34:40 +0000423 OR
424 setenv MESA_GLX_FX window
425 setenv SST_VGA_PASS 1
426 setenv SST_NOSHUTDOWN 1
427
428 (the Voodoo2 requires to use "SSTV2_" instead "SST_").
429
430 3. As root, try running a GLX-based program
431
432 How does it work? We use the 3Dfx hardware to do rendering then
433 copy the image from the 3Dfx frame buffer into an X window when
434 the SwapBuffers() function is called. The problem with this
435 idea is it's slow. The image must be copied from the 3Dfx frame
436 buffer to main memory then copied into the X window (and when the X
437 visual depth doesn't match the Voodoo framebufffer bit per pixel, it
438 is required also a pixel format translation).
439
Brian Paulf183a0f2000-02-25 04:42:58 +0000440 NOTE: the in-window rendering feature only works with double-buffering.
441
442
Brian Paulf9eae7b1999-02-23 03:34:40 +0000443 On the fly switching between in window rendering and full screen rendering
444 --------------------------------------------------------------------------
445
446 The Mesa 2.6 has introduced the capability of switching
447 on-the-fly between the fullscreen/fullspeed rendering and the in-window
448 hack and vice versa. The on-the-fly switching requires a direct support
449 by the application but it is really easy to add. You have to start
450 your X server in 16 bpp mode and to add the following lines to your
451 application:
452
453 #if defined(FX) && define(XMESA)
454 #include <GL/xmesa.h>
455
456 static int fullscreen=1;
457 #endif
458
459 ...
460
461 /* In the GLUT keyboard event callback */
462
463 #if defined(FX) && !define(WIN32)
464 case ' ':
465 fullscreen=(!fullscreen);
466 XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW);
467 break;
468 #endif
469 ...
470
471 See the 3Dfx/demos/tunnel.c program
472 for an example. You have to set the -DXMESA flag in the Makefile's COPTS
473 to enable it.
474
475 Rendering into an X window with the X11 software driver:
476 --------------------------------------------------------
477
David Bucciarelli274513e1999-04-08 18:01:36 +0000478 Set the MESA_GLX_FX variable to "disable" your GLX-based program will use
Brian Paulf9eae7b1999-02-23 03:34:40 +0000479 the X11 software driver (the 3Dfx hardware isn't used at all).
480
481
482
483Useful Glide Environment Variables:
484-----------------------------------
485
486 - To disable the 3Dfx logo, set the FX_GLIDE_NO_SPLASH variable.
487
488 - To disable video signal switching:
489 setenv SST_VGA_PASS 1
490 setenv SST_NOSHUTDOWN
491 or for the Voodoo2:
492 setenv SSTV2_VGA_PASS 1
493 setenv SSTV2_NOSHUTDOWN
494
495 - To set the default screen refresh rate:
496 setenv SST_SCREENREFRESH=75
497
498 the supported values are 60, 70, 72, 75, 80, 85, 90, 100, 120.
499
500 - To force the Mesa library to swap buffers as fast as possible,
501 without any vertical blanking synchronization (useful for benchmarks):
502 setenv FX_GLIDE_SWAPINTERVAL 0
503 setenv SST_SWAP_EN_WAIT_ON_VIDSYNC 0
504
505 - You can slight improve the performances of your Voodoo1 board with
506 the following env. var.:
507 setenv SST_FASTMEM 1
508 setenv SST_PCIRD 1
509 setenv SST_GRXCLK 57
510
511 (don't use this setting with the Quantum3D 100SB or with any other
512 SLI configuration: it will hang everything !).
513 The following setting can be used with the Voodoo2:
514 setenv SSTV2_FASTMEM_RAS_READS=1
515 setenv SSTV2_FASTPCIRD=1
516 setenv SSTV2_GRXCLK=95
517
518 - The Quantum3D Obsidian3D-2 X-24 requires some special env. setting
519 in order to work under Linux:
520
521 export SSTV2_FT_CLKDEL=5
522 export SSTV2_TF0_CLKDEL=7
523 export SSTV2_TF1_CLKDEL=7
524 export SSTV2_TF2_CLKDEL=7
525 export SSTV2_SLIM_VIN_CLKDEL=3
526 export SSTV2_SLIM_VOUT_CLKDEL=2
527 export SSTV2_SLIS_VIN_CLKDEL=3
528 export SSTV2_SLIS_VOUT_CLKDEL=2
529
530 (Thanks to Phil Ross for this trick).
531
532
533
534
535The Mesa/Voodoo Environment Variables:
536--------------------------------------
537
538 - Only for Windows/Voodoo Rush users, if you define the
539 env. var. MESA_WGL_FX:
540 export MESA_WGL_FX=fullscreen
541 you will get fullscreen rendering;
542
543 - Only for Windows/Voodoo Rush users, if you define the
544 env. var. MESA_WGL_FX:
545 export MESA_WGL_FX=window
546 you will get window rendering (default value);
547
548 - Only for Linux users, you can find more informations about
549 the env. var. MESA_GLX_FX in the "Doing more with Mesa & Linux Glide"
550 section;
551
552 - If you define the env. var. MESA_FX_SWAP_PENDING:
553 export MESA_FX_SWAP_PENDING=4
554 you will able to set the maximum number of swapbuffers
555 commands in the Voodoo FIFO after a swapbuffer (default value: 2);
556
557 - If you define the env. var. MESA_FX_INFO:
558 export MESA_FX_INFO=1
559 you will get some useful statistic.
560
Brian Paul15b40df2000-02-12 01:35:24 +0000561 - If you define the env. var. MESA_FX_NO_SIGNALS:
562 export MESA_FX_NO_SIGNALS=1
563 Mesa/FX will not install atexit() or signal() handlers.
564
565
Brian Paulf9eae7b1999-02-23 03:34:40 +0000566
567Know BUGS and Problems:
568-----------------------
569
David Bucciarelli274513e1999-04-08 18:01:36 +0000570 - fog doesn't work in the right way when using the glDepthRange() function;
571
Brian Paulf9eae7b1999-02-23 03:34:40 +0000572 - Maximum texture size: 256x256 (this is an hardware limit);
573
574 - Texture border aren't yet supported;
575
576 - A GL_BLEND in a glTexEnv() is not supported (it is an hardware limit);
577
578 - Use the glBindTexture extension (standard in OpenGL 1.1) for texture
579 mapping (the old way: glTexImage inside a display list, download
580 the texture map each time that you call the display list !!!);
581
582 - Stencil buffer and Accumulation buffer are emulated in software (they are not
583 directly supported by the Hardware);
584
585 - Color index mode not implemented (this is an hardware limit);
586
587 - Thre is an know bug in the Linux Glide library so the in-window-rendering hack
588 and any other operations that requires to read the Voodoo frame buffer
589 (like the accumulation buffer support) doesn't work on Voodoo SLI cards.
590
591 - The driver switch to pure software (_slow_) rendering when:
592
593 - Stencil enabled;
594 - Using the Accumulation buffer;
595 - Blend enabled and blend equation != GL_FUNC_ADD_EXT;
596 - Color logic operation enabled and color logic operation != GL_COPY;
597 - Using GL_SEPARATE_SPECULAR_COLOR;
598 - The four values of glColorMask() aren't the some;
599 - Texture 1D or 3D enabled;
600 - Texture function is GL_BLEND;
601 - Using the Multitexture extension with Voodoo cards with only one TMU;
602 - Using the Multitexture extension with Voodoo cards with more than
603 one TMU, and texture function isn't GL_MODULATE;
604 - Point size is != 1.0 or point params vector != (1.0,0.0,0.0);
605 - Line width != 1.0 or using stipple lines.
606 - Using polygon offset or stipple polygons;
607
608 NOTE: this is list is not yet complete.
609
610
611Hints and Special Features:
612---------------------------
613
614 - Under Linux and with a Voodoo Graphics board, you can use
615 XMesaSetFXmode(XMESA_FX_FULLSCREEN or XMESA_FX_WINDOW) in order to
616 switch on the fly between fullscreen rendering and the in-window-rendering
617 hack.
618
619 - The driver is able to use all the texture memory available: 2/4MB on
620 Voodoo1 boards and 8MB (!) on high-end Voodoo1 and Voodoo2 boards.
621
622 - Trilinear filtering is fully supported on Voodoo boards with two TMUs
623 (high-end Voodoo1 boards and Voodoo2 boards). When only one TMU is
624 available the driver fallback to bilinear filter also if you ask
625 for trilinear filtering.
626
627 - The Voodoo driver support multiple Voodoo Graphics boards in the
628 some PC. Using this feature, you can write applications that use
629 multiple monitors, videoprojectors or HMDs for the output. See
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000630 Mesa-3.1/3Dfx/demos/tunnel2.c for an example of how setup one
Brian Paulf9eae7b1999-02-23 03:34:40 +0000631 context for each board.
632
633 - The v0.19 introduces a new powerful texture memory manager: the
634 texture memory is used as a cache of the set of all defined texture
635 maps. You can now define several MBs of texture maps also with a 2MB
636 of texture memory (the texture memory manager will do automatically
637 all the swap out/swap in
638 texture memory work). The new texture memory manager has also
639 solved a lot of other bugs/no specs compliance/problems
640 related to the texture memory usage.
641
642 - Use triangles and quads strip: they are a LOT faster than sparse
643 triangles and quads.
644
645 - The Voodoo driver supports the GL_EXT_paletted_texture. it works
646 only with GL_COLOR_INDEX8_EXT, GL_RGBA palettes and the alpha value
Jeff Smithfab1f072008-06-13 09:50:43 -0500647 is ignored because this is a limitation of the current Glide
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000648 version and of the Voodoo hardware. See Mesa-3.1/3Dfx/demos/paltex.c for
Brian Paulf9eae7b1999-02-23 03:34:40 +0000649 a demo of this extension.
650
651 - The Voodoo driver directly supports 3Dfx Global Palette extension.
652 It was written for GLQuake and I think that it isn't a good idea
653 to use this extension for any other purpose (it is a trick). See
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000654 Mesa-3.1/3Dfx/demos/glbpaltex.c for a demo of this extension.
Brian Paulf9eae7b1999-02-23 03:34:40 +0000655
656 - The Voodoo driver chooses the screen resolution according to the
657 requested window size. If you open a 640x480 window, you will get
658 a 640x480 screen resolution, if you open a 800x600 window, you
659 will get a 800x600 screen resolution, etc.
660 Most GLUT demos support the '-geometry' option, so you can choose
661 the screen resolution: 'tunnel -geometry 800x600'.
662 Clearly, you Voodoo board must have enough framebuffer RAM (otherwise
663 the window creation will fail).
664
665 - The glGetString(GL_RENDERER) returns more information
666 about the hardware configuration: "Mesa Glide <version>
667 <Voodoo_Graphics|Voodoo_Rush|UNKNOWN> <num> CARD/<num> FB/
668 <num> TM/<num> TMU/<NOSLI|SLI>"
669 where: <num> CARD is the card used for the current context,
670 <num> FB is the number of MB for the framebuffer,
671 <num> TM is the number of MB for the texture memory,
672 <num> TMU is the number of TMU. You can try to run
673 Mesa/demos/glinfo in order to have an example of the output.
674
675Did you find a lot BUGs and problems ? Good, send me an email.
676
677
678
679FAQ:
680----
681
682For a complete FAQ check the Bernd Kreimeier's Linux 3Dfx HOWTO
683available at http://www.gamers.org/dEngine/xf3D (it includes also
684a lot of informations not strictly related to Linux, so it can be
685useful also if you don't use Linux)
686
6871. What is 3Dfx?
688
6893Dfx Interactive, Inc. is the company which builds the VooDoo 3-D graphics
690chipset (and others) used in popular PC cards such as the Diamond Monster 3D
691and the Orchid Righteous 3D (more informations at http://www.3dfx.com).
692
693
6942. What is Glide?
695
696Glide is a "thin" programming interface for the 3Dfx hardware. It was
697originally written for Windows/Intel but has been ported to Linux/Intel
698by Daryll Strauss.
699
7003Dfx, Inc. should be applauded for allowing the Linux version of Glide
701to be written.
702
703You can directly program with the Glide library if you wish. You can
704obtain Glide from the "Developer" section of the 3Dfx website: www.3dfx.com
705There's a Linux/Glide newsgroup at news://news.3dfx.com/3dfx.glide.linux
706
707
7083. What is fxmesa?
709
710"fxmesa" is the name of the Mesa device driver for the 3Dfx Glide library.
711It was written by David Bucciarelli and others. It works on both Linux
712and Windows. Basically, it allows you to write and run OpenGL-style programs
713on the 3Dfx hardware.
714
715
7164. What is GLQuake?
717
718Quake is a very popular game from id software, Inc. See www.idsoftware.com
719GLQuake is a version of Quake written for OpenGL. There is now a Linux
720version of GLQuake with works with the Mesa/3Dfx/Glide combo.
721
722Here's what you need to run GLQuake on Linux:
723 PC with 100MHz Pentium or better
724 a 3Dfx-based card
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000725 Mesa 3.1 libraries: libMesaGL.so libMesaGLU.so
Brian Paulf9eae7b1999-02-23 03:34:40 +0000726 Glide 2.4 libraries: libglide2x.so libtexus.so
727 GLQuake for Linux.
728
729Also, the windows version of GLQuake works fine with the Mesa OpenGL32.dll,
David Bucciarelli672f8ff1999-02-25 19:10:30 +0000730you have only to copy the Mesa-3.1/lib/OpenGL32.dll in the GLQuake directory
Brian Paulf9eae7b1999-02-23 03:34:40 +0000731in order to test 'MesaQuake'.
732
733
7345. What is GLUT?
735
736GLUT is Mark Kilgard's OpenGL Utility Toolkit. It provides an API for
737writing portable OpenGL programs with support for multiple windows, pop-
738up menus, event handling, etc.
739
740Check the Mark's home page for more informations (http://reality.sgi.com/mjk_asd).
741
742Every OpenGL programmer should check out GLUT.
743
744GLUT on Linux uses GLX.
745
746
7476. What is GLX?
748
749GLX is the OpenGL extension to the X Window System. I defines both a
750programming API (glX*() functions) and a network protocol. Mesa implements
751an emulation of GLX on Linux. A real GLX implementation would requires
752hooks into the X server. The 3Dfx hardware can be used with GLX-based
753programs via the MESA_GLX_FX environment variable.
754
755
7567. Is the Voodoo driver able to use the 4Mb texture memory of
757the Pure3D boards ?
758
759Yes, the Voodoo driver v0.20 includes the support for Voodoo
760Graphics boards with more than 2Mb of texture memory.
761
762
7638. Do the Voodoo driver support the Voodoo Rush under Windows ?
764
765Yes, Diego Picciani has developed the support for the Voodoo
766Rush but David Bucciarelli has a Pure3D and a Monster3D and Brian Paul
767has a Monster3D, so the new versions of the Mesa/Voodoo sometime are
768not tested with the Voodoo Rush.
769
770
7719. Do the Voodoo driver support the Voodoo Rush under Linux ?
772
773No because the Linux Glide doesn't (yet) support the Voodoo Rush.
774
775
77610. Can I sell my Mesa/Voodoo based software and include
777a binary copy of the Mesa in order to make the software
778working out of the box ?
779
Brian Paul15b40df2000-02-12 01:35:24 +0000780Yes.
Brian Paulf9eae7b1999-02-23 03:34:40 +0000781
782
78311. Which is the best make target for compiling the Mesa for
784Linux GLQuake ('make linux-glide', 'make linux-386-glide', etc.) ?
785
786'make linux-386-opt-glide' for Voodoo1 and 'make linux-386-opt-V2-glide'
787for Voodoo2 boards because it doesn't include the '-fPIC'
788option (4-5% faster).
789
790
79112. Can I use a Mesa compiled with a 'make linux-386-opt-V2-glide'
792for my applications/programs/demos ?
793
794Yes, there is only one constrain: you can't run two Mesa applications
795at the some time. This isn't a big issue with the today Voodoo Graphics.
796
797
798Thanks to:
799----------
800
801Henri Fousse (he has written several parts of the v0.15 and the old GLUT
802 emulator for Win);
803
804Diego Picciani (he has developed all the Voodoo Rush support and the wgl
805 emulator);
806
807Daryll Strauss (for the Linux Glide and the first Linux support);
808
809Brian Paul (of course);
810
811Dave 'Zoid' Kirsch (for the Linux GLQuake and Linux Quake2test/Q2 ports)
812
813Bernd Kreimeier (for the Linux 3Dfx HOWTO and for pushing companies to offer
814 a better Linux support)
815
8163Dfx and Quantum3D (for actively supporting Linux)
817
818The most update places where find Mesa VooDoo driver related informations are
819the Mesa mailing list and my driver WEB page
820(http://www-hmw.caribel.pisa.it/fxmesa/index.shtml)
821
822
David Bucciarelli274513e1999-04-08 18:01:36 +0000823David Bucciarelli (davibu@tin.it)
Brian Paulf9eae7b1999-02-23 03:34:40 +0000824
825Humanware s.r.l.
826Via XXIV Maggio 62
827Pisa, Italy
828Tel./Fax +39-50-554108
829email: info.hmw@plus.it
830www: www-hmw.caribel.pisa.it