blob: e92d36cf4c0a0f74b89b6774f29cacd6ae9483e3 [file] [log] [blame]
Brian Paul6c921af2002-04-01 17:01:33 +00001 Mesa 4.0 DOS/DJGPP Port v1.0
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
Brian Paul6c921af2002-04-01 17:01:33 +000023Type "make -f Makefile.DJ" to compile the libraries. Make accepts some options
24which are passed to compiler: the target cpu (CPU=..., default=`pentium') and
25X86 specific options (HAVE_X86=1, HAVE_MMX=1, HAVE_SSE=1, HAVE_3DNOW=1). The
26core library (libGL) requires LFN support during compilation. Also, you must
27have the DXE2 package (available on SimTel.Net, courtesy of Andrew Zabolotny)
28installed in order to build the dynamic modules; if you encounter errors, you
29can fetch a patched version from my web page.
Brian Paule69bfe72002-03-23 02:34:07 +000030The demos are not built automagically (see Pitfalls below). To make them, use
31one of the following rules:
32 Static:
33 gcc -o OUT.exe IN.c -lglut -lglu -lgl
34 Dynamic:
35 gcc -o OUT.exe -include dmesadxe.h IN.c -ligl -liglu -liglut -ldl
36Usage of the dynamic modules requires three things:
37 - include DMESADXE.H in one of the sources, so references inside
38 dynamic modules will get resolved (or use `-include' directive)
39 - link against import libraries (libIgl*.a) and LIBDL.A, which will do
40 the dynamic linkage job for you
41 - put the DXEs somewhere along the library path (LD_LIBRARY_PATH) or
42 in the current directory
Brian Paule0193a92002-02-23 17:11:27 +000043
44Tested on:
45 CPU: Intel Pentium w/ MMX @166 MHz
46 Mainboard: ViA Apollo VP2 w/ 128 MB SDRAM
47 Video card: Matrox Millenium 2064W w/ 2048 kB WRAM, BIOS v3.0
Brian Paule69bfe72002-03-23 02:34:07 +000048 DJGPP: djdev 2.03 + gcc v3.0.3 + make v3.79
Brian Pauldb41d2e2002-02-12 03:24:56 +000049
50
51
52libGL (the core):
53~~~~~~~~~~~~~~~~~
54
Brian Paule0193a92002-02-23 17:11:27 +000055Of course, MESA 4.0 core sources are required. It will probably work with
Brian Pauldb41d2e2002-02-12 03:24:56 +000056MESA 3.5, but not a chance with earlier versions due to major changes to the
57MESA driver interface and the directory tree. All should compile succesfully.
58
59The driver has its origins in ddsample.c, written by Brian Paul and found by
60me in MESA 3.4.2. I touched almost all the functions, changing the coding
Brian Paule0193a92002-02-23 17:11:27 +000061style :-( Sorry!
Brian Pauldb41d2e2002-02-12 03:24:56 +000062
63Pitfalls:
641. The current version supports only RGB[A] modes, for it made no sense to me
65 to endorse color-index (aka palette) modes.
Brian Paulb43a8282002-03-08 19:27:17 +0000662. Single-buffered is not allowed at all. Until I can find a way to use *REAL*
67 hardware acceleration, it won't get implemented.
683. Another weird "feature" is that buffer width must be multiple of 4 (I'm a
Brian Paule0193a92002-02-23 17:11:27 +000069 lazy programmer and I found that the easiest way to keep buffer handling at
70 peak performance ;-).
Brian Pauldb41d2e2002-02-12 03:24:56 +000071
72
73
74libGLU:
75~~~~~~~
76
Brian Paul6c921af2002-04-01 17:01:33 +000077Mesa GLU sources are required.
Brian Pauldb41d2e2002-02-12 03:24:56 +000078
79
80
81libGLUT (the toolkit):
82~~~~~~~~~~~~~~~~~~~~~~
83
84Well, this "skeletal" GLUT implementation is not mine. Thanks should go to
85Bernhard Tschirren, Mark Kilgard, Brian Paul and probably others (or probably
86not ;-). I only changed it to be self-standing (Allegro-free). The keyboard,
87mouse and timer drivers were inspired from an old project of mine (D3Xl) and
Brian Paule0193a92002-02-23 17:11:27 +000088fixed with some Allegro "infusions"; I deeply thank to Shawn Hargreaves et co.
Brian Pauldb41d2e2002-02-12 03:24:56 +000089
90My keyboard driver used only scancodes, but since GLUT requires ASCII values
91for keys, I borrowed the translation tables (and maybe more) from Allegro.
92Ctrl-Alt-Del (plus Ctrl-Alt-End, for Windows users) will shut down the GLUT
93engine unconditionally: it will raise SIGINT, which in turn will call the
Brian Paule69bfe72002-03-23 02:34:07 +000094destructors (let's hope), thus cleaning up your/my mess ;-) NB: since the
95DJGPP guys ensured signal handlers won't go beyond program's space (and since
96dynamic modules shall) the SIGINT can't be hooked (well, it can, but it is
97useless), therefore you must live with the 'Exiting due to signal SIGINT'
98message...
Brian Pauldb41d2e2002-02-12 03:24:56 +000099
100The mouse driver is far from complete (lack of positioning, drawing, etc),
101but is enough to make almost all the demos work.
102
103The timer is pretty versatile for it supports multiple timers with different
104frequencies. It may not be the most accurate timer in the known universe, but
105I think it's OK. Take this example: you have timer A with a very high rate,
106and then you have timer B with very low rate compared to A; now, A ticks OK,
107but timer B will probably loose precision!
108
109As an addition, stdout and stderr are redirected and dumped upon exit. This
110means that printf can be safely called during graphics, but all messages come
111in 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 +0000112at all. "Borrowed" from RHIDE (Robert Hoehne) or SETEDIT (Salvador Eduardo
113Tropea)... I'm not sure.
Brian Pauldb41d2e2002-02-12 03:24:56 +0000114
115Window creating defaults: 640x480x16 at (0,0), 8-bit stencil, 16-bit accum.
Brian Paule0193a92002-02-23 17:11:27 +0000116However, the video mode is chosen in such a way that first window will fit.
Brian Pauldb41d2e2002-02-12 03:24:56 +0000117
118
119
120History:
121~~~~~~~~
122
Brian Paul6c921af2002-04-01 17:01:33 +0000123v1.0 mar-2002 initial release
Brian Pauldb41d2e2002-02-12 03:24:56 +0000124
125
126
127Contact:
128~~~~~~~~
129
130Name: Borca Daniel
131E-mail: dborca@yahoo.com
132WWW: http://www.geocities.com/dborca/