This repo is a starter setup for modern OpenGL with GLFW, GLEW, and GLM built with CMake and Clang.
GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc.
GLEW (The OpenGL Extension Wrangler Library) is a simple tool that helps C/C++ developers initialize extensions and write portable applications. GLEW currently supports a variety of operating systems, including Windows, Linux, Darwin, Irix, and Solaris.
GLM (OpenGL Mathematics) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specifications.
- CMake, e.g. via Homebrew at https://formulae.brew.sh/formula/cmake on macOS
- Clang, e.g. via
xcode-select --install
on macOS
Set up your IDE of choice, e.g. see the VS Code guide for Clang on macOS: https://code.visualstudio.com/docs/cpp/config-clang-mac)
- ms-vscode.cpptools
- ms-vscode.cpptools-extension-pack
- ms-vscode.cpptools-themes
- ms-vscode.cmake-tools
Clone the repository and install the dependencies with cmake implicitly.
git clone [email protected]:sluger/modern-opengl-starter.git
cd modern-opengl-starter
mkdir build
cd build
cmake ..
make -j
cd build
./modern-opengl-starter
In VS Code click the play button at the top right to make use of the launch configuration.