ftp.nice.ch/Attic/openStep/developer/resources/MesaDemos.NIS.bs.tgz#/MesaDemos

Makefile
 
README
 
checker
 
checker.c
[View checker.c] 
checker2
 
checker2.c
[View checker2.c] 
chess
 
chess.c
[View chess.c] 
cone
 
cone.c
[View cone.c] 
cone_ball
 
cone_ball.c
[View cone_ball.c] 
disk
 
disk.c
[View disk.c] 
font
 
font.c
[View font.c] 
generic.m
[View generic.m] 
material
 
material.c
[View material.c] 
model
 
model.c
[View model.c] 
nurbs
 
nurbs.c
[View nurbs.c] 
sphere
 
sphere.c
[View sphere.c] 
surface
 
surface.c
[View surface.c] 
tea
 
tea.c
[View tea.c] 
teapots
 
teapots.c
[View teapots.c] 
texgen
 
texgen.c
[View texgen.c] 
texturesurf
 
texturesurf.c
[View texturesurf.c] 

README

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

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.