https://github.com/hesic73/simple_model_viewer
A very simple 3D model viewer built with OpenGL and Assimp.
https://github.com/hesic73/simple_model_viewer
3d glfw glfw3 model-viewer opengl opengl3 viewer
Last synced: about 2 months ago
JSON representation
A very simple 3D model viewer built with OpenGL and Assimp.
- Host: GitHub
- URL: https://github.com/hesic73/simple_model_viewer
- Owner: hesic73
- License: mit
- Created: 2025-05-20T22:47:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-21T09:39:00.000Z (about 1 year ago)
- Last Synced: 2025-10-11T06:49:00.754Z (8 months ago)
- Topics: 3d, glfw, glfw3, model-viewer, opengl, opengl3, viewer
- Language: C++
- Homepage:
- Size: 153 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple_model_viewer
A very simple 3D model viewer built with OpenGL and Assimp.
https://github.com/user-attachments/assets/5628eb14-c14b-4e53-a5de-a42f8407c7f3
## Dependencies
This project depends on the following libraries:
- **GLFW**: For creating windows and handling input.
- **GLM**: A header-only library for mathematics, including vectors and matrices.
- **Assimp**: For loading 3D model files.
- **spdlog**: For logging messages.
- **stb_image**: For loading image files.
Ensure these dependencies are installed on your system before building the project.
## Requirements
- OpenGL 3.3 or higher is required.
## Build Instructions
Run the following commands in the project root:
```bash
mkdir -p build && cd build
cmake .. && make
```
## Usage
You can start the application with or without a command-line argument:
- **With a command-line argument**: Provide the path to a 3D model file as an argument to load it directly.
```bash
./model_viewer /path/to/model.obj
```
- **Without a command-line argument**: Start the application and drag and drop a 3D model file into the window to view it.
### Controls
- **Keyboard**:
- Press `R` to reset to the default camera pose.
- Press `Space` to toggle model rotation.
- **Mouse**:
- Hold the left mouse button to change the camera orientation.
- Hold the middle mouse button to pan the view.