If that still does not work, then you can just trust the Apple Support link above.
You should notice OpenGL 3.3 is supported across almost every system since 2007. Any Mac within the last decade will support the functions we call (How fast is to be determined!)
Let's also figure out our OpenGL version from the terminal however (something a bit more principled).
Run on a terminal: glxinfo | grep "version"
The observation here is on my Mac I only have version 2.1 running. But if I look at the previous Apple link, my 2011 MacBook Air with an Intel HD Graphics 3000 should support OpenGL 3.3.
The trick here, is for Mac's we will have to explicitly state in our code that we want to use OpenGL 3.3.
2. Identifying your graphics card
Today most laptops have a fairly powerful graphics card on them. Some laptops even have two graphics cards in them! Try these steps to find out:
Click on the Apple Icon in the top left corner of your mac.
Then hit the displays tab.
You should then see the graphics cards you have available.
(From the terminal you can try: "system_profiler SPDisplaysDataType")
Download the SDL 2 .dmg file and double-click to install it.
Copy the SDL2.frameworks file to the path /Library/Frameworks. Hint: Command+shift+g will bring up a finder for you to jump quickly jump to.
If given a prompt, authenticate SDL2.framework
(Aside) - Mac Troubleshooting
If you have trouble compiling from the command-line. You need to download Xcode and the command line development tools(You can also run "xcode-select --install" in a terminal). This means going to the app store and downloading XCode (which could take a few hours to download depending on your connection speed).
Mac has what are called 'frameworks' which are in additional to static libraries. A reasonable explanation of Frameworks is provided on Stack Overflow here.
4. GLAD - OpenGL Extensions
Note: I have done this setup for you in the repository.
GLAD is a tool that helps us use extensions in OpenGL. An OpenGL extension is some feature or functionality that a graphics card vendor provides. In other words, extensions are released over time, and they allow us to run a variety of commands on graphics cards to improve performance, or create neat visual effects.
Some information below.
A permanent link to the 3.3 profile I generated for this course is here. I have provided GLAD in the code repository already.
If you look at glad.h, you will see that it is essentially a giant list of function pointers.
(Optional just FYI: You can generate your own profile here: GLAD webservice
(Optional) If you are still having trouble, this link may be of use:GLAD and SDL2
5. Build - Linking SDL with source
Now that we have GLAD and SDL downloaded, we are ready to try and run our program. In this section I am going to describe how to link SDL to our executable.
Provide with the lab is a file called "macbuild.py". By running "python macbuild.py" on your system, your file will actually compile just fine. However, let me show a "raw" version of compiling so you understand what is going on.