A simple 3D model viewer for glTF/GLB files using Vulkan.
- Load and display glTF 2.0 binary (.glb) files
- PBR texture support (including WebP textures via EXT_texture_webp)
- Mouse interaction:
- Left-click drag: Rotate model
- Scroll wheel: Zoom in/out
- Window resizing and maximizing support
- Depth buffering for correct 3D rendering
- CMake 3.16+
- Vulkan SDK
- C++17 compiler
mkdir build
cd build
cmake ..
cmake --build . --config Release./gltf_viewer <path_to_model.glb>./gltf_viewer model.glbAll dependencies are fetched automatically via CMake FetchContent:
- GLFW - Window and input handling
- GLM - Mathematics library
- tinygltf - glTF loader
- libwebp - WebP texture decoding
- stb_image - Image loading (bundled with tinygltf)
| Input | Action |
|---|---|
| Left Mouse + Drag | Rotate model |
| Scroll Wheel | Zoom in/out |
| Window Resize | Automatically adjusts viewport |
MIT License