AGL is Apple's implementation of OpenGL that is used in Carbon. It's built on top of CGL or Core OpenGL. I don't think the Cocoa implementation has a nifty acronym, but it's just a different way to get to CGL. GLUT is the OpenGL Utility Toolkit. It's a cross-platform library built on top of OpenGL that takes care of things like event handling, input, windows, etc. It's handy for learning OpenGL as it takes care of some stuff for you, but it's *slow*. There's also GLU, or OpenGL Utility Library, that adds additional features like NURBs and other complex features. You won't be using it much if ever.

Quote:Originally posted by Bachus [GLUT] It's handy for learning OpenGL as it takes care of some stuff for you, but it's *slow*.

Not any slower than Carbon/AGL or Cocoa/NSGL in my experience...

Basically: Carbon is the Mac API for creating a window and getting events, AGL is the Mac API for attaching an OpenGL context to a Carbon window. Cocoa is the Mac OS X API for creating a window and getting events, NSGL is the Mac OS X API for attaching an OpenGL context to a Cocoa window. GLUT is a cross-platform API for creating a window, getting events, and attaching an OpenGL context.

GLUT is a very simple API to use, which is why I recommend it as a good starting point. It gets you to doing the OpenGL stuff very fast, and it won't really let you down until you try to create a completely polished key control system, by which point you're probably OK to move to at least SDL if not Carbon or Cocoa.

I've found GLUT to be pretty fast on Mac OS X. On *other* operating systems it might be slower, but the OS X implementation is very nice. For instance, before even looking at the GLUT source I wrote a CGL application wrapper for games in cocoa. It consisted of a custom NSApplication with run and sendEvent overrided to get a really tight fast event loop. So when my game is running, nothing stands in my way of getting events, and when my game isn't running I can still have a cocoa gui.

I was very pleased with the performance of this game loop. Finding it has a very small overhead and still allowing me to use cocoa when I want.

When I checked out the GLUT source I saw almost the same thing. There are a few more lines for handling timers, but not enough to make a big difference.

I bet there is a faster way, but I'm pretty happy with the method GLUT uses.