home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 5 / MA_Cover_5.iso / ppc / mesa / openstep / readme < prev    next >
Encoding:
Text File  |  1998-01-31  |  2.0 KB  |  38 lines

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