GLUT V3.7.6 for GNAT v3.14p and 3.15p
-------------------------------------
To install:

a)  Copy this directory tree (or if it's in a zip file, unzip it) to
    the root of some drive, e.g., c:\Glut3.7.6.

b)  Change directories to the glut folder you just created, e.g. 
    cd /d C:\Glut3.7.6

c)  Run install.bat, appending the path to the Gnat folder.  If you
    don't give a path, C:\GNAT will be assumed.

Notes on this binding:

a)  I changed the library name to Win32.Glut for orthogonality with Win32.Gl and 
    Win32.Glu.  You will have to change old sources.  Sorry.

b)  The perl script xglut.pl processes glut.h in the original C sources to produce
    win32-glut.ads.

c)  This compilation of the DLL, just as all earlier ones, calls exit() from
    within the WM_CLOSE handler of GLUT.  This is the mechanism for
    terminating the main loop when the user closes any graphic window.
    In Gnat, calling exit() seems to completely subvert Ada finalization. 
    Not much can be done about it without hacking the Glut code's main loop, 
    a modification I'm not prepared to support; therefore I'm not going to do 
    it.  The morals of the story are not to rely on finalization in Glut 
    programs and not ever to write subsystems with black hole procedure calls,
    regardless of the language.

----------------------

Prevous readme.txt follows:


GLUT v3.7 for GNAT v3.11p NT
----------------------------

The original Glut v3.7 sources for this binding can be found at:

   http://reality.sgi.com/opengl/glut3

This binding has the following changes:

a) Ada binding has been adapted to compile with GNAT v3.11p
b) Procedures missing in the original binding have been added
d) The Glut DLL has been rebuild to work properly with GNAT
e) An GNAT style import library for the GLUT DLL has been added
f) The Ada redbook examples have been modified to compile with GNAT v3.11p
g) An example showing the use of menus and fonts has been added
h) An example showing the use of the new game API has been added
i) The man pages have been converted to HTML, linked and indexed

Archive contents:

binding  -> the Glut binding, dll and import library
docs     -> relevant documentation from the original distribution
html     -> man pages converted into html
example  -> some redbook example programs in Ada
demo     -> two additional demonstrations programs

This binding assumes your system has the Microsoft version of
OpenGl (opengl32.dll) installed.

To install this binding:

a) copy binding\libglut32.a to \GNAT\Lib
b) copy binding\glut32.dll to \windows\system
c) copy binding\glut.ads and \binding\glut.adb to \GNAT\Bindings\Glut-3.7
d) copy demo\*.adb to \GNAT\Bindings\Glut-3.7\Demo
e) copy example\*.adb to \GNAT\Bindings\Glut-3.7\Example
f) copy Docs\* to \GNAT\Bindings\Glut-3.7\Docs
g) copy html\*.html to \GNAT\Bindings\Glut-3.7\Html
h) add \GNAT\Bindings\Glut-3.7\Html\index.html to your browsers favorites
i) set the following environment variables:
   Ada_Include_Path=c:\gnat\bindings\glut-3.7
   Ada_Objects_Path=c:\gnat\bindings\glut-3.7

now reboot your system

j) compile the glut binding, for example:
   gcc -c -gnatpn -O2 -m486 -fomit-frame-pointer glut.adb

k) to test the installation, build the demo and example programs by running
   the 'make.bat' file in the specific directories. Note that to run the
   game api demo, you need to have a joystick connected to your system.

Success!

Jerry van Dijk
march 6, 1999
jdijk@acm.org
