Brian Paul | e0193a9 | 2002-02-23 17:11:27 +0000 | [diff] [blame^] | 1 | Mesa 4.0.1 DOS/DJGPP Port version 0.2
|
Brian Paul | db41d2e | 2002-02-12 03:24:56 +0000 | [diff] [blame] | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 3 |
|
| 4 |
|
| 5 |
|
Brian Paul | e0193a9 | 2002-02-23 17:11:27 +0000 | [diff] [blame^] | 6 | Description:
|
| 7 | ~~~~~~~~~~~~
|
Brian Paul | db41d2e | 2002-02-12 03:24:56 +0000 | [diff] [blame] | 8 |
|
Brian Paul | e0193a9 | 2002-02-23 17:11:27 +0000 | [diff] [blame^] | 9 | This is the DOS port of MESA 4.0, for DJGPP programmers... It features some
|
| 10 | sort of hardware acceleration, but it's pretty thin: it is entirely based on
|
| 11 | VBEAF.DRV from the FreeBE/AF project (http://www.talula.demon.co.uk/freebe/).
|
| 12 | Note that SciTech's driver isn't supported because I hate the `nearptr' hack.
|
| 13 | Anyway, these drivers don't provide ANY 3D function :-( Moreover, it seems to
|
| 14 | me the FreeBE/AF project is not really up to date... Well, it's not much, my
|
| 15 | intention was to open the door ;-)
|
Brian Paul | db41d2e | 2002-02-12 03:24:56 +0000 | [diff] [blame] | 16 |
|
| 17 |
|
| 18 |
|
| 19 | Legal:
|
| 20 | ~~~~~~
|
| 21 |
|
Brian Paul | e0193a9 | 2002-02-23 17:11:27 +0000 | [diff] [blame^] | 22 | MESA copyright applies.
|
Brian Paul | db41d2e | 2002-02-12 03:24:56 +0000 | [diff] [blame] | 23 |
|
Brian Paul | e0193a9 | 2002-02-23 17:11:27 +0000 | [diff] [blame^] | 24 |
|
| 25 |
|
| 26 | Installation:
|
| 27 | ~~~~~~~~~~~~~
|
| 28 |
|
| 29 | Type "make -f Makefile.DJ" to compile the libraries. Long filename support is
|
| 30 | required during compilation. The examples are not built automagically (see
|
| 31 | Pitfalls below).
|
| 32 |
|
| 33 | Tested on:
|
| 34 | CPU: Intel Pentium w/ MMX @166 MHz
|
| 35 | Mainboard: ViA Apollo VP2 w/ 128 MB SDRAM
|
| 36 | Video card: Matrox Millenium 2064W w/ 2048 kB WRAM, BIOS v3.0
|
| 37 | DJGPP: djdev 2.03
|
| 38 | gcc v3.0.3
|
| 39 | make v3.79
|
Brian Paul | db41d2e | 2002-02-12 03:24:56 +0000 | [diff] [blame] | 40 |
|
| 41 |
|
| 42 |
|
| 43 | libGL (the core):
|
| 44 | ~~~~~~~~~~~~~~~~~
|
| 45 |
|
Brian Paul | e0193a9 | 2002-02-23 17:11:27 +0000 | [diff] [blame^] | 46 | Of course, MESA 4.0 core sources are required. It will probably work with
|
Brian Paul | db41d2e | 2002-02-12 03:24:56 +0000 | [diff] [blame] | 47 | MESA 3.5, but not a chance with earlier versions due to major changes to the
|
| 48 | MESA driver interface and the directory tree. All should compile succesfully.
|
| 49 |
|
| 50 | The driver has its origins in ddsample.c, written by Brian Paul and found by
|
| 51 | me in MESA 3.4.2. I touched almost all the functions, changing the coding
|
Brian Paul | e0193a9 | 2002-02-23 17:11:27 +0000 | [diff] [blame^] | 52 | style :-( Sorry!
|
Brian Paul | db41d2e | 2002-02-12 03:24:56 +0000 | [diff] [blame] | 53 |
|
| 54 | Pitfalls:
|
| 55 | 1. The current version supports only RGB[A] modes, for it made no sense to me
|
| 56 | to endorse color-index (aka palette) modes.
|
Brian Paul | e0193a9 | 2002-02-23 17:11:27 +0000 | [diff] [blame^] | 57 | 2. Double-buffered uses page flipping if acceleration is available, else falls
|
| 58 | back to virtual buffer.
|
| 59 | 3. Single-buffered is not allowed with 24-bit modes, because direct access was
|
| 60 | wrong and fixing it would mean to slow down the other routines; until this
|
| 61 | is really, really necessary, it won't get reimplemented.
|
| 62 | 4. Another weird "feature" is that buffer width must be multiple of 4 (I'm a
|
| 63 | lazy programmer and I found that the easiest way to keep buffer handling at
|
| 64 | peak performance ;-).
|
| 65 | 5. The FreeBE/AF driver is searched in the current directory only; therefore,
|
| 66 | to disable hardware acceleration, make sure you don't have VBEAF.DRV where
|
| 67 | your application resides.
|
Brian Paul | db41d2e | 2002-02-12 03:24:56 +0000 | [diff] [blame] | 68 |
|
| 69 |
|
| 70 |
|
| 71 | libGLU:
|
| 72 | ~~~~~~~
|
| 73 |
|
Brian Paul | e0193a9 | 2002-02-23 17:11:27 +0000 | [diff] [blame^] | 74 | Mesa GLU sources are required. No comment!
|
Brian Paul | db41d2e | 2002-02-12 03:24:56 +0000 | [diff] [blame] | 75 |
|
| 76 |
|
| 77 |
|
| 78 | libGLUT (the toolkit):
|
| 79 | ~~~~~~~~~~~~~~~~~~~~~~
|
| 80 |
|
| 81 | Well, this "skeletal" GLUT implementation is not mine. Thanks should go to
|
| 82 | Bernhard Tschirren, Mark Kilgard, Brian Paul and probably others (or probably
|
| 83 | not ;-). I only changed it to be self-standing (Allegro-free). The keyboard,
|
| 84 | mouse and timer drivers were inspired from an old project of mine (D3Xl) and
|
Brian Paul | e0193a9 | 2002-02-23 17:11:27 +0000 | [diff] [blame^] | 85 | fixed with some Allegro "infusions"; I deeply thank to Shawn Hargreaves et co.
|
Brian Paul | db41d2e | 2002-02-12 03:24:56 +0000 | [diff] [blame] | 86 |
|
| 87 | My keyboard driver used only scancodes, but since GLUT requires ASCII values
|
| 88 | for keys, I borrowed the translation tables (and maybe more) from Allegro.
|
| 89 | Ctrl-Alt-Del (plus Ctrl-Alt-End, for Windows users) will shut down the GLUT
|
| 90 | engine unconditionally: it will raise SIGINT, which in turn will call the
|
| 91 | destructors (let's hope), thus cleaning up your/my mess ;-)
|
| 92 |
|
| 93 | The mouse driver is far from complete (lack of positioning, drawing, etc),
|
| 94 | but is enough to make almost all the demos work.
|
| 95 |
|
| 96 | The timer is pretty versatile for it supports multiple timers with different
|
| 97 | frequencies. It may not be the most accurate timer in the known universe, but
|
| 98 | I think it's OK. Take this example: you have timer A with a very high rate,
|
| 99 | and then you have timer B with very low rate compared to A; now, A ticks OK,
|
| 100 | but timer B will probably loose precision!
|
| 101 |
|
| 102 | As an addition, stdout and stderr are redirected and dumped upon exit. This
|
| 103 | means that printf can be safely called during graphics, but all messages come
|
| 104 | in bulk! A bit of a hack, I know, but I think it's better than to miss them
|
| 105 | at all.
|
| 106 |
|
| 107 | Window creating defaults: 640x480x16 at (0,0), 8-bit stencil, 16-bit accum.
|
Brian Paul | e0193a9 | 2002-02-23 17:11:27 +0000 | [diff] [blame^] | 108 | However, the video mode is chosen in such a way that first window will fit.
|
Brian Paul | db41d2e | 2002-02-12 03:24:56 +0000 | [diff] [blame] | 109 |
|
| 110 |
|
| 111 |
|
| 112 | History:
|
| 113 | ~~~~~~~~
|
| 114 |
|
| 115 | v0.1 feb-2002 initial release
|
Brian Paul | e0193a9 | 2002-02-23 17:11:27 +0000 | [diff] [blame^] | 116 | v0.2 feb-2002 + fast triangle rasterizers
|
| 117 | + enabled sw and 1.3 extensions
|
| 118 | + hardware acceleration: FreeBE/AF
|
| 119 | + single-buffer modes (15-, 16-, and 32-bit)
|
| 120 | * video mode is set by CreateVisual, not MakeCurrent
|
| 121 | * internal changes to support multi-buf (unfinished)
|
| 122 | ! fixed some alpha issues... (thanks, Brian)
|
| 123 | + glut has now an internal timer
|
| 124 | * glut changed to support multi-window (unfinished)
|
| 125 | ! minor PC_HW corrections
|
Brian Paul | db41d2e | 2002-02-12 03:24:56 +0000 | [diff] [blame] | 126 |
|
| 127 |
|
| 128 |
|
| 129 | Contact:
|
| 130 | ~~~~~~~~
|
| 131 |
|
| 132 | Name: Borca Daniel
|
| 133 | E-mail: dborca@yahoo.com
|
| 134 | WWW: http://www.geocities.com/dborca/
|