Basic 3D model viewer made with Vulkan, C++ and GLFW.
Install Vulkan from source.
Linux:
sudo apt-get install -y libglfw3 libglfw3-dev libxxf86vm-dev libxi-dev
# For debug:
sudo apt-get install -y libvulkan-dev vulkan-validationlayersMacos:
brew install glfw
export DYLD_LIBRARY_PATH=/Users/$USER/VulkanSDK/$(ls -1 "/Users/$USER/VulkanSDK" | sort -V | tail -n 1)/macOS/lib/:$DYLD_LIBRARY_PATHNormal:
- Using make
make- Using cmake
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=<Debug|Release> .. # use Debug to enable debug mode
# Use your generator (most likely, ninja or make)
# if make:
make
# if ninja:
ninjaRe-build:
make reBuild in debug mode:
make debug./scop "path/to/file.obj"-
MOUSE: rotate 3D object -
SPACE: reset object position/rotation + camera -
R, G, B, D, 0: color in red, green, blue, dark or black (like the subject) -
T: change topology -
1, 2, 3: increase X, Y, Z model position -
SHIFT+1, 2, 3: decrease X, Y, Z model position -
4, 5, 6: increase X, Y, Z model rotation -
SHIFT+4, 5, 6: decrease X, Y, Z model rotation -
M: toggles usage of a texture with a little transition -
N: reset color
-
Add more material parameters
-
Comput shader
-
Refacto
VulkanApp.hpp

