home *** CD-ROM | disk | FTP | other *** search
- These are some examples for Mesa under OpenStep. The code to write
- windows in this directory is heavily based on the original code by
- Pascal Thibaudeau (pascal@galileo.slip.u-bordeaux.fr) for NeXTStep
- 3.3. Look in the NeXT directory for his code. This code now uses
- the new 2.0 feature to generate bitmaps which are in the correct
- orientation for an NSBitmapImageRep.
-
- These programs are (with the exception of cone_ball) all taken from
- the 'book' directory which contains the examples to be found in
- the OpenGL programming guide. If you look in that directory you
- will find a NOTES file describing the compatibility of those files
- with Mesa. I have ported quite a number of the simple examples from
- this directory as doing so is very easy.
-
- Under OpenStep I decided to collect all the rendering code together
- into one Objective C file (generic.m). This makes porting code from
- the book directory very simple. To port a piece of simple code
- declare two integers, gl_width and gl_height which are set to the
- size of the image. Then add a function called 'render_image' which
- calls the init, reshape and display functions in that order. This
- may then be linked with generic.m to produce a running version of
- the code under OpenStep. For a good example of how this is done
- then take a look at the end of nurbs.c as compared to ../book/nurbs.c
- from which it was ported. This will not work for the more complex
- examples such as anything which has user interaction, but it should
- give you a starting point to rendering and displaying scenes under
- OpenStep.
-
- The 'MesaView' directory contains the source to a simple application
- I wrote to play around with Mesa. It generates a random surface in a
- window and lets you change the viewpoint by zooming, spinning and rotating
- round it. The code is not very well written, but does demonstrate a few
- nice things such as using the projection and PostScript functions directly
- to draw a wire frame whilst rotating the shape. Some people might find it
- interesting to look at so I've included it here.
-
- -Pete French. (pete@ohm.york.ac.uk) 14/11/96
-