blob: 8b4e6dc5a382a83137a9b17de11986635d295f28 [file] [log] [blame]
Brian Paule69bfe72002-03-23 02:34:07 +00001 Mesa 4.0 DOS/DJGPP Port version 0.4
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Brian Pauldb41d2e2002-02-12 03:24:56 +00003
4
5
Brian Paule0193a92002-02-23 17:11:27 +00006Description:
7~~~~~~~~~~~~
Brian Pauldb41d2e2002-02-12 03:24:56 +00008
Brian Paulb43a8282002-03-08 19:27:17 +00009Well, guess what... this is the DOS port of MESA 4.0, for DJGPP fans... Whoa!
Brian Pauldb41d2e2002-02-12 03:24:56 +000010
11
12
13Legal:
14~~~~~~
15
Brian Paule0193a92002-02-23 17:11:27 +000016MESA copyright applies.
Brian Pauldb41d2e2002-02-12 03:24:56 +000017
Brian Paule0193a92002-02-23 17:11:27 +000018
19
20Installation:
21~~~~~~~~~~~~~
22
23Type "make -f Makefile.DJ" to compile the libraries. Long filename support is
Brian Paule69bfe72002-03-23 02:34:07 +000024required during compilation. Also, you must have the DXE2 package (available
25on SimTel.Net, courtesy of Andrew Zabolotny) installed in order to build the
26dynamic modules; if you encounter errors, you can fetch a patched version from
27my web page.
28The demos are not built automagically (see Pitfalls below). To make them, use
29one of the following rules:
30 Static:
31 gcc -o OUT.exe IN.c -lglut -lglu -lgl
32 Dynamic:
33 gcc -o OUT.exe -include dmesadxe.h IN.c -ligl -liglu -liglut -ldl
34Usage of the dynamic modules requires three things:
35 - include DMESADXE.H in one of the sources, so references inside
36 dynamic modules will get resolved (or use `-include' directive)
37 - link against import libraries (libIgl*.a) and LIBDL.A, which will do
38 the dynamic linkage job for you
39 - put the DXEs somewhere along the library path (LD_LIBRARY_PATH) or
40 in the current directory
Brian Paule0193a92002-02-23 17:11:27 +000041
42Tested on:
43 CPU: Intel Pentium w/ MMX @166 MHz
44 Mainboard: ViA Apollo VP2 w/ 128 MB SDRAM
45 Video card: Matrox Millenium 2064W w/ 2048 kB WRAM, BIOS v3.0
Brian Paule69bfe72002-03-23 02:34:07 +000046 DJGPP: djdev 2.03 + gcc v3.0.3 + make v3.79
Brian Pauldb41d2e2002-02-12 03:24:56 +000047
48
49
50libGL (the core):
51~~~~~~~~~~~~~~~~~
52
Brian Paule0193a92002-02-23 17:11:27 +000053Of course, MESA 4.0 core sources are required. It will probably work with
Brian Pauldb41d2e2002-02-12 03:24:56 +000054MESA 3.5, but not a chance with earlier versions due to major changes to the
55MESA driver interface and the directory tree. All should compile succesfully.
56
57The driver has its origins in ddsample.c, written by Brian Paul and found by
58me in MESA 3.4.2. I touched almost all the functions, changing the coding
Brian Paule0193a92002-02-23 17:11:27 +000059style :-( Sorry!
Brian Pauldb41d2e2002-02-12 03:24:56 +000060
61Pitfalls:
621. The current version supports only RGB[A] modes, for it made no sense to me
63 to endorse color-index (aka palette) modes.
Brian Paulb43a8282002-03-08 19:27:17 +0000642. Single-buffered is not allowed at all. Until I can find a way to use *REAL*
65 hardware acceleration, it won't get implemented.
663. Another weird "feature" is that buffer width must be multiple of 4 (I'm a
Brian Paule0193a92002-02-23 17:11:27 +000067 lazy programmer and I found that the easiest way to keep buffer handling at
68 peak performance ;-).
Brian Pauldb41d2e2002-02-12 03:24:56 +000069
70
71
72libGLU:
73~~~~~~~
74
Brian Paule0193a92002-02-23 17:11:27 +000075Mesa GLU sources are required. No comment!
Brian Pauldb41d2e2002-02-12 03:24:56 +000076
77
78
79libGLUT (the toolkit):
80~~~~~~~~~~~~~~~~~~~~~~
81
82Well, this "skeletal" GLUT implementation is not mine. Thanks should go to
83Bernhard Tschirren, Mark Kilgard, Brian Paul and probably others (or probably
84not ;-). I only changed it to be self-standing (Allegro-free). The keyboard,
85mouse and timer drivers were inspired from an old project of mine (D3Xl) and
Brian Paule0193a92002-02-23 17:11:27 +000086fixed with some Allegro "infusions"; I deeply thank to Shawn Hargreaves et co.
Brian Pauldb41d2e2002-02-12 03:24:56 +000087
88My keyboard driver used only scancodes, but since GLUT requires ASCII values
89for keys, I borrowed the translation tables (and maybe more) from Allegro.
90Ctrl-Alt-Del (plus Ctrl-Alt-End, for Windows users) will shut down the GLUT
91engine unconditionally: it will raise SIGINT, which in turn will call the
Brian Paule69bfe72002-03-23 02:34:07 +000092destructors (let's hope), thus cleaning up your/my mess ;-) NB: since the
93DJGPP guys ensured signal handlers won't go beyond program's space (and since
94dynamic modules shall) the SIGINT can't be hooked (well, it can, but it is
95useless), therefore you must live with the 'Exiting due to signal SIGINT'
96message...
Brian Pauldb41d2e2002-02-12 03:24:56 +000097
98The mouse driver is far from complete (lack of positioning, drawing, etc),
99but is enough to make almost all the demos work.
100
101The timer is pretty versatile for it supports multiple timers with different
102frequencies. It may not be the most accurate timer in the known universe, but
103I think it's OK. Take this example: you have timer A with a very high rate,
104and then you have timer B with very low rate compared to A; now, A ticks OK,
105but timer B will probably loose precision!
106
107As an addition, stdout and stderr are redirected and dumped upon exit. This
108means that printf can be safely called during graphics, but all messages come
109in bulk! A bit of a hack, I know, but I think it's better than to miss them
Brian Paule69bfe72002-03-23 02:34:07 +0000110at all. "Borrowed" from RHIDE (Robert Hoehne) or SETEDIT (Salvador Eduardo
111Tropea)... I'm not sure.
Brian Pauldb41d2e2002-02-12 03:24:56 +0000112
113Window creating defaults: 640x480x16 at (0,0), 8-bit stencil, 16-bit accum.
Brian Paule0193a92002-02-23 17:11:27 +0000114However, the video mode is chosen in such a way that first window will fit.
Brian Pauldb41d2e2002-02-12 03:24:56 +0000115
116
117
118History:
119~~~~~~~~
120
121v0.1 feb-2002 initial release
Brian Paule0193a92002-02-23 17:11:27 +0000122v0.2 feb-2002 + fast triangle rasterizers
123 + enabled sw and 1.3 extensions
124 + hardware acceleration: FreeBE/AF
125 + single-buffer modes (15-, 16-, and 32-bit)
126 * video mode is set by CreateVisual, not MakeCurrent
127 * internal changes to support multi-buf (unfinished)
128 ! fixed some alpha issues... (thanks, Brian)
129 + glut has now an internal timer
130 * glut changed to support multi-window (unfinished)
131 ! minor PC_HW corrections
Brian Paulb43a8282002-03-08 19:27:17 +0000132v0.3 mar-2002 - removed FreeBE/AF code
133 - removed single-buffer modes
Brian Paule69bfe72002-03-23 02:34:07 +0000134v0.4 mar-2002 + dynamic module support
Brian Pauldb41d2e2002-02-12 03:24:56 +0000135
136
137
138Contact:
139~~~~~~~~
140
141Name: Borca Daniel
142E-mail: dborca@yahoo.com
143WWW: http://www.geocities.com/dborca/