The latest version of mgl (3.0) can be retrieved using git:

git clone mgl

This version is compatible with MacOS Catalina (10.15) onwards as it is based on Metal and not OpenGL (which Apple no longer supports). If you need an older version of mgl, for example the earlier version that was based on OpenGL, you can get the version by switching to the v2_0 branch after you download:

git checkout v2_0


You may already have git installed, in which case the above command will work from the terminal. If not (i.e. you get “Git: Command not found” when you try the above), you will need to install git - there are multiple ways to do that, but the easiest may be to get it as part of the command line tools of XCode. Download Xcode (make sure that you have checked the option to install the command line tools to get git - if you already have Xcode installed, but git is not installed, go to Xcode > Preferences > Downloads > Command Line Tools > Install). You will also need to have Xcode installed if you need to recompile mgl. If you are really unable to get git working, you can download without using git as a zip, but it will not be as easy for you to update the code.

Once you have downloaded, see Initial setup for installation instructions.