copyright 2001 by T. Gene Davis
One of the exciting things about Mac OS X is its tight integration with popular cutting edge technologies. One of those technologies is OpenGL. OpenGL is a software interface that assists easy and quick development of 2D and 3D images and enviroments. It is used for modeling by engineers and some of the coolest 3D games. It can also be used for more mundane 2D endevours.
Much of a program written in c using the OpenGL interfaces can be ported as is to new platforms. Only the actual window construction and keyboard/mouse events need to be rewritten. This may be defined in a system dependent fashion. GLUT (OpenGL Utility Toolkit) fills in where OpenGL leaves off. GLUT simplifies common tasks like opening windows, listening to keyboard event, listening to mouse events and drawing useful 3D objects, and best yet, does it in a system independent manner. Mac OS X has a GLUT framework and an OpenGL framework. (Again–very cool.)
There are a few hoops to jump through to get OpenGL and GLUT working in a Cocoa application, but after those are learned it isn’t that difficult to use Cocoa for OpenGL work in general. You’ll find that any tutorial or book on OpenGL or Cocoa can take over the training from there. One restriction is that OpenGL is c not java, so if you wish to use OpenGL in a Cocoa-java app, expect to brush up on you JNI.