2 3Dfx Glide device driver
6 Mesa-5.1 release notes:
7 -----------------------
9 1) Glide2 support has been ceased; in order to keep Voodoo Graphics
10 and Voodoo Rush compatibility, please visit the Glide SourceForge
11 and help us to fix Glide3 for those cards.
12 2) The current release is a WIP; among other things, the Linux build works
13 only to some extent. Any help will be appreciated.
14 3) Glide3 can be found at http://sourceforge.net/projects/glide/
18 Known supported HW/OS:
19 ----------------------
21 Voodoo^2, Voodoo Banshee, Voodoo3, Voodoo4, Voodoo5
22 DOS (DJGPP), Windows9x/2k (MinGW/MSVC), Linux
30 Place the Glide3 SDK in the top Mesa directory:
31 $(MESA)/glide3/include/*.h
34 3dfx.h, g3ext.h, glide.h, glidesys.h, glideutl.h, sst1vid.h
38 make -f Makefile.DJ HAVE_MMX=1 HAVE_3DNOW=1 FX=1
40 make -f Makefile.mgw HAVE_MMX=1 HAVE_3DNOW=1 FX=1
43 Look into the corresponding makefiles for further information.
46 Place the Glide3 SDK in /usr/local/glide
55 Daniel Borca <dborca@users.sourceforge.net>
56 Hiroshi Morii <koolsmoky@users.sourceforge.net>
60 The info below this line is outdated. You have been warned...
61 *************************************************************
68 The 3dfx Glide driver in Mesa is disabled by default. Not too many people
69 use this driver anymore and at some point down the road it will be dropped.
71 To use/enable the Glide driver either do this:
73 './configure --with-glide=DIR' Where DIR is the location of Glide, like
78 'make linux-x86-glide' If using the old-style Makefile system.
80 The rest of this file hasn't changed since Mesa 3.3. Some of it's out of
81 date, but some is still valid.
88 - A PC with a 3Dfx Voodoo1/2 Graphics or Voodoo Rush based board
89 (Pure3D, Monster 3D, R3D, Obsidian, Stingray 128/3D, etc.).
90 The Quantum3D Obsidian3D-2 X-24 requires some special env. setting
91 under Linux (more information in the "Useful Glide Environment
94 - The 3Dfx Glide library 2.3 or later for your OS (the 2.4 works fine).
95 The Voodoo2 requires the Glide library 2.51. The Glide 3.1 is not
96 compatible with the Glide 2.x so it doesn't work with the current
97 version of the driver;
99 - A compiler supported by the Glide library (Micro$oft VC++ (tested),
100 Watcom (tested), GCC for Linux (tested), etc.);
102 - It's nice to have two monitors - one for your normal graphics
103 card and one for your 3Dfx card. If something goes wrong with
104 an application using the 3Dfx hardware you can still see your
105 normal screen in order to recover.
111 Windows 95 - David Bucciarelli
112 Windows NT - Henri Fousse
114 Linux - Daryll Strauss, Brian Paul, David Bucciarelli
117 MacOS - Fazekas Miklos
123 - It is able accelerate points, lines and polygon with flat
124 shading, gouraud shading, Z-buffer, texture mapping, blending, fog and
125 antialiasing (when possible). There is also the support for rendering
126 in a window with a slow trick for the Voodoo Graphics (available only
127 for Linux) and at full speed with the Voodoo Rush chipset.
128 Under Linux is also possible to switch on-the-fly between the fullscreen
129 and in-window rendering hack.
130 There is also the support for using more than one Voodoo Graphics in the
131 some application/PC (you can create one context for each board and use
132 multiple video outputs for driving monitors, videoprojectors or HMDs).
133 The driver is able to fallback to pure software rendering when afeature
134 isn't supported by the Voodoo hardware (however software rendering is
135 very slow compared to hardware supported rendering)
144 Here are the basic steps for using the 3Dfx hardware with Mesa
147 - You'll need the Glide library and headers. Mesa expects:
148 /usr/local/glide/include/*.h // all the Glide headers
149 /usr/local/glide/lib/libglide2x.so
151 If your Glide libraries and headers are in a different directory
152 you'll have to modify the Mesa-config and mklib.glide files.
154 - Unpack the MesaLib-3.1.tar.gz and MesaDemos-3.1.tar.gz archives;
156 - If you're going to use a newer Mesa/Glide driver than v0.27 then
157 unpack the new driver archive over the Mesa directory.
159 - In the Mesa-3.1 directory type "make linux-glide"
161 - Compilation _should_ finish without errors;
163 - Set your LD_LIBRARY_PATH environment variable so that the
164 libglide2x.so and Mesa library files can be found. For example:
165 setenv LD_LIBRARY_PATH "/usr/local/glide/lib:/SOMEDIR/Mesa-3.1/lib"
167 - You'll have to run Glide-based programs as root or set the suid
174 ./gears (hit ESC to exit)
176 - You can find the demos especially designed for the Voodoo driver in
177 in the Mesa-3.1/3Dfx/demos directory (type "make" in order to compile
182 Check the WEB page at http://valerie.inf.elte.hu/~boga/Mesa.html
188 - The glide2x.lib have to be in the default MSVC++ lib directory;
190 - The Glide headers have to be in the default MSVC++ include directory;
192 - You must have the vcvars32.bat script in your PATH;
194 - Go to the directory Mesa-3.1 and run the mesafx.bat;
196 - The script will compile everything (Mesa-3.1/lib/OpenGL32.{lib,dll},
197 Mesa-3.1/lib/GLU32.{lib,dll}, Mesa-3.1/lib/GLUT32.{lib,dll} and
200 - At the end, you will be in the Mesa-3.1/3Dfx/demos directory;
202 - Try some demo (fire.exe, teapot.exe, etc.) in order to check if
203 everything is OK (you can use Alt-Tab or Ctrl-F9 to switch between
204 the Voodoo screen and the windows desktop);
206 - Remember to copy the Mesa OpenGL32.dll, GLU32.dll and GLUT32.dll in the
207 some directory were you run your Mesa based applications.
209 - I think that you can easy change the Makefile.fx files in order
210 to work with other kind of compilers;
212 - To discover how open the 3Dfx screen, read the sources under
213 the Mesa-3.1/3Dfx/demos directory. You can use the GLUT library or
214 the Diego Picciani's wgl emulator.
216 NOTE: the MSVC++ 5.0 optimizer is really buggy. Also if you install the
217 SP3, you could have some problem (you can disable optimization in order
218 solve these kind of problems).
221 Doing more with Mesa & Linux Glide:
222 -----------------------------------
224 The MESA_GLX_FX environment variable can be used to coax most
225 GLX-based programs into using Glide (and the __GLUT library
228 Full-screen 3Dfx rendering:
229 ---------------------------
231 1. Set the MESA_GLX_FX variable to "fullscreen":
234 export MESA_GLX_FX = "fullscreen"
236 setenv MESA_GLX_FX fullscreen
238 2. As root, run a GLX-based program (any GLUT demo on Linux).
240 3. Be careful: once the 3Dfx screen appears you won't be able
241 to see the GLUT windows on your X display. This can make using
242 the mouse tricky! One solution is to hook up your 3Dfx card to
243 a second monitor. If you can do this then set these env vars
246 setenv SST_VGA_PASS 1
247 setenv SST_NOSHUTDOWN
251 setenv SSTV2_VGA_PASS 1
252 setenv SSTV2_NOSHUTDOWN
254 Rendering into an X window with the help of the Voodoo hardware:
255 ----------------------------------------------------------------
257 1. Start your X server in 16 bpp mode (XFree86: startx -- -bpp 16)
258 in order to have the best performance and the best visual
259 quality. However you can use any visual depth supported by X.
261 2. Set the following environment variables:
262 export MESA_GLX_FX="window" # to enable window rendering
263 export SST_VGA_PASS=1 # to stop video signal switching
264 export SST_NOSHUTDOWN=1 # to stop video signal switching
266 setenv MESA_GLX_FX window
267 setenv SST_VGA_PASS 1
268 setenv SST_NOSHUTDOWN 1
270 (the Voodoo2 requires to use "SSTV2_" instead "SST_").
272 3. As root, try running a GLX-based program
274 How does it work? We use the 3Dfx hardware to do rendering then
275 copy the image from the 3Dfx frame buffer into an X window when
276 the SwapBuffers() function is called. The problem with this
277 idea is it's slow. The image must be copied from the 3Dfx frame
278 buffer to main memory then copied into the X window (and when the X
279 visual depth doesn't match the Voodoo framebufffer bit per pixel, it
280 is required also a pixel format translation).
282 NOTE: the in-window rendering feature only works with double-buffering.
285 On the fly switching between in window rendering and full screen rendering
286 --------------------------------------------------------------------------
288 The Mesa 2.6 has introduced the capability of switching
289 on-the-fly between the fullscreen/fullspeed rendering and the in-window
290 hack and vice versa. The on-the-fly switching requires a direct support
291 by the application but it is really easy to add. You have to start
292 your X server in 16 bpp mode and to add the following lines to your
295 #if defined(FX) && define(XMESA)
296 #include <GL/xmesa.h>
298 static int fullscreen=1;
303 /* In the GLUT keyboard event callback */
305 #if defined(FX) && !define(WIN32)
307 fullscreen=(!fullscreen);
308 XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW);
313 See the 3Dfx/demos/tunnel.c program
314 for an example. You have to set the -DXMESA flag in the Makefile's COPTS
317 Rendering into an X window with the X11 software driver:
318 --------------------------------------------------------
320 Set the MESA_GLX_FX variable to "disable" your GLX-based program will use
321 the X11 software driver (the 3Dfx hardware isn't used at all).
325 Useful Glide Environment Variables:
326 -----------------------------------
328 - To disable the 3Dfx logo, set the FX_GLIDE_NO_SPLASH variable.
330 - To disable video signal switching:
331 setenv SST_VGA_PASS 1
332 setenv SST_NOSHUTDOWN
334 setenv SSTV2_VGA_PASS 1
335 setenv SSTV2_NOSHUTDOWN
337 - To set the default screen refresh rate:
338 setenv SST_SCREENREFRESH=75
340 the supported values are 60, 70, 72, 75, 80, 85, 90, 100, 120.
342 - To force the Mesa library to swap buffers as fast as possible,
343 without any vertical blanking synchronization (useful for benchmarks):
344 setenv FX_GLIDE_SWAPINTERVAL 0
345 setenv SST_SWAP_EN_WAIT_ON_VIDSYNC 0
347 - You can slight improve the performances of your Voodoo1 board with
348 the following env. var.:
353 (don't use this setting with the Quantum3D 100SB or with any other
354 SLI configuration: it will hang everything !).
355 The following setting can be used with the Voodoo2:
356 setenv SSTV2_FASTMEM_RAS_READS=1
357 setenv SSTV2_FASTPCIRD=1
358 setenv SSTV2_GRXCLK=95
360 - The Quantum3D Obsidian3D-2 X-24 requires some special env. setting
361 in order to work under Linux:
363 export SSTV2_FT_CLKDEL=5
364 export SSTV2_TF0_CLKDEL=7
365 export SSTV2_TF1_CLKDEL=7
366 export SSTV2_TF2_CLKDEL=7
367 export SSTV2_SLIM_VIN_CLKDEL=3
368 export SSTV2_SLIM_VOUT_CLKDEL=2
369 export SSTV2_SLIS_VIN_CLKDEL=3
370 export SSTV2_SLIS_VOUT_CLKDEL=2
372 (Thanks to Phil Ross for this trick).
377 The Mesa/Voodoo Environment Variables:
378 --------------------------------------
380 - Only for Windows/Voodoo Rush users, if you define the
381 env. var. MESA_WGL_FX:
382 export MESA_WGL_FX=fullscreen
383 you will get fullscreen rendering;
385 - Only for Windows/Voodoo Rush users, if you define the
386 env. var. MESA_WGL_FX:
387 export MESA_WGL_FX=window
388 you will get window rendering (default value);
390 - Only for Linux users, you can find more informations about
391 the env. var. MESA_GLX_FX in the "Doing more with Mesa & Linux Glide"
394 - If you define the env. var. MESA_FX_SWAP_PENDING:
395 export MESA_FX_SWAP_PENDING=4
396 you will able to set the maximum number of swapbuffers
397 commands in the Voodoo FIFO after a swapbuffer (default value: 2);
399 - If you define the env. var. MESA_FX_INFO:
400 export MESA_FX_INFO=1
401 you will get some useful statistic.
403 - If you define the env. var. MESA_FX_NO_SIGNALS:
404 export MESA_FX_NO_SIGNALS=1
405 Mesa/FX will not install atexit() or signal() handlers.
409 Know BUGS and Problems:
410 -----------------------
412 - fog doesn't work in the right way when using the glDepthRange() function;
414 - Maximum texture size: 256x256 (this is an hardware limit);
416 - Texture border aren't yet supported;
418 - A GL_BLEND in a glTexEnv() is not supported (it is an hardware limit);
420 - Use the glBindTexture extension (standard in OpenGL 1.1) for texture
421 mapping (the old way: glTexImage inside a display list, download
422 the texture map each time that you call the display list !!!);
424 - Stencil buffer and Accumulation buffer are emulated in software (they are not
425 directly supported by the Hardware);
427 - Color index mode not implemented (this is an hardware limit);
429 - Thre is an know bug in the Linux Glide library so the in-window-rendering hack
430 and any other operations that requires to read the Voodoo frame buffer
431 (like the accumulation buffer support) doesn't work on Voodoo SLI cards.
433 - The driver switch to pure software (_slow_) rendering when:
436 - Using the Accumulation buffer;
437 - Blend enabled and blend equation != GL_FUNC_ADD_EXT;
438 - Color logic operation enabled and color logic operation != GL_COPY;
439 - Using GL_SEPARATE_SPECULAR_COLOR;
440 - The four values of glColorMask() aren't the some;
441 - Texture 1D or 3D enabled;
442 - Texture function is GL_BLEND;
443 - Using the Multitexture extension with Voodoo cards with only one TMU;
444 - Using the Multitexture extension with Voodoo cards with more than
445 one TMU, and texture function isn't GL_MODULATE;
446 - Point size is != 1.0 or point params vector != (1.0,0.0,0.0);
447 - Line width != 1.0 or using stipple lines.
448 - Using polygon offset or stipple polygons;
450 NOTE: this is list is not yet complete.
453 Hints and Special Features:
454 ---------------------------
456 - Under Linux and with a Voodoo Graphics board, you can use
457 XMesaSetFXmode(XMESA_FX_FULLSCREEN or XMESA_FX_WINDOW) in order to
458 switch on the fly between fullscreen rendering and the in-window-rendering
461 - The driver is able to use all the texture memory available: 2/4MB on
462 Voodoo1 boards and 8MB (!) on high-end Voodoo1 and Voodoo2 boards.
464 - Trilinear filtering is fully supported on Voodoo boards with two TMUs
465 (high-end Voodoo1 boards and Voodoo2 boards). When only one TMU is
466 available the driver fallback to bilinear filter also if you ask
467 for trilinear filtering.
469 - The Voodoo driver support multiple Voodoo Graphics boards in the
470 some PC. Using this feature, you can write applications that use
471 multiple monitors, videoprojectors or HMDs for the output. See
472 Mesa-3.1/3Dfx/demos/tunnel2.c for an example of how setup one
473 context for each board.
475 - The v0.19 introduces a new powerful texture memory manager: the
476 texture memory is used as a cache of the set of all defined texture
477 maps. You can now define several MBs of texture maps also with a 2MB
478 of texture memory (the texture memory manager will do automatically
479 all the swap out/swap in
480 texture memory work). The new texture memory manager has also
481 solved a lot of other bugs/no specs compliance/problems
482 related to the texture memory usage.
484 - Use triangles and quads strip: they are a LOT faster than sparse
487 - The Voodoo driver supports the GL_EXT_paletted_texture. it works
488 only with GL_COLOR_INDEX8_EXT, GL_RGBA palettes and the alpha value
489 is ignored because this is a limitation of the the current Glide
490 version and of the Voodoo hardware. See Mesa-3.1/3Dfx/demos/paltex.c for
491 a demo of this extension.
493 - The Voodoo driver directly supports 3Dfx Global Palette extension.
494 It was written for GLQuake and I think that it isn't a good idea
495 to use this extension for any other purpose (it is a trick). See
496 Mesa-3.1/3Dfx/demos/glbpaltex.c for a demo of this extension.
498 - The Voodoo driver chooses the screen resolution according to the
499 requested window size. If you open a 640x480 window, you will get
500 a 640x480 screen resolution, if you open a 800x600 window, you
501 will get a 800x600 screen resolution, etc.
502 Most GLUT demos support the '-geometry' option, so you can choose
503 the screen resolution: 'tunnel -geometry 800x600'.
504 Clearly, you Voodoo board must have enough framebuffer RAM (otherwise
505 the window creation will fail).
507 - The glGetString(GL_RENDERER) returns more information
508 about the hardware configuration: "Mesa Glide <version>
509 <Voodoo_Graphics|Voodoo_Rush|UNKNOWN> <num> CARD/<num> FB/
510 <num> TM/<num> TMU/<NOSLI|SLI>"
511 where: <num> CARD is the card used for the current context,
512 <num> FB is the number of MB for the framebuffer,
513 <num> TM is the number of MB for the texture memory,
514 <num> TMU is the number of TMU. You can try to run
515 Mesa/demos/glinfo in order to have an example of the output.
517 Did you find a lot BUGs and problems ? Good, send me an email.
524 For a complete FAQ check the Bernd Kreimeier's Linux 3Dfx HOWTO
525 available at http://www.gamers.org/dEngine/xf3D (it includes also
526 a lot of informations not strictly related to Linux, so it can be
527 useful also if you don't use Linux)
531 3Dfx Interactive, Inc. is the company which builds the VooDoo 3-D graphics
532 chipset (and others) used in popular PC cards such as the Diamond Monster 3D
533 and the Orchid Righteous 3D (more informations at http://www.3dfx.com).
538 Glide is a "thin" programming interface for the 3Dfx hardware. It was
539 originally written for Windows/Intel but has been ported to Linux/Intel
542 3Dfx, Inc. should be applauded for allowing the Linux version of Glide
545 You can directly program with the Glide library if you wish. You can
546 obtain Glide from the "Developer" section of the 3Dfx website: www.3dfx.com
547 There's a Linux/Glide newsgroup at news://news.3dfx.com/3dfx.glide.linux
552 "fxmesa" is the name of the Mesa device driver for the 3Dfx Glide library.
553 It was written by David Bucciarelli and others. It works on both Linux
554 and Windows. Basically, it allows you to write and run OpenGL-style programs
555 on the 3Dfx hardware.
560 Quake is a very popular game from id software, Inc. See www.idsoftware.com
561 GLQuake is a version of Quake written for OpenGL. There is now a Linux
562 version of GLQuake with works with the Mesa/3Dfx/Glide combo.
564 Here's what you need to run GLQuake on Linux:
565 PC with 100MHz Pentium or better
567 Mesa 3.1 libraries: libMesaGL.so libMesaGLU.so
568 Glide 2.4 libraries: libglide2x.so libtexus.so
571 Also, the windows version of GLQuake works fine with the Mesa OpenGL32.dll,
572 you have only to copy the Mesa-3.1/lib/OpenGL32.dll in the GLQuake directory
573 in order to test 'MesaQuake'.
578 GLUT is Mark Kilgard's OpenGL Utility Toolkit. It provides an API for
579 writing portable OpenGL programs with support for multiple windows, pop-
580 up menus, event handling, etc.
582 Check the Mark's home page for more informations (http://reality.sgi.com/mjk_asd).
584 Every OpenGL programmer should check out GLUT.
586 GLUT on Linux uses GLX.
591 GLX is the OpenGL extension to the X Window System. I defines both a
592 programming API (glX*() functions) and a network protocol. Mesa implements
593 an emulation of GLX on Linux. A real GLX implementation would requires
594 hooks into the X server. The 3Dfx hardware can be used with GLX-based
595 programs via the MESA_GLX_FX environment variable.
598 7. Is the Voodoo driver able to use the 4Mb texture memory of
601 Yes, the Voodoo driver v0.20 includes the support for Voodoo
602 Graphics boards with more than 2Mb of texture memory.
605 8. Do the Voodoo driver support the Voodoo Rush under Windows ?
607 Yes, Diego Picciani has developed the support for the Voodoo
608 Rush but David Bucciarelli has a Pure3D and a Monster3D and Brian Paul
609 has a Monster3D, so the new versions of the Mesa/Voodoo sometime are
610 not tested with the Voodoo Rush.
613 9. Do the Voodoo driver support the Voodoo Rush under Linux ?
615 No because the Linux Glide doesn't (yet) support the Voodoo Rush.
618 10. Can I sell my Mesa/Voodoo based software and include
619 a binary copy of the Mesa in order to make the software
620 working out of the box ?
625 11. Which is the best make target for compiling the Mesa for
626 Linux GLQuake ('make linux-glide', 'make linux-386-glide', etc.) ?
628 'make linux-386-opt-glide' for Voodoo1 and 'make linux-386-opt-V2-glide'
629 for Voodoo2 boards because it doesn't include the '-fPIC'
630 option (4-5% faster).
633 12. Can I use a Mesa compiled with a 'make linux-386-opt-V2-glide'
634 for my applications/programs/demos ?
636 Yes, there is only one constrain: you can't run two Mesa applications
637 at the some time. This isn't a big issue with the today Voodoo Graphics.
643 Henri Fousse (he has written several parts of the v0.15 and the old GLUT
646 Diego Picciani (he has developed all the Voodoo Rush support and the wgl
649 Daryll Strauss (for the Linux Glide and the first Linux support);
651 Brian Paul (of course);
653 Dave 'Zoid' Kirsch (for the Linux GLQuake and Linux Quake2test/Q2 ports)
655 Bernd Kreimeier (for the Linux 3Dfx HOWTO and for pushing companies to offer
656 a better Linux support)
658 3Dfx and Quantum3D (for actively supporting Linux)
660 The most update places where find Mesa VooDoo driver related informations are
661 the Mesa mailing list and my driver WEB page
662 (http://www-hmw.caribel.pisa.it/fxmesa/index.shtml)
665 David Bucciarelli (davibu@tin.it)
670 Tel./Fax +39-50-554108
671 email: info.hmw@plus.it
672 www: www-hmw.caribel.pisa.it