GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan. This platform provides a simple, API for creating windows, contexts and surfaces, reading input, handling events, etc. To allow you to provide a surface and a way to interact with your 3D graphics. There are others available such as SDL.
- Install and launch XCode from the app store.
- Install CMake (I use brew: brew install cmake)
You could download a pre-compiled binary, however, it is better to build this on your system so it takes into account your GPU type etc.
To build GLFW from source do the following
- Download and extract the GLFW source code and put in the location of your choice
- Open the Terminal and cd to root the directory that GLFW has been extracted too (the one that contains
cdto the extracted directory.
- Type: cmake (hit return).
- A Makefile will be created for you.
- Type: make (hit return).
- After the compilation process, type: sudo make install
The libraries will be copied to /usr/local/lib, and the header files copied to /usr/local/include.
So you should be good to go! Happy programming.