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.
|
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 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. |
|||||||||||
|