aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/extras/Mesa/docs/README.AMIWIN
blob: 47cf696cc1e6efa3edc29d545fdc62833e0ce1df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
AMIGA AMIWIN PORT of MESA: THE OPENGL SOFTWARE EMULATION
========================================================
Port by Victor Ng-Thow-Hing (victorng@dgp.toronto.edu) 
Original Author (Brian Paul (brianp@ssec.wisc.edu)

Dec.1 , 1995: Port of release Mesa 1.2.5
 - Modifications made to minimize changes to Mesa distribution.

Nov.25, 1995: Port of release Mesa 1.2.4


HISTORY
=======
As a 3D graphics progammer, I was increasingly frustrated to see OpenGL 
appearing on so many platforms EXCEPT the Amiga. Up to now, the task
of porting OpenGL directly from native Amiga drawing routines seemed like
a daunting task. However, two important events made this port possible.

First of all, Brian Paul wrote Mesa, the OpenGL software emulator that 
can be found on many platforms - except the Amiga and Atari (who cares 
about the latter!). This was pretty ironic considering that Mesa was 
originally prototyped on an Amiga! The second great event was when 
Holger Kruse developed AmiWin, the X11R6 server for the Amiga (definitely 
register for this great piece of software) and released a development kit
so one could compile X programs with SAS/C.

Since Mesa had X routines as its primitive drawing operations, this made
a marriage of Mesa and Amiwin feasible. I copied over the sources from
an ftp site, played with the code, wrote some Smakefiles, and voila, 
I had OpenGL programs displaying on my Amiga.

Although the speed is nothing to be impressed about, this port can be
potentially useful to those who want to quickly test their code in
wireframe or perhaps learn more about programming with the OpenGL API.

I hope Amiga developers will continue to write excellent software for
their machine, especially more X clients for Amiwin. If you have any 
solutions so some of my problems in the porting notes, please send me
some email!

See you around,
Vic.

HOW TO CREATE THE LIBRARIES AND SAMPLE CODE
===========================================

Just run the shell script mklib.amiwin in the mesa directory. This will
make all the libraries and copy them into the mesa/lib directory. If you
don't want to compile everything, just go to the desired directory and
type smake in that directory.

Change any of the variables in the smakefiles as necessary. You will REQUIRE
the Amiwin development kit to compile these libraries since you need X11.LIB
and the shareable X libraries. Some examples require the AmiTCP4.0
net.lib static link library and related header files for unix related
header files and functions like sleep().

HOW TO USE THE MESA LIBRARIES
=============================

Study the Smakefiles in the demos, samples and book directories for the
proper SAS/C options and linkable libraries to use. Basically aux calls
require Mesaaux.LIB, gl calls require MesaGL.LIB, glu calls MesaGLU.LIB,
tk calls Mesatk.LIB. There is a preliminary port of MesaGLUT.LIB toolkit
available in the lib directory with the other Mesa libraries. However, 
it seems to cause crashes on some of the sample code. Someone else may want
to attempt a more stable port.

PORTING NOTES TO AMIWIN
=======================

My strategy of porting was to leave as much of the code untouched as
possible. I surrounded any amiga specific changes with 
#ifdef AMIWIN ... #endif or #ifndef AMIWIN ... #endif preprocessor
symbols. The code  was ported on an Amiga 2000, with Fusion 40 accelerator
and a Picasso II graphics card. The SAS/C 6.56 compiler was used, with
the AmiWin 2.16 X development kit.

All compilations were done for a 68040 CPU with 68882 math coprocessor for
maximum  speed. Please edit the smakefile for other compilers.
I wrote smakefiles for the directories I ported. I omitted the Windows
and Widgets directories. The former is for MS Windows and the latter 
requires Motif, which is not easily available for the Amiga.

Here are the changes I did per directory:

* mesa
Nov. 25, 1995 v 1.2.4
  - added a mklib.amiwin shell script that will make all the libraries and
    sample code for Mesa
  - created this readme file: readme.AMIGA

* mesa/include
Dec. 1, 1995 v 1.2.5
  - added the following to GL/xmesa.h 
     #ifdef AMIWIN
     #include <pragmas/xlib_pragmas.h>
     extern struct Library *XLibBase;
     #endif
NET CHANGE: xmesa.h

* mesa/src 
Nov. 25, 1995 v 1.2.4
  - added the necessary pragma calls for X functions to the following:
    xmesa1.c, xmesa2.c, xmesa3.c, xfonts.c, glx.c 
    This prevents undefined symbols errors during the linking phase for 
    X library calls
  - created smakefile
Dec.  1, 1995 v 1.2.5
  - removed AMIWIN includes from xmesa1.c, xmesa2.c, xmesa3.c, xfonts.c, 
    glx.c since they are now defined in include/GL/xmesa.h
NET CHANGE: smakefile
   
* mesa/src-tk
Nov. 25, 1995 v 1.2.4
  - added the necessary pragma calls for X functions to the following:
    private.h
  - created smakefile
Dec.  1, 1995 v 1.2.5
  - removed AMIWIN includes from private.h since it is now defined in
    include/GL/xmesa.h
NET CHANGE: smakefile

* mesa/src-glu
Nov. 25, 1995 v 1.2.4
  - created smakefile
NET CHANGE: smakefile

* mesa/src-aux
Nov. 25, 1995 v 1.2.4
  - added the necessary pragma calls for X functions to the following:
    glaux.c
  - created smakefile
NET CHANGE: glaux.c, smakefile

* mesa/demos
Nov. 25, 1995 v 1.2.4
  - added the necessary pragma calls for X functions to the following:
    xdemo.c, glxdemo.c, offset.c
  - created smakefile
  - put #ifndef AMIWIN ... #endif around sleep() calls in xdemo.c since 
    they are not part of AmigaDOS.
Dec.  1, 1995 v 1.2.5
  - removed AMIWIN defines from xdemo.c, glxdemo.c, offset.c since
    already defined in include/GL/xmesa.h
  - modified Smakefile to include header and includes from the AmiTCP4.0
    net.lib linkable library to provide unix-compatible sys/time.h and
    the sleep() function
    - removed AMIWIN defines in xdemo.c since sleep() now defined
NET CHANGE: smakefile

* mesa/samples
Nov. 25, 1995 v 1.2.4
  - added the necessary pragma calls for X functions to the following:
    oglinfo.c
  - created smakefile
  - put #ifndef AMIWIN ... #endif around sleep() in blendxor.c
  - removed olympic from smakefile targets since <sys/time.h> not defined
Dec.  1, 1995 v 1.2.5
  - removed AMIWIN defines from oglinfo.c, since already defined in 
    include/GL/xmesa.h
  - modified Smakefile to include header and includes from the AmiTCP4.0
    net.lib linkable library to provide unix-compatible sys/time.h and
    the sleep() function
    - removed AMIWIN defines in blendxor.c for sleep()
    - added AMIWIN defines around _MACHTEN_ in olympic.c since xrandom()
      functions are not defined in any libraries
    - added olympic back into the Smakefile targets
NET CHANGE: smakefile, olympic.c

* mesa/book
Nov. 25, 1995 v 1.2.4
- created smakefile
- removed accpersp and dof from smakefile targets since the SAS/C compile seems to
  confuse the near,far variables with near/far memory models.
NET CHANGE: smakefile

* mesa/windows
Dec.  1, 1995 v 1.2.5
- Removed directory to save space since this is only needed for Windows based 
  machines.