A small desktop 3D model viewer written in C with GLFW and OpenGL.
The app opens a native window and loads Wavefront .obj models from the models/ folder.
- macOS command line tools:
xcode-select --install - GLFW:
brew install glfw
makeRun these commands from the main project folder, the same folder that contains Makefile, main.c, and models/.
make runmake run opens the viewer without a model. Press L inside the app to choose an .obj file from models/.
To open a specific OBJ file at launch:
make run-file MODEL=models/pyramid.objYou can also pass just the filename when the file is already inside models/:
make run-file MODEL=pyramid.objL: load an.objfile from themodels/folder- Left drag: orbit camera
- Scroll: zoom
P: toggle perspective/orthographic projectionS: toggle flat, Gouraud, and Phong-style shadingW: toggle wireframeEsc: quit
- Build:
Terminal > Run Build Task - Run/debug: open the Run and Debug panel and choose
Run OpenGL viewer