This codebase was developed for 15-462 Computer Graphics at CMU to demonstrate basic OpenGL API functionality. You can use the included Sublime Text project, which has a build system already set up.
Starting in the root directory:
$ mkdir build
$ cd build
$ cmake ..
$ make
I haven't checked support on Windows / Linux (only macOS), but it should build correctly because GLFW, GLM, and OpenGL are cross platform.
GraphicsManager.cpp
handles most of the boilerplate GLFW / GL code as
well as the main render loop. The Mesh.cpp
can load basic .obj files
directly (make sure to only export triangles and disable materials and UV
data).
You can throw your rendering code in the render()
function inside of
main.cpp
.
I used this starter code to teach a recitation on OpenGL. You can find
some examples inside of the checkpoints/
folder.