blob: e20454a3d2e475f060ff3bf93f343afd12ec5795 [file] [log] [blame]
Brian Paule0193a92002-02-23 17:11:27 +00001 Mesa 4.0.1 DOS/DJGPP Port version 0.2
Brian Pauldb41d2e2002-02-12 03:24:56 +00002 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
4
5
Brian Paule0193a92002-02-23 17:11:27 +00006Description:
7~~~~~~~~~~~~
Brian Pauldb41d2e2002-02-12 03:24:56 +00008
Brian Paule0193a92002-02-23 17:11:27 +00009This is the DOS port of MESA 4.0, for DJGPP programmers... It features some
10sort of hardware acceleration, but it's pretty thin: it is entirely based on
11VBEAF.DRV from the FreeBE/AF project (http://www.talula.demon.co.uk/freebe/).
12Note that SciTech's driver isn't supported because I hate the `nearptr' hack.
13Anyway, these drivers don't provide ANY 3D function :-( Moreover, it seems to
14me the FreeBE/AF project is not really up to date... Well, it's not much, my
15intention was to open the door ;-)
Brian Pauldb41d2e2002-02-12 03:24:56 +000016
17
18
19Legal:
20~~~~~~
21
Brian Paule0193a92002-02-23 17:11:27 +000022MESA copyright applies.
Brian Pauldb41d2e2002-02-12 03:24:56 +000023
Brian Paule0193a92002-02-23 17:11:27 +000024
25
26Installation:
27~~~~~~~~~~~~~
28
29Type "make -f Makefile.DJ" to compile the libraries. Long filename support is
30required during compilation. The examples are not built automagically (see
31Pitfalls below).
32
33Tested 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 Pauldb41d2e2002-02-12 03:24:56 +000040
41
42
43libGL (the core):
44~~~~~~~~~~~~~~~~~
45
Brian Paule0193a92002-02-23 17:11:27 +000046Of course, MESA 4.0 core sources are required. It will probably work with
Brian Pauldb41d2e2002-02-12 03:24:56 +000047MESA 3.5, but not a chance with earlier versions due to major changes to the
48MESA driver interface and the directory tree. All should compile succesfully.
49
50The driver has its origins in ddsample.c, written by Brian Paul and found by
51me in MESA 3.4.2. I touched almost all the functions, changing the coding
Brian Paule0193a92002-02-23 17:11:27 +000052style :-( Sorry!
Brian Pauldb41d2e2002-02-12 03:24:56 +000053
54Pitfalls:
551. The current version supports only RGB[A] modes, for it made no sense to me
56 to endorse color-index (aka palette) modes.
Brian Paule0193a92002-02-23 17:11:27 +0000572. Double-buffered uses page flipping if acceleration is available, else falls
58 back to virtual buffer.
593. 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.
624. 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 ;-).
655. 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 Pauldb41d2e2002-02-12 03:24:56 +000068
69
70
71libGLU:
72~~~~~~~
73
Brian Paule0193a92002-02-23 17:11:27 +000074Mesa GLU sources are required. No comment!
Brian Pauldb41d2e2002-02-12 03:24:56 +000075
76
77
78libGLUT (the toolkit):
79~~~~~~~~~~~~~~~~~~~~~~
80
81Well, this "skeletal" GLUT implementation is not mine. Thanks should go to
82Bernhard Tschirren, Mark Kilgard, Brian Paul and probably others (or probably
83not ;-). I only changed it to be self-standing (Allegro-free). The keyboard,
84mouse and timer drivers were inspired from an old project of mine (D3Xl) and
Brian Paule0193a92002-02-23 17:11:27 +000085fixed with some Allegro "infusions"; I deeply thank to Shawn Hargreaves et co.
Brian Pauldb41d2e2002-02-12 03:24:56 +000086
87My keyboard driver used only scancodes, but since GLUT requires ASCII values
88for keys, I borrowed the translation tables (and maybe more) from Allegro.
89Ctrl-Alt-Del (plus Ctrl-Alt-End, for Windows users) will shut down the GLUT
90engine unconditionally: it will raise SIGINT, which in turn will call the
91destructors (let's hope), thus cleaning up your/my mess ;-)
92
93The mouse driver is far from complete (lack of positioning, drawing, etc),
94but is enough to make almost all the demos work.
95
96The timer is pretty versatile for it supports multiple timers with different
97frequencies. It may not be the most accurate timer in the known universe, but
98I think it's OK. Take this example: you have timer A with a very high rate,
99and then you have timer B with very low rate compared to A; now, A ticks OK,
100but timer B will probably loose precision!
101
102As an addition, stdout and stderr are redirected and dumped upon exit. This
103means that printf can be safely called during graphics, but all messages come
104in bulk! A bit of a hack, I know, but I think it's better than to miss them
105at all.
106
107Window creating defaults: 640x480x16 at (0,0), 8-bit stencil, 16-bit accum.
Brian Paule0193a92002-02-23 17:11:27 +0000108However, the video mode is chosen in such a way that first window will fit.
Brian Pauldb41d2e2002-02-12 03:24:56 +0000109
110
111
112History:
113~~~~~~~~
114
115v0.1 feb-2002 initial release
Brian Paule0193a92002-02-23 17:11:27 +0000116v0.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 Pauldb41d2e2002-02-12 03:24:56 +0000126
127
128
129Contact:
130~~~~~~~~
131
132Name: Borca Daniel
133E-mail: dborca@yahoo.com
134WWW: http://www.geocities.com/dborca/