home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 5 / MA_Cover_5.iso / ppc / mesa / readme.3dfx < prev    next >
Encoding:
Text File  |  1998-01-31  |  13.6 KB  |  432 lines

  1.  
  2.                      3Dfx Glide device driver for Mesa 2.5
  3.                 (see below for FAQ)
  4.  
  5.  
  6. This software is distributed under the terms of the GNU Library
  7. General Public License, see the LICENSE.TXT file for details.
  8.  
  9.  
  10.  
  11. What do you need ?
  12. ------------------
  13.  
  14.     - A PC with a 3Dfx Voodoo Graphics or Voodoo Rush based board
  15.       (Pure3D, Monster 3D, R3D, Obsidian, Stingray 128/3D, etc.);
  16.  
  17.     - Mesa 2.5;
  18.  
  19.     - The 3Dfx Glide library 2.3 or later for your OS (the 2.4 works fine);
  20.  
  21.     - A compiler supported by the Glide library (Micro$oft VC++ (tested),
  22.       Watcom (tested), GCC for Linux (tested), etc.);
  23.  
  24.     - A lot of patience, this is an alpha release.
  25.  
  26.     - It's nice to have two monitors- one for your normal graphics
  27.       card and one for your 3Dfx card.  If something goes wrong with
  28.       an application using the 3Dfx hardware you can still see your
  29.       normal screen in order to recover.
  30.  
  31.  
  32.  
  33. Tested on:
  34. ----------
  35.     Windows 95 - David Bucciarelli
  36.     Windows NT - Henri Fousse
  37.     MS-DOS
  38.     Linux - Daryll Strauss, Brian Paul, David Bucciarelli
  39.  
  40.  
  41.  
  42. What is able to do ?
  43. --------------------
  44.  
  45.     - It is able accelerate points, lines and polygon with flat
  46.       shading, gouraud shading, Z-buffer, texture mapping, blending. There
  47.           is also the support for rendering in a window (with a slow trick for
  48.           the Voodoo Graphics (available only for Linux) and at full speed with
  49.       the Voodoo Rush chipset).
  50.  
  51.  
  52.  
  53. How to compile:
  54. ---------------
  55.  
  56. MS Windows:
  57. -----------
  58.  
  59.     For the MSVC++:
  60.     - The glide2x.lib and the texus.lib have to be in the default MSVC++
  61.       lib directory;
  62.  
  63.     - The Glide headers have to be in the default MSVC++ include directory;
  64.  
  65.     - You must have the vcvars32.bat script in your PATH;
  66.  
  67.     - Go to the directory Mesa-2.5 and run the mesafx.bat;
  68.  
  69.     - The script will compile everything (Mesa-2.5/lib/OpenGL32.{lib,dll},
  70.       Mesa-2.5/lib/GLU32.{lib,dll}, Mesa-2.5/lib/GLUT32.{lib,dll} and
  71.           Voodoo demos);
  72.  
  73.     - At the end, you will be in the Mesa-2.5/3Dfx/demos directory;
  74.  
  75.     - Try some demo (fire.exe, teapot.exe, etc.) in order to check if
  76.       everything is OK;
  77.  
  78.     - Remember to copy the Mesa OpenGL32.dll, GLU32.dll and GLUT32.dll in the
  79.           some directory were you run your Mesa based applications.
  80.  
  81.     - I think that you can easy change the Makefile.fx files in order
  82.       to work with other kind of compilers;
  83.  
  84.     - To discover how open the 3Dfx screen, read the sources under
  85.       the Mesa-2.5/3Dfx/demos directory. You can use the GLUT library or
  86.           the Diego Picciani's wgl emulator.
  87.  
  88.  
  89. Linux:
  90. ------
  91.     Here are the basic steps for using the 3Dfx hardware with Mesa
  92.     on Linux:
  93.  
  94.     - You'll need the Glide library and headers.  Mesa expects:
  95.         /usr/local/glide/include/*.h        // all the Glide headers
  96.         /usr/local/glide/lib/libglide2x.so
  97.         /usr/local/glide/lib/libtexus.so
  98.  
  99.       If your Glide libraries and headers are in a different directory
  100.       you'll have to modify the Mesa-config and mklib.glide files.
  101.  
  102.     - Unpack the MesaLib-2.5.tar.gz and MesaDemos-2.5.tar.gz archives;
  103.  
  104.     - If you're going to use a newer Mesa/Glide driver than v0.20 then
  105.           unpack the new driver archive over the Mesa directory.
  106.  
  107.     - There is an small error in the Glide texus.h: two C++ comments (//);
  108.       You have to translate the comments in C (/*  */) by hand;
  109.  
  110.     - In the Mesa-2.5 directory type "make linux-glide"
  111.  
  112.     - Compilation _should_ finish without errors;
  113.  
  114.     - Set your LD_LIBRARY_PATH environment variable so that the
  115.       libglide2x.so and Mesa library files can be found.  For example:
  116.         setenv LD_LIBRARY_PATH "/usr/local/glide/lib:/SOMEDIR/Mesa-2.5/lib"
  117.  
  118.     - You'll have to run Glide-based programs as root or set the suid
  119.       bit on executables;
  120.  
  121.     - Try a demo:
  122.         cd gdemos
  123.         su
  124.         setenv MESA_GLX_FX f
  125.         ./gears     (hit ESC to exit)
  126.  
  127.     - You can find the demos especially designed for the Voodoo driver in
  128.       in the Mesa-2.5/3Dfx/demos directory (type "make" in order to compile
  129.       everything).
  130.       
  131.  
  132.  
  133. Doing more with Mesa & Linux Glide:
  134. -----------------------------------
  135.  
  136.     When building Mesa with 'make linux-glide' the gltk and glaux
  137.     toolkits are compiled especially for 3Dfx Glide support using
  138.     the fx/Mesa interface defined in GL/fxmesa.h.
  139.  
  140.     You can use the GL/fxmesa.h interface for your own applications
  141.     if you want.  However, the glaux/gltk toolkits will be retired
  142.     after Mesa 2.5 in favor    of GLUT.
  143.  
  144.     There's another way to use the Mesa Glide support without these
  145.     special versions of gltk/glaux.  The MESA_GLX_FX environment
  146.     variable can be used to coax most GLX-based programs into using
  147.     Glide (and the __GLUT library is GLX-based__).
  148.  
  149.         Full-screen 3Dfx rendering:
  150.         ---------------------------
  151.  
  152.     1. Set the MESA_GLX_FX variable to "fullscreen":
  153.  
  154.         ksh:
  155.             export MESA_GLX_FX = "fullscreen"
  156.         csh:
  157.             setenv MESA_GLX_FX fullscreen
  158.  
  159.     2. As root, run a GLX-based program (any GLUT demo on Linux).
  160.     
  161.     3. Be careful:  once the 3Dfx screen appears you won't be able
  162.     to see the GLUT windows on your X display.  This can make using
  163.     the mouse tricky!  One solution is to hook up your 3Dfx card to
  164.     a second monitor.  If you can do this then set these env vars
  165.     first:
  166.  
  167.         setenv SST_VGA_PASS 1
  168.         setenv SST_NOSHUTDOWN
  169.  
  170.  
  171.         Rendering into an X window with the help of the Voodoo hardware:
  172.         ----------------------------------------------------------------
  173.  
  174.     1. Start your X server in 16 bpp mode (XFree86:  startx -- -bpp 16)
  175.  
  176.     2. Set the following environment variables:
  177.         export MESA_GLX_FX="window"    // to enable window rendering
  178.         export SST_VGA_PASS=1    // to stop video signal switching
  179.         export SST_NOSHUTDOWN=1    // to stop video signal switching
  180.         OR
  181.         setenv MESA_GLX_FX window
  182.         setenv SST_VGA_PASS 1
  183.         setenv SST_NOSHUTDOWN 1
  184.  
  185.     3. As root, try running a GLX-based program
  186.  
  187.     How does it work?  We use the 3Dfx hardware to do rendering then
  188.     copy the image from the 3Dfx frame buffer into an X window when
  189.     the SwapBuffers() function is called.  The problem with this
  190.     idea is it's slow.  The image must be copied from the 3Dfx frame
  191.     buffer to main memory then copied into the X window.
  192.  
  193.     You can use glaux/gltk-based programs with the MESA_GLX_FX env var if
  194.     you've compiled the gltk/glaux libraries with 'linux-elf' instead of
  195.     'linux-glide':
  196.  
  197.         cd Mesa/src-tk
  198.         make realclean
  199.         make linux-elf
  200.         cd ../src-aux
  201.         make realclean
  202.         make linux-elf
  203.  
  204.  
  205.         Rendering into an X window with the X11 software driver:
  206.         --------------------------------------------------------
  207.  
  208.     Undefine the MESA_GLX_FX env var and your GLX-based program will use
  209.     the X11 software driver (the 3Dfx hardware isn't used at all).
  210.  
  211.  
  212.  
  213. Useful Glide Environment Variables:
  214. -----------------------------------
  215.  
  216.     - To disable the 3Dfx logo, set the FX_GLIDE_NO_SPLASH variable.
  217.  
  218.     - To disable video signal switching:
  219.         setenv SST_VGA_PASS 1
  220.         setenv SST_NOSHUTDOWN
  221.  
  222.         - To set the default screen refresh rate:
  223.                 setenv SST_SCREENREFRESH=75
  224.  
  225.           the supported values are 60, 70, 72, 75, 80, 85, 90, 100, 120.
  226.  
  227.  
  228. Know BUGS, problems and Hints:
  229. ------------------------------
  230.  
  231.     - maximum texture size: 256x256 (this is an hardware limit);
  232.  
  233.     - only GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA,
  234.       GL_RGB and GL_RGBA texture channels supported (the support
  235.       don't yet follow all the OpenGL specs);
  236.  
  237.     - only one context supported;
  238.  
  239.         - use the glBindTexture extension (standard in OpenGL 1.1) for texture
  240.       mapping (the old way: glTexImage inside a display list, download
  241.       the texture map each time that you call the display list !!!);
  242.  
  243.     - the alpha buffer doesn't yet works but you can use all the glBlend
  244.       functions that don't use the alpha buffer (all functions without
  245.       the DST_ALPHA);
  246.  
  247.     - very simple Bitmap support (but the GLUT and Tk font functions work
  248.       fine);
  249.  
  250.     - color index mode not implemented.
  251.  
  252.  
  253.  
  254. Hints and Special Features:
  255. ---------------------------
  256.  
  257.     - the v0.19 introduces a new powerful texture memory manager: the
  258.       texture memory is used as a cache of the set of all defined texture
  259.       maps. You can now define several MB of texture maps also with a 2MB
  260.       of texture memory (the texture memory manager will do automatically
  261.       all the swap out/swap in
  262.       texture memory work). The new texture memory manager has also
  263.       solved a lot of other bugs/no specs compliance/problems
  264.       related to the texture memory usage.
  265.  
  266.     - use triangles and quads strip: they are a LOT faster than sparse
  267.       triangles and quads;
  268.  
  269.     - the Voodoo driver supports the GL_EXT_paletted_texture. it works
  270.       only with GL_COLOR_INDEX8_EXT, GL_RGBA palettes and the alpha value
  271.       is ignored because this is a limitation of the the current Glide
  272.       version and of the Voodoo hardware. See Mesa-2.5/3Dfx/demos/paltex.c for
  273.       a demo of this extension.
  274.  
  275.     - the Voodoo driver directly supports 3Dfx Global Palette extension.
  276.       It was written for GLQuake and I think that it isn't a good idea
  277.       to use this extension for any other purpose (it is a trick). See
  278.       Mesa-2.5/3Dfx/demos/glbpaltex.c for a demo of this extension.
  279.  
  280.     - (DON'T USE THIS FEATURE: now the the Voodoo driver has a real texture
  281.       memory manager and support the OpenGL extensions for palette texture maps,
  282.       I'm thinking to remove this feature in a near future)
  283.       you can enable the 8bit textures feature using the following driver
  284.       function just before the texture definitions:
  285.  
  286.       #ifdef FX
  287.           fxMesaTextureUsePalette(1);
  288.       #endif
  289.  
  290.       All textures declared as GL_RGB will be stored using an ad hoc
  291.       palette with 256 entry and with an 8bit per pixel texture memory
  292.       usage (again the default 16 bit). The driver and the Texus library
  293.       have a lot of preprocessing to do (quantization, dithering, etc.)
  294.       in order to translate the GL_RGB texture to the 8bit format, so
  295.       don't be surprised if the startup of your program is slow
  296.       (downloading 35 large textures can requires more than 30 sec !).
  297.  
  298.         - If you define the env. var. MESA_FX_INFO:
  299.                   export MESA_FX_INFO=1
  300.  
  301.           you will get some useful statistic.
  302.  
  303. Did you find a lot BUGs and problems ? Good, send me an email.
  304.  
  305.  
  306.  
  307. FAQ:
  308. ----
  309.  
  310. 1. What is 3Dfx?
  311.  
  312. 3Dfx Interactive, Inc. is the company which builds the VooDoo 3-D graphics
  313. chipset (and others) used in popular PC cards such as the Diamond Monster 3D
  314. and the Orchid Righteous 3D (more informations at http://www.3dfx.com).
  315.  
  316.  
  317. 2. What is Glide?
  318.  
  319. Glide is a "thin" programming interface for the 3Dfx hardware.  It was
  320. originally written for Windows/Intel but has been ported to Linux/Intel
  321. by Daryll Strauss.
  322.  
  323. 3Dfx, Inc. should be applauded for allowing the Linux version of Glide
  324. to be written.
  325.  
  326. You can directly program with the Glide library if you wish.  You can
  327. obtain Glide from the "Developer" section of the 3Dfx website: www.3dfx.com
  328. There's a Linux/Glide newsgroup at news://news.3dfx.com/3dfx.glide.linux
  329.  
  330.  
  331. 3. What is fxmesa?
  332.  
  333. "fxmesa" is the name of the Mesa device driver for the 3Dfx Glide library.
  334. It was written by David Bucciarelli and others.  It works on both Linux
  335. and Windows.  Basically, it allows you to write and run OpenGL-style programs
  336. on the 3Dfx hardware.
  337.  
  338.  
  339. 4. What is GLQuake?
  340.  
  341. Quake is a very popular game from id software, Inc.  See www.idsoftware.com
  342. GLQuake is a version of Quake written for OpenGL.  There is now a Linux
  343. version of GLQuake with works with the Mesa/3Dfx/Glide combo.
  344.  
  345. Here's what you need to run GLQuake on Linux:
  346.    PC with 100MHz Pentium or better
  347.    a 3Dfx-based card
  348.    Mesa 2.5 libraries:  libMesaGL.so  libMesaGLU.so
  349.    Glide 2.4 libraries:  libglide2x.so  libtexus.so
  350.    GLQuake for Linux.
  351.  
  352. Also, the windows version of GLQuake works fine with the Mesa OpenGL32.dll,
  353. you have only to copy the Mesa-2.5/lib/OpenGL32.dll in the GLQuake directory
  354. in order to test 'MesaQuake'.
  355.  
  356.  
  357. 5. What is GLUT?
  358.  
  359. GLUT is Mark Kilgard's OpenGL Utility Toolkit.  It provides an API for
  360. writing portable OpenGL programs with support for multiple windows, pop-
  361. up menus, event handling, etc.
  362.  
  363. Check the Mark's home page for more informations (http://reality.sgi.com/mjk_asd).
  364.  
  365. Every OpenGL programmer should check out GLUT.
  366.  
  367. GLUT on Linux uses GLX.
  368.  
  369.  
  370. 6. What is GLX?
  371.  
  372. GLX is the OpenGL extension to the X Window System.  I defines both a
  373. programming API (glX*() functions) and a network protocol.  Mesa implements
  374. an emulation of GLX on Linux.  A real GLX implementation would requires
  375. hooks into the X server.  The 3Dfx hardware can be used with GLX-based
  376. programs via the MESA_GLX_FX environment variable.
  377.  
  378.  
  379. 7. Is the Voodoo driver able to use the 4Mb texture memory of
  380. the Pure3D boards ?
  381.  
  382. Yes, the Voodoo driver v0.20 includes the support for Voodoo
  383. Graphics boards with more than 2Mb of texture memory.
  384.  
  385.  
  386. 8. Do the Voodoo driver support the Voodoo Rush under Windows ?
  387.  
  388. Yes, Diego Picciani has developed the support for the Voodoo
  389. Rush but David Bucciarelli has a Pure3D and a Monster3D and Brian Paul
  390. has a Monster3D, so the new versions of the Mesa/Voodoo sometime are
  391. not tested with the Voodoo Rush.
  392.  
  393.  
  394. 9. Do the Voodoo driver support the Voodoo Rush under Linux ?
  395.  
  396. No because the Linux Glide doesn't (yet) support the Voodoo Rush.
  397.  
  398.  
  399.  
  400. Thanks to:
  401. ----------
  402.  
  403. Henri Fousse (he has written several parts of the v0.15 and the GLUT
  404.           emulator for Win);
  405.  
  406. Diego Picciani (he has developed all the Voodoo Rush support and the wgl
  407.             emulator);
  408.  
  409. Daryll Strauss (for the Linux Glide and the first Linux support);
  410.  
  411. Brian Paul (of course);
  412.  
  413. Dave 'Zoid' Kirsch (for the LinuxGLQuake and LinuxQ2test ports).
  414.  
  415. The most update places where find Mesa VooDoo driver related informations are
  416. the Mesa mailing list and my driver WEB page
  417. (http://www-hmw.caribel.pisa.it/fxmesa/index.shtml)
  418.  
  419.  
  420. David Bucciarelli (tech.hmw@plus.it)
  421.  
  422. Humanware s.r.l. 
  423. Via XXIV Maggio 62
  424. Pisa, Italy
  425. Tel./Fax +39-50-554108
  426. email: info.hmw@plus.it
  427. www: www-hmw.caribel.pisa.it
  428.  
  429.  
  430. ------------------------------------------------------------------------------
  431. File last updated on 14 October 1997 by Brian Paul
  432.