Merge remote branch 'vdpau/pipe-video' into pipe-video
[mesa.git] / docs / README.DJ
index 26fd9d05396bf1c59bb826d6e0deed00eb5f35fd..5f783ac53fb7f20421f7e20744c5072887350c11 100644 (file)
@@ -1,22 +1,21 @@
-                       Mesa 5.0.1 DOS/DJGPP Port v1.4
-                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+                       Mesa 6.5 DOS/DJGPP Port v1.8
+                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 
 Description:
 ~~~~~~~~~~~~
 
-Well, guess what... this is the DOS port of Mesa 5.0.1, for DJGPP fans... Whoa!
-The driver has its origins in ddsample.c, written by Brian Paul and found by me
-in Mesa 3.4.2.
+Well, guess what... this is the DOS port of Mesa 6.5, for DJGPP fans... Whoa!
+The driver uses OSMesa to draw off screen, and then blits the buffer.  This is
+not terribly efficient, and has some drawbacks, but saves maintenance costs.
 
 
 
 Legal:
 ~~~~~~
 
-Mesa copyright applies, provided this package is used within Mesa. For anything
-else, see GPL.
+Mesa copyright applies.
 
 
 
@@ -31,29 +30,15 @@ Available options:
 
      Environment variables:
        CPU             optimize for the given processor.
-                       default = k6
-       GLU=[mesa|sgi]  specify GLU directory; can be `sgi' (requires GNU/C++)
-                       or `mesa'.
-                       default = mesa
-       GLIDE           path to Glide3 SDK include files; used with FX.
-                       default = $(TOP)/include/glide3
+                       default = pentium
+       GLIDE           path to Glide3 SDK; used with FX.
+                       default = $(TOP)/glide3
        FX=1            build for 3dfx Glide3. Note that this disables
                        compilation of most DMesa code and requires fxMesa.
                        As a consequence, you'll need the DJGPP Glide3
                        library to build any application.
                        default = no
-       MATROX=1        build for Matrox Millennium I (MGA2064W) cards.
-                       This is experimental and not intensively tested.
-                       default = no
-       HAVE_X86=1      optimize for i386.
-                       default = no
-       HAVE_MMX=1      allow MMX specializations, provided your assembler
-                       supports MMX instruction set. However, the true CPU
-                       capabilities are checked at run-time to avoid lockups.
-                       default = no
-       HAVE_SSE=1      (see HAVE_MMX)
-                       default = no
-       HAVE_3DNOW=1    (see HAVE_MMX)
+       X86=1           optimize for x86 (if possible, use MMX, SSE, 3DNow).
                        default = no
 
      Targets:
@@ -67,11 +52,9 @@ Available options:
 
 
 Tested on:
-       CPU:            AMD Athlon XP 1800+
-       Mainboard:      EP-8KTA3 w/ 128 MB SDRAM
-       Video card:     Voodoo5 5500 AGP w/ 64 MB SDRAM
-       DJGPP:          djdev 2.04 + gcc v3.2.2 + make v3.79.1
-       OS:             DOS and Win98SE
+       Video card:     Radeon 9500
+       DJGPP:          djdev 2.04 + gcc v4.1.0 + make v3.80
+       OS:             DOS, Win98SE, WinXP (using Videoport driver)
 
 
 
@@ -97,33 +80,62 @@ FAQ:
    A) DXE3 refers to the DJGPP dynamic modules. You'll need either the latest
       DJGPP distro, or download the separate package from my web page. Read the
       DXE3 documentation on how to use them.
-   A) When compiling for Glide (FX=1), make sure `glid3.dxe' can be found in
+   A) When compiling for Glide (FX=1), make sure `glide3x.dxe' can be found in
       LD_LIBRARY_PATH (or top `lib' directory).
 
 2. Using Mesa for DJGPP
 
+   Q) Every test I tried crashes badly.
+   A) If you have compiled with SSE and you're running under plain DOS, you
+      have to disable SSE at run-time. See environment variables below.
+
    Q) DMesa is so SLOOOW! The Win32 OpenGL performs so much better...
-   A) Is that a question? If you have a 3dfx Voodoo Banshee or higher card,
-      you're lucky (check http://sourceforge.net/projects/glide for the DJGPP
-      port). If you have a Matrox Millennium I card, you just MIGHT be lucky...
-      If you haven't, sorry; everything is done in software. Suggestions?
+   A) Is that a question? If you have a 3dfx Voodoo (any model), you're
+      lucky (check http://sourceforge.net/projects/glide for the DJGPP port).
+      If you haven't, sorry; everything is done in software.
 
    Q) I tried to set refresh rate w/ DMesa, but without success.
-   A) Refresh rate control works only for VESA 3.0. If you were compiling for
-      Glide, see Glide info. If not, sorry!
+   A) Refresh rate control works only for VESA 3.0 and the 3dfx driver (in
+      which case FX_GLIDE_REFRESH will be overwritten if it is defined and
+      is not 0).
 
    Q) I made a simple application and it does nothing. It exits right away. Not
       even a blank screen.
-   A) The pure software drivers (VESA/VGA) support only double-buffered modes.
+   A) Software drivers (VESA/VGA/NUL) must to be constructed as single-buffered
+      visuals.  However, DMesaSwapBuffers must be called to get any output.
    A) Another weird "feature" is that buffer width must be multiple of 8 (I'm a
       lazy programmer and I found that the easiest way to keep buffer handling
       at peak performance ;-).
 
-   Q) My demo doesn't display text. I know I used the GLUT font routines!
-   A) Then you probably use GLUT as a DXE. Well, there is no direct access to
-      variables due to the way DXE works. Read the documentation. The author of
-      GLUT took this into account for _WIN32 DLL's only; I don't want to modify
-      his headers. The only workaround is to link GLUT the old way :-(
+   Q) I'm getting a "bad font!" fatal error.
+   A) Always use GLUT_STROKE_* and GLUT_BITMAP_* constants when dealing with
+      GLUT fonts. If you're using `glut.dxe', then make sure GLUT_STROKE_* and
+      GLUT_BITMAP_* are mapped to integer constants, not to the actual font
+      address (same mechanism used for Win32 _DLL).
+
+   Q) What is NUL driver good for, if I don't get any output at all?
+   A) For debugging. The NUL driver is very much like OSMesa. Everything is
+      done just the same as VESA/VGA drivers, only it doesn't touch your video
+      hardware. You can query the actual buffer by issuing:
+       DMesaGetIntegerv(DMESA_GET_BUFFER_ADDR, &buffer);
+      and dump it to a file.
+
+   Q) How do I query for a list of available video modes to choose as a visual?
+   A) This is an ugly hack, for which I'm sure I'll burn in hell.
+      First, query for a list of modes:
+       n = DMesaGetIntegerv(DMESA_GET_VIDEO_MODES, NULL);
+      If `n' is strictly positive, you allocate an array of pointers to a given
+      struct (which is guaranteed to be extended only - not changed in future):
+       struct {
+               int xres, yres;
+               int bpp;
+       } **l = malloc(n * sizeof(void *));
+      Now pass the newly allocated buffer to fill in:
+       DMesaGetIntegerv(DMESA_GET_VIDEO_MODES, (GLint *)l);
+      And collect the info:
+       for (i = 0; i < n; i++) {
+           printf("%dx%d:%d\n", l[i]->xres, l[i]->yres, l[i]->bpp);
+       }
 
    Q) The GLUT is incomplete.
    A) See below.
@@ -166,16 +178,24 @@ means that `printf' can be safely called during graphics. A bit of a hack, I
 know, because all messages come in bulk, but I think it's better than nothing.
 "Borrowed" from LIBRHUTI (Robert Hoehne).
 
-Window creating defaults: 300x300x16 at (0,0), 16-bit depth, 16-bit accum,
-8-bit stencil. However, the video mode is chosen in such a way that first
-window will fit. If you need high resolution with small windows, set initial
-position far to the right (or way down); then you can move them back to any
-position right before the main loop.
+Window creating defaults: (0, 0, 300, 300), 16bpp. However, the video mode is
+chosen in such a way that first window will fit. If you need high resolution
+with small windows, set initial position far to the right (or way down); then
+you can move them back to any position right before the main loop.
+
+
 
-The following environment variables can customize GLUT behaviour:
+Environment variables:
+~~~~~~~~~~~~~~~~~~~~~~
+       DMESA_NULDRV            - (any value) force NUL driver
+       GLUT_FPS                - print frames/second statistics to stderr
+       MESA_NO_SSE             - (any value) safe option under pure DOS
        DMESA_GLUT_REFRESH      - set vertical screen refresh rate (VESA3)
        DMESA_GLUT_BPP          - set default bits per pixel (VGA needs 8)
-       GLUT_FPS                - print frames/second statistics to stderr
+       DMESA_GLUT_ALPHA        - set default alpha bits (8)
+       DMESA_GLUT_DEPTH        - set default depth bits (16)
+       DMESA_GLUT_STENCIL      - set default stencil bits (8)
+       DMESA_GLUT_ACCUM        - set default accum bits (16)
 
 
 
@@ -212,14 +232,44 @@ v1.3 (mar-2003)
        * revamped GLUT
        * switched to DXE3
 
-v1.4 (jun-2003)
+v1.4 (dec-2003)
+       + enabled GLUT fonts with DXE
+       + truly added multi-window support in GLUT (for Adrian Woodward)
        * accomodated makefiles with the new sourcetree
+       * fixed some ALPHA issues
+       * minor changes to PC_HW/timer interface
+       x hacked and slashed the 3dfx driver (w/ help from Hiroshi Morii)
+
+v1.5 (jan-2004)
+       + added interface to query available "visuals" (GLFW - Marcus Geelnard)
+       + added GLUT timer callback
+       - removed Matrox Millennium MGA2064W driver
+       x more changes to the 3dfx driver
+
+v1.6 (aug-2004)
+       + implemented NUL driver
+       + added DMesaGetProcAddress and glutGetProcAddress
+       * reorganized fxMesa wrapper to handle multiple contexts
+       ! fixed a horrible bug in VGA initialization routine
+       ! fixed partial clears
+
+v1.7 (???-2005)
+       + enabled OpenGL 2.0 support
+       + added support for sw texture compression
+       + added FreeGLUT specific functions
+       * no more GLX sources in DOS GLUT
+       * made GLUT timer callbacks less accurate but safer
+
+v1.8 (apr-2006)
+       * killed lots of code, the driver is now a front-end to OSMesa
+       * fixed problem with WinNT (http://www.volny.cz/martin.sulak/)
+       - removed 3dfx Glide3 support (temporarily?)
 
 
 
 Contact:
 ~~~~~~~~
 
-Name:   Borca Daniel
-E-mail: dborca@yahoo.com
+Name:   Daniel Borca
+E-mail: dborca@users.sourceforge.net
 WWW:    http://www.geocities.com/dborca/