Starting OpenGL on the Mac

Can anyone recommend resources for someone beginning OpenGL on the Mac?
I have some experience of scripting languages, but no C, C++, Obj.C knowledge. I’m not particularly interested in writing applications, but I’d like to know the basic OpenGL concepts, so that I can write GLSL shaders, and possibly at some point OpenGL-based plugins for Quartz Composer.

I already have the GLSL Orange Book, but this assumes prior knowledge of OpenGL.

Anyone and advice?

Cheers guys,

Quartz Composer blog:

The is always “The Red Book”, an old version is online here :
The “OpenGL Superbible” is said to be a good book too, but quite Windows-specific sometimes.

Use freeglut instead of glut and use whatever sample glut program you find on the web.

If you are not interested in writting apps, why not use a cross platform IDE such as Lumina, so you only have to worry about GLSL code itself ?

Maybe this is even simpler for you, taken from wikipedia :
“GLSLEditorSample - a cocoa application running only under Mac OS X. It allows shader creation and compilation, but no debugging is implemented. It is part of the Xcode package, versions 2.3 and above.”

Well if you are interested in learning about the OpenGL pipeline from a programmable standpoint (i.e. ARB_[vertex, fragment]shader or ARB[vertex, fragment]_program) then it would be a good idea to invest in the following text:

The “OpenGL Shading Language” by Randi Rost (i.e. what is commonly referred to as the “Orange Book”)

Reading the following (online) OpenGL extension specifications:

As well as the GLSL language specification:

Would also be useful.

In regards to shader development tools Apple has recently updated OpenGL Shader (borrowing a few of the more useful features from their sample code) in order to make it more useful for GLSL development so I’d recommend checking this out as well (available via

In regards to general (Mac OS X) OpenGL development the following link is a good place to start (as well as a hardcopy version of the “OpenGL Programming Guide” or the “OpenGL Superbible”):…_section_1.html

Thanks for the suggestions, guys!

I’ve invested in a copy of the OpenGL Red Book, and I’m going to try working my way through that and see how I get on. I’ve also got ‘OpenGL Programming on MacOS X’, also from the OpenGL library, so those should keep me going for a while, hopefully. The problem I’ve found is that all the Mac-specific material assumes prior knowledge of OpenGL programming on another platform (even the stuff on Apple’s own site), and most of the beginner stuff seems very windows-specific, or requires learning another programming language. I don’t want to have to learn C++ or Java before I can even start to tackle OpenGL and GLSL. I do, however, need some basic background to 3D computer graphics generally, and OpenGL in particular, before I can really tackle GLSL. Hopefully I’ll be able to get that from the Red Book.

ZbuffeR, do you happen to know if there’s an OS X package installer for FreeGLUT? I had a look, but couldn’t find one. I’ve had a look at ‘OpenGL Shader’, that is part of the Developer Tools package. It looks handy, for testing purposes, but not so useful as a learning tool, to be honest. Lumina looks potentially a bit ore useful in this regard. I’ll investigate further.

feelgood, I have the Orange Book, as it happens. That’s part of the reason I was wondering if there were any other more basic sources of info out there. The Orange Book assumes a fair amount of prior knowledge of OpenGL and 3D computer graphics generally, so although I can do the projects in the book, and I’m not really getting the most out of it, as I don’t really understand what’s going on.

Anyway, cheers both of you for all your suggestions!


Incidentally, I didn’t realise I could get the Red Book for free online! Could have saved myself some money there!

It’s probably better to have an up-to-date version though. That one you linked to ZbuffeR looks verrrrrrrrrry old (witness the fact that all the example ‘plates’ are really low colour-depth GIFs)…

Cheers again!!


Seems to be quite easily compilable from source, as explained in the last posts here :

No sure if I can recommend a book on the theory on 3D computer graphics, but starting from this Wikipedia page, and following to 3d computer graphics and Graphics pipeline, etc, you will learn most important concepts :

Don’t hesitate to post questions in the OpenGL beginner forum if you need more info.

… do you happen to know if there’s an OS X package installer for FreeGLUT?

Considering that the GLUT API (via /System/Library/Frameworks/GLUT.framework) is shipping by default on Mac OS X I don’t see why this would be needed.

Just make sure you #include the proper header(s) (i.e. #include <GLUT/glut.h> for example) and you proceed to link with the proper framework(s) as well (i.e. -framework GLUT passed to GCC via the command line or you can do this via Xcode’s “Project -> Add To Project” option for any Xcode driven project).

Thanks once again ZbuffeR and feelgood.
Think I’ll just stick with the standard MacOS X Glut for the moment. That wikipedia link you posted looks good ZbuffeR. I’ll also make a start in earnest on the OpenGL Red book.

Thanks again for your advice and encouragement!


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.