OpenGL Model Viewer is a simple model viewer that uses OpenGL to render 3D models. It is written in C++ and uses the GLFW library for window management and the GLAD library for OpenGL function loading. The model viewer is capable of loading models in the Wavefront OBJ format and rendering them using OpenGL by utilizing the assimp library.
The following libraries are required to build the project:
| Library | Info | Link |
|---|---|---|
| GLFW | Lightweight utility library for use with OpenGL | Website |
| glad | Library for OpenGL function loading | Website |
| glm | Mathematics library for graphics software based on the OpenGL | Website |
| assimp | Library to load various 3d file formats into a shared, in-memory format. | Website |
| inih | Simple .INI file parser | Website |
- Clone the repository into the machine
git clone https://github.com/DavidNg32/OpenGL-ModelViewer.git
- Build the project using CMake
- Run the model viewer executable
- The program reads the configuration file
config.inito load the model file and the shader files. - The program has a simple camera system that allows the user to move the camera around the model.
- There is a placeholder model available for the user to run in the assets folder.
- If you want a custom model, you can add the obj. file to the assets folder and change the path in the main file.
- LearnOpenGL for the great and comprehensive tutorials on OpenGL.