Commit ecc88c1e authored by Brian Paul's avatar Brian Paul
Browse files

initial rev

parent f9eae7b6
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.
LibGGI driver for Mesa-3.0
by Uwe Maurer (uwe_maurer@t-online.de)
Introduction
============
[from libggi.txt by Steve Cheng and Hartmut Niemann]
"LibGGI, the dynamic GGI (General Graphics Interface) library is a
flexible drawing library.
It provides an opaque interface to the display's acceleration
functions. It was originally intended to allow user programs to
interface with KGI, the kernel side of the GGI code, but other display
types can be easily used by loading the appropriate "display target"
(e.g. X, memory).
LibGGI consists of a main library (libggi.so) and a multitude of
dynamic drivers. The library then loads the necessary "drivers" for
the requested mode, taking hints from the graphics device if
necessary. LibGGI can also load extension libraries, e.g. to provide
enhanced 2D and 3D functions.
It has been designed after having a look at several existing
libraries, and so far we have found porting to be quite simple from
and to most of them."
----------------------------------------------------------------------------
More information about the GGI project and LibGGI can be
obtained from the GGI website:
www.ggi-project.org
----------------------------------------------------------------------------
Installation
============
- Install LibGGI
- Unpack the Mesa archives
- In the Mesa directory type:
make linux-ggi
su
make linux-ggi-install
exit
- Now you can try some demos.
If they don't work, you can set the GGIMESA_DEBUG
variable to 255 and you will see some information from the
LibGGI-driver.
export GGIMESA_DEBUG=255
GLUT
====
You can change these default values in ggi/ggiglut.c:
#define WIDTH 640
#define HEIGHT 400
#define GRAPHTYPE_RGB GT_16BIT
#define GRAPHTYPE_INDEX GT_8BIT
Options:
-bpp x Set graphic mode with x bits per pixel
-size x y Screen (or window) is x*y pixels
Example:
demos/gears -size 320 200 -bpp 24
Updates
=======
You can find the latest LibGGI-driver and ggiglut on my
homepage:
http://home.t-online.de/home/uwe_maurer/ggimesa.htm
Uwe Maurer - uwe_maurer@t-online.de
LibGGI driver for Mesa-3.0
by Uwe Maurer (uwe_maurer@t-online.de)
Introduction
============
[from libggi.txt by Steve Cheng and Hartmut Niemann]
"LibGGI, the dynamic GGI (General Graphics Interface) library is a
flexible drawing library.
It provides an opaque interface to the display's acceleration
functions. It was originally intended to allow user programs to
interface with KGI, the kernel side of the GGI code, but other display
types can be easily used by loading the appropriate "display target"
(e.g. X, memory).
LibGGI consists of a main library (libggi.so) and a multitude of
dynamic drivers. The library then loads the necessary "drivers" for
the requested mode, taking hints from the graphics device if
necessary. LibGGI can also load extension libraries, e.g. to provide
enhanced 2D and 3D functions.
It has been designed after having a look at several existing
libraries, and so far we have found porting to be quite simple from
and to most of them."
----------------------------------------------------------------------------
More information about the GGI project and LibGGI can be
obtained from the GGI website:
www.ggi-project.org
----------------------------------------------------------------------------
Installation
============
- Install LibGGI
- Unpack the Mesa archives
- In the Mesa directory type:
make linux-ggi
su
make linux-ggi-install
exit
- Now you can try some demos.
If they don't work, you can set the GGIMESA_DEBUG
variable to 255 and you will see some information from the
LibGGI-driver.
export GGIMESA_DEBUG=255
GLUT
====
You can change these default values in ggi/ggiglut.c:
#define WIDTH 640
#define HEIGHT 400
#define GRAPHTYPE_RGB GT_16BIT
#define GRAPHTYPE_INDEX GT_8BIT
Options:
-bpp x Set graphic mode with x bits per pixel
-size x y Screen (or window) is x*y pixels
Example:
demos/gears -size 320 200 -bpp 24
Updates
=======
You can find the latest LibGGI-driver and ggiglut on my
homepage:
http://home.t-online.de/home/uwe_maurer/ggimesa.htm
Uwe Maurer - uwe_maurer@t-online.de
August 30, 1998 -- Paul Garceau (pgarceau@teleport.com)
DISCLAIMER: I make this extension to the Mesa 3-D Graphics Library as a service
to the general public. I can, in no way support or make any guarantee that the
EGCS-Mingw32 build or any Gnu-Win32 build will work for your system. The
associated packages and batch files I have included as part of the EGCS-Mingw32
extension are provided "As-is" with out any guarantee of support or functionality
from the author of this EGCS-Mingw32 native windows port of the Mesa 3-D Graphics
Library.
Feel free to modify or change things as you see fit, just remember that
I can't support any modifications you might want to make to the files which I
have included OR the lgpl protected Mesa 3-D Graphics Library.
EGCS-Mingw32 Beta 3.08 Archive Manifest:
mingw32.bat
src/makefile.nt4
src/wmesa.c
src-glu/makefile.nt4
###############
Greetings,
In order to build the Mingw32 set of Mesa 3-D Graphics Library for Beta3.08
it will be necessary for you to use the Dos or Command Prompt that is available
on most of the i86 based MS Windows machines. Also, I believe that this build
will run on Win95, Win98, WinNT4 and WinNT5.
I haven't tested Win95/98 or WinNT5. This build was generated under
WinNT4 with SP3 installed.
This has not been tested under any systems outside of
a WinNT4 Workstation with EGCS-Mingw32 toolchain, v.1.0.2 installed.
EGCS-Mingw32 uses a variation of gcc to handle its build. The Mesa 3-D
Graphics Library build that I have generated is based, in small part, on the
Cygwin32 build and associated makefiles that Stephane Rehel (rehel@worldnet.fr)
defined back in 1997. The EGCS-Mingw32 toolchain is capable of generating
native windows code and, as of the date of this readme, can be obtained from:
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs-mingw32-102.html
Much thanks to the combined efforts of Mumit Khan, Jan-Jaap Vanderhagen
and Colin Peters for making it possible for the EGCS-Mingw32 toolchain to exist.
Installing EGCS-Mingw32 Build Revisions:
To install the makefile and source revisions incorporated with this build
of the Mesa 3-D Graphics Library, you'll have to use a version of winzip. I am
in the process of finding a suitable Win32 compatible tar executable so that if
you don't have winzip, you can still decompress the files into their respective
folders/directories.
a) Move the mingw32.zip file to the top level of the hard drive on your
system.
b) Copy all of the Beta 3.08 src/windows files to the src/ directory.
b) Open the Winzip file
c) Verify that the files will be properly extracted.
d) Extract the files with the Winzip "Overwrite" and "Use Folder Names"
options enabled.
The zip file directory structure extraction defaults to the top level of
the hard drive where the mingw32.zip file exists unless otherwise instructed by
you.
The version of wmesa.c included with the mingw32 archive needs to replace
the current version of the Beta 3.08 wmesa.c file in order for the egcs-mingw32
build to work. This is because the original Win32 stuff assumes that the glut
utilities are to be installed. The Glut utilities are not part of the
egcs-mingw32 build for Beta 3.08.
Build Considerations:
In order to get the build to work, I needed to create a special makefile
for each library which the Mesa 3-D Graphics Library requires since there is no
comparable make-config/config on a native windows platform.
Since I was only creating a few of the possible libraries for
Mesa (gl, glu), I only created the new make files in their respective libraries
src, src-glu). For libMesaaux.a. you will find a makefile for it in the
src-aux directory. libMesatk.a and libglut.a were not ported.
The build itself is a .bat based build and uses Gnu Make,Version 3.76.1 to
process the makefiles noted above. The build must be run from the directory
where the mingw32.bat file is. You can get the binary version of Make 3.76.1
from Jan-Jaap van der Heijden's site in Germany:
http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32/download.html
It was necessary to modify some source code, specifically the source code
in the src-glu directory. I needed to modify nurbs.c, quadric.c and tess.c in
order to get them to work using the EGCS-Mingw32 toolchain.
The original EGCS-Mingw32 Toolchain, is available from:
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs-mingw32-102.html
Running the Build:
Ok, now that we've got the basics out of the way, follows is all you need
to do in order to build the EGCS-Mingw32 version of libMesaGL.a and libMesaGLU.a:
Open your Command Prompt/Dos prompt.
Go to your Mesa-3.0 beta 'root' directory.
This is the same directory that the Mesa mingw32.zip file was
originally stored in if you've installed the Mesa-3.0 beta 3-D
Graphics Library source as outlined in the "readme" file included
with the Mesa-3.0 beta distribution.
At the command line type: mingw32
mingw32 is the .bat file that actually does the build.
Enjoy!
Peace,
Paul G. (pgarceau@teleport.com)
\ No newline at end of file
Mesa 3.0 MITS Information
This software is distributed under the terms of the GNU Library
General Public License, see the LICENSE file for details.
This document is a preliminary introduction to help you get
started. For more detaile information consult the web page.
http://10-dencies.zkm.de/~mesa/
Version 0.1 (Yes it's very alpha code so be warned!)
Contributors:
Emil Briggs (briggs@bucky.physics.ncsu.edu)
David Bucciarelli (tech.hmw@plus.it)
Andreas Schiffler (schiffler@zkm.de)
1. Requirements:
Mesa 3.0.
An SMP capable machine running Linux 2.x
libpthread installed on your machine.
2. What does MITS stand for?
MITS stands for Mesa Internal Threading System. By adding
internal threading to Mesa it should be possible to improve
performance of OpenGL applications on SMP machines.
3. Do applications have to be recoded to take advantage of MITS?
No. The threading is internal to Mesa and transparent to
applications.
4. Will all applications benefit from the current implementation of MITS?
No. This implementation splits the processing of the vertex buffer
over two threads. There is a certain amount of overhead involved
with the thread synchronization and if there is not enough work
to be done the extra overhead outweighs any speedup from using
dual processors. You will not for example see any speedup when
running Quake because it uses GL_POLYGON and there is only one
polygon for each vertex buffer processed. Test results on a
dual 200 Mhz. Pentium Pro system show that one needs around
100-200 vertices in the vertex buffer before any there is any
appreciable benefit from the threading.
5. Are there any parameters that I can tune to try to improve performance.
Yes. You can try to vary the size of the vertex buffer which is
define in VB_MAX located in the file src/vb.h from your top level
Mesa distribution. The number needs to be a multiple of 12 and
the optimum value will probably depend on the capabilities of
your machine and the particular application you are running.
6. Are there any ways I can modify the application to improve its
performance with the MITS?
Yes. Try to use as many vertices between each Begin/End pair
as possbile. This will reduce the thread synchronization
overhead.
7. What sort of speedups can I expect?
On some benchmarks performance gains of up to 30% have been
observerd. Others may see no gain at all and in a few rare
cases even some degradation.
8. What still needs to be done?
Lots of testing and benchmarking.
A portable implementation that works within the Mesa thread API.
Threading of additional areas of Mesa to improve performance
even more.
Installation:
1. This assumes that you already have a working Mesa 3.0 installation
from source.
2. Place the tarball MITS.tar.gz in your top level Mesa directory.
3. Unzip it and untar it. It will replace the following files in
your Mesa source tree so back them up if you want to save them.
README.MITS
Make-config
Makefile
mklib.glide
src/vbxform.c
src/vb.h
4. Rebuild Mesa using the command
make linux-386-glide-mits
The NeXT support has now been incorproated into the OpenStep support.
You can build NeXT libraries simply by typing "make next", though before
linking they will need to be ranlib'd by hand. For more information see
the README.OpenStep file, together with the README files in OpenStep/Old_Demos.
-Pete French. (pete@ohm.york.ac.uk) 28/5/98
README for port of Mesa to XFree86 on OS/2
(as of 19980802)
Instructions to build Mesa for XFree86/OS2:
You need a recent version of XFree86 (3.3x or above) installed including
the supplied programming libraries and tools as well as EMX 0.9c (and above).
Beginning after beta 7 there's again support for creating DLLs.
The details are handled in "mklib-emx.cmd" a small REXX script.
By now it does ensure compatiblity by using the function names as
entry points instead of ordinals. This will cost performance and
might be fixed in a future patch.
We switched to the usual build method
(based on Makefile and make-config) beginning with Mesa 3.0 beta 5.
To use most of the standard files (including shell scripts) you should
have a un*x shell (sh) in path.
To actually build the (static) libraries and demos type
make os2
Alexander Mai
am@os-2.de
st002279@hrzpub.tu-darmstadt.de
This is a port of Mesa-3.0 to OpenStep and Rhapsody/YellowBox. Only
the GL and GLU libraries have been ported. As OpenStep has it's own
window handling code we simply use the offscreen rendering capability
of Mesa to generate a bitmap which can then be drawn into a View. An
example application using Mesa can be found in OpenStep/MesaView.
Currently only static libraries are built. The code has been tested on the
Intel hardware version of the following systems:
OpenStep for Mach 4.2
Rhapsody (DR1)
YellowBox for NT4 (DR1)
It should, however, work on all other variants of OpenStep for other
processors without modification. Feedback on this would be appreciated.
To build on UNIX based systems simply type "make openstep".
To build on Win95/WinNT based systems run the "win32-openstep.sh" script from
the Bourne shell provided with the development environment.
Thiss build the libraries, places them in the "lib" directory and also builds
the "MesaView" example application. Older examples may be found in the
OpenStep/Old_Demos directory. These only work on UNIX based systems. The CC
variable is passed around by the Makefiles so fat libraries may be created
by alreting this on the command line, e.g. for m68k and i486 support you
can use the command "make CC='cc -arch m68k -arch i386' openstep".
-Pete French. (pete@ohm.york.ac.uk) 28/5/98
<
VMS support contributed by Jouk Jansen (joukj@crys.chem.uva.nl)
I compiled the libs on a VMSAlpha7.0 system using DECC5.3.
But earlier versions may work as well. The make files were tested
use the DIGITAL make utility called MMS. There is also a public domain
clone available (MMK) and I think, but it is not tested, that this