blob: 47cf696cc1e6efa3edc29d545fdc62833e0ce1df [file] [log] [blame]
Brian Paulecc88c11999-02-23 03:41:13 +00001AMIGA AMIWIN PORT of MESA: THE OPENGL SOFTWARE EMULATION
2========================================================
3Port by Victor Ng-Thow-Hing (victorng@dgp.toronto.edu)
4Original Author (Brian Paul (brianp@ssec.wisc.edu)
5
6Dec.1 , 1995: Port of release Mesa 1.2.5
7 - Modifications made to minimize changes to Mesa distribution.
8
9Nov.25, 1995: Port of release Mesa 1.2.4
10
11
12HISTORY
13=======
14As a 3D graphics progammer, I was increasingly frustrated to see OpenGL
15appearing on so many platforms EXCEPT the Amiga. Up to now, the task
16of porting OpenGL directly from native Amiga drawing routines seemed like
17a daunting task. However, two important events made this port possible.
18
19First of all, Brian Paul wrote Mesa, the OpenGL software emulator that
20can be found on many platforms - except the Amiga and Atari (who cares
21about the latter!). This was pretty ironic considering that Mesa was
22originally prototyped on an Amiga! The second great event was when
23Holger Kruse developed AmiWin, the X11R6 server for the Amiga (definitely
24register for this great piece of software) and released a development kit
25so one could compile X programs with SAS/C.
26
27Since Mesa had X routines as its primitive drawing operations, this made
28a marriage of Mesa and Amiwin feasible. I copied over the sources from
29an ftp site, played with the code, wrote some Smakefiles, and voila,
30I had OpenGL programs displaying on my Amiga.
31
32Although the speed is nothing to be impressed about, this port can be
33potentially useful to those who want to quickly test their code in
34wireframe or perhaps learn more about programming with the OpenGL API.
35
36I hope Amiga developers will continue to write excellent software for
37their machine, especially more X clients for Amiwin. If you have any
38solutions so some of my problems in the porting notes, please send me
39some email!
40
41See you around,
42Vic.
43
44HOW TO CREATE THE LIBRARIES AND SAMPLE CODE
45===========================================
46
47Just run the shell script mklib.amiwin in the mesa directory. This will
48make all the libraries and copy them into the mesa/lib directory. If you
49don't want to compile everything, just go to the desired directory and
50type smake in that directory.
51
52Change any of the variables in the smakefiles as necessary. You will REQUIRE
53the Amiwin development kit to compile these libraries since you need X11.LIB
54and the shareable X libraries. Some examples require the AmiTCP4.0
55net.lib static link library and related header files for unix related
56header files and functions like sleep().
57
58HOW TO USE THE MESA LIBRARIES
59=============================
60
61Study the Smakefiles in the demos, samples and book directories for the
62proper SAS/C options and linkable libraries to use. Basically aux calls
63require Mesaaux.LIB, gl calls require MesaGL.LIB, glu calls MesaGLU.LIB,
64tk calls Mesatk.LIB. There is a preliminary port of MesaGLUT.LIB toolkit
65available in the lib directory with the other Mesa libraries. However,
66it seems to cause crashes on some of the sample code. Someone else may want
67to attempt a more stable port.
68
69PORTING NOTES TO AMIWIN
70=======================
71
72My strategy of porting was to leave as much of the code untouched as
73possible. I surrounded any amiga specific changes with
74#ifdef AMIWIN ... #endif or #ifndef AMIWIN ... #endif preprocessor
75symbols. The code was ported on an Amiga 2000, with Fusion 40 accelerator
76and a Picasso II graphics card. The SAS/C 6.56 compiler was used, with
77the AmiWin 2.16 X development kit.
78
79All compilations were done for a 68040 CPU with 68882 math coprocessor for
80maximum speed. Please edit the smakefile for other compilers.
81I wrote smakefiles for the directories I ported. I omitted the Windows
82and Widgets directories. The former is for MS Windows and the latter
83requires Motif, which is not easily available for the Amiga.
84
85Here are the changes I did per directory:
86
87* mesa
88Nov. 25, 1995 v 1.2.4
89 - added a mklib.amiwin shell script that will make all the libraries and
90 sample code for Mesa
91 - created this readme file: readme.AMIGA
92
93* mesa/include
94Dec. 1, 1995 v 1.2.5
95 - added the following to GL/xmesa.h
96 #ifdef AMIWIN
97 #include <pragmas/xlib_pragmas.h>
98 extern struct Library *XLibBase;
99 #endif
100NET CHANGE: xmesa.h
101
102* mesa/src
103Nov. 25, 1995 v 1.2.4
104 - added the necessary pragma calls for X functions to the following:
105 xmesa1.c, xmesa2.c, xmesa3.c, xfonts.c, glx.c
106 This prevents undefined symbols errors during the linking phase for
107 X library calls
108 - created smakefile
109Dec. 1, 1995 v 1.2.5
110 - removed AMIWIN includes from xmesa1.c, xmesa2.c, xmesa3.c, xfonts.c,
111 glx.c since they are now defined in include/GL/xmesa.h
112NET CHANGE: smakefile
113
114* mesa/src-tk
115Nov. 25, 1995 v 1.2.4
116 - added the necessary pragma calls for X functions to the following:
117 private.h
118 - created smakefile
119Dec. 1, 1995 v 1.2.5
120 - removed AMIWIN includes from private.h since it is now defined in
121 include/GL/xmesa.h
122NET CHANGE: smakefile
123
124* mesa/src-glu
125Nov. 25, 1995 v 1.2.4
126 - created smakefile
127NET CHANGE: smakefile
128
129* mesa/src-aux
130Nov. 25, 1995 v 1.2.4
131 - added the necessary pragma calls for X functions to the following:
132 glaux.c
133 - created smakefile
134NET CHANGE: glaux.c, smakefile
135
136* mesa/demos
137Nov. 25, 1995 v 1.2.4
138 - added the necessary pragma calls for X functions to the following:
139 xdemo.c, glxdemo.c, offset.c
140 - created smakefile
141 - put #ifndef AMIWIN ... #endif around sleep() calls in xdemo.c since
142 they are not part of AmigaDOS.
143Dec. 1, 1995 v 1.2.5
144 - removed AMIWIN defines from xdemo.c, glxdemo.c, offset.c since
145 already defined in include/GL/xmesa.h
146 - modified Smakefile to include header and includes from the AmiTCP4.0
147 net.lib linkable library to provide unix-compatible sys/time.h and
148 the sleep() function
149 - removed AMIWIN defines in xdemo.c since sleep() now defined
150NET CHANGE: smakefile
151
152* mesa/samples
153Nov. 25, 1995 v 1.2.4
154 - added the necessary pragma calls for X functions to the following:
155 oglinfo.c
156 - created smakefile
157 - put #ifndef AMIWIN ... #endif around sleep() in blendxor.c
158 - removed olympic from smakefile targets since <sys/time.h> not defined
159Dec. 1, 1995 v 1.2.5
160 - removed AMIWIN defines from oglinfo.c, since already defined in
161 include/GL/xmesa.h
162 - modified Smakefile to include header and includes from the AmiTCP4.0
163 net.lib linkable library to provide unix-compatible sys/time.h and
164 the sleep() function
165 - removed AMIWIN defines in blendxor.c for sleep()
166 - added AMIWIN defines around _MACHTEN_ in olympic.c since xrandom()
167 functions are not defined in any libraries
168 - added olympic back into the Smakefile targets
169NET CHANGE: smakefile, olympic.c
170
171* mesa/book
172Nov. 25, 1995 v 1.2.4
173- created smakefile
174- removed accpersp and dof from smakefile targets since the SAS/C compile seems to
175 confuse the near,far variables with near/far memory models.
176NET CHANGE: smakefile
177
178* mesa/windows
179Dec. 1, 1995 v 1.2.5
180- Removed directory to save space since this is only needed for Windows based
181 machines.