Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the main implementation of OpenGL? I see GLUT everywhere, but I want to use whatever is closest to an official implementatation, or what ever I will have the most control over. I might not be asking this right since it's contributed to by different parties. Which is why I have been looking at DirectX, but I see more people using OpenGl so I'd like to use that instead.

share|improve this question
up vote 6 down vote accepted

The "main implementation" of OpenGL is whatever your OS or graphics card vendor provides. For Windows display adapter drivers it's generally OpenGL 3.3 (or at least that's what I got when I updated my driver today). For Mac, it's OpenGL 2.1, or 3.2 if you're on Lion. For iOS it's OpenGL ES 2.0. For Android, it's mostly OpenGL ES 2.0.

GLUT is not an OpenGL implementation. It exists alongside OpenGL and acts as a cross-platform windowing library. It's also kind of old. Freeglut is a little more up to date, but it seems as though people are recommending GLFW as a more modern and featureful alternative. For Mac, I'd recommend installing GLFW via Homebrew, MacPorts, or Fink. Or if you'd rather just go with GLUT, version 3.7 is included on Mac. You just need to include it via #include<GLUT/glut.h> instead of #include <GL/glut.h> since Apple bundles GLUT and OpenGL as frameworks. You can also create windows and OpenGL contexts with SDL and SFML.

If you're running on Mac, freeglut only works under X11. I don't think it's worth trying to get freeglut working with it. I just spent the last couple of days trying to get Nicol Bolas' tutorials to run on Mac, but by the time I was done #ifdef'ing things out, I realized that the shader code is all different versions as well, and I'm not yet ready to understand how to translate that between older and newer versions. Maybe it'll work on Lion if you fiddle enough with it, but I can't back that up.

There's also the "Unofficial OpenGL SDK" which is a bunch of helper libraries (including freeglut, glfw and some asset loaders [note: the version of GLFW bundled with this doesn't cleanly compile on Mac out of the box]). Everything but freeglut and GLFW compile fine on Mac with some header tweaks. To install GLFW on Mac, just use Homebrew.

If you're on Windows, the unofficial OpenGL SDK is actually pretty nice. I'd recommend it. I'm currently working through the aforementioned tutorials with it. I have yet to try OpenGL out on a Linux distribution.

share|improve this answer
Everything is so confusing when there is no single vendor, I'm using windows, so I think I'll just use that unofficial SDk. As long as I'm learning it, I don't think it matters too much. Thank you very much =) Good luck on getting your projects working! – DKaras Feb 26 '12 at 0:06
"note: the version of GLFW bundled with this doesn't cleanly compile on Mac out of the box" I'd be surprised if anything in the SDK compiled cleanly on Mac. It's not that I don't want it to work. I just don't have access to the OS. And nobody who does has offered to help. – Nicol Bolas Feb 26 '12 at 2:45
@NicolBolas I'd be interested in helping out. It wouldn't be able to guarantee time put toward it until May (I'm in my last semester in school), but I just got glfw and the first few of its examples working great with some quick edits to glfw.lua – michael.bartnett Feb 26 '12 at 12:47
@bearcdp: Patches are welcome. The Bitbucket repo is over here, or you can use SourceForge to drop off a patch. – Nicol Bolas Feb 26 '12 at 15:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.