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