Category Archives: Objective-C

OpenGL in Cocoa

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.

Continue reading OpenGL in Cocoa

Objective-C on Mac OS X

a tutorial for real beginners

copyright 2001 by T. Gene Davis


Hello world!

So you want to learn to program. Better yet, you want to learn to program an Apple computer. Well you’re in the right place. You can get all kinds of cool development (“development” is just a fancy term for “programming”) tools free for your apple.

You too, can install for free Perl, Tcl, gcc(cc in this case), Project Builder and other tools. There are actually so many choices of how to learn to program for Apple computers, that the number of choices can be a stumbling block. Also, most of the tutorials already out there are not geared toward new Mac X users that don’t already know how to program. The key problem is that when you’re the knew guy on the block, you need more simple examples to help you than the Senior C++ Core Engineer with the PhD. would need, and PhD types don’t generally think slow enough for the rest of us to keep up.

So here you will find a set of tutorials to get you started, without scaring you (too much). This is not at this typing printed in a real book anywhere, so feel free to contact your favorite publisher and force them to publish tutorial : – ) .

Continue reading Objective-C on Mac OS X