My implementation of Vulkan Tutorial where you create an application that can load and render a 3D model using the Vulkan graphics API and C++.
- Vulkan Tutorial (Website)
- Vulkan Guide (Website)
- Brendan Galea: Vulkan Game Engine Tutorial (YouTube @ Brendan Galea)
- Vulkan C++ examples and demos (Github @ Sascha Willems)
- The Cherno: C++ (YouTube @ The Cherno)
- Git
- CMake
- Vulkan
- C++ compiler
- Windows: MSVC (Bundled with Visual Studio)
- MacOS: Clang (Bundled with Xcode)
- Linux: GCC
- Clone the repository:
git clone https://github.com/taardal/vulkan-tutorial
- Clone submodules:
git submodule update --init
- Generate build files:
cmake -D BUILD_GLFW_SRC=ON -S . -B build
- The
BUILD_GLFW_SRC
argument specifies that the GLFW library source code should be built as part of this project. - The
BUILD_GLFW_SRC
argument is not needed if GLFW is already installed on the system (See Installing GLFW).
- The
- Build the binary:
cmake --build build
- Output folder:
./bin/debug
- Output folder:
- Navigate to the output folder:
cd bin/debug
- Run the executable:
./vulkandemo
This app also features its own CLI to make it easier to do things like re-compiling the shaders, adding dependencies as git submodules and installing GLFW to the system.
Script
- Run the install-script:
./scripts/install_cli.sh
Manual
- Navigate to the CLI folder:
cd cli
- Generate build files:
cmake -S . -B build
- Build the binary:
cmake --build build
- Install the binary:
cmake --install build
- Installs the binary to parent project root
- Navigate back to parent project root:
cd ..
- Run the CLI:
./vd
NAME:
vd - Vulkandemo CLI
USAGE:
vd [global options] command [command options] [arguments...]
COMMANDS:
build Build project
glfw Install GLFW on local machine
lib:add Add library (git submodule)
lib:install Install libraries (git submodules)
run, r Run project
shaders Compile shaders
help, h Show available commands and options
GLOBAL OPTIONS:
--help, -h Show help
The GLFW library can be installed on the system to decrease build times by not having to build it as part of building the app.
Docs: Compiling GLFW
- Navigate to the glfw folder:
cd lib/glfw
- Generate build files:
cmake -S . -B build
- Build the library:
cmake --build build
- Install the library:
cmake --install build
Install destinations:
Mac/Linux
Header: /usr/local/include/GLFW
Binary: /usr/local/lib/cmake/glfw3
Windows
x64: C:\Program Files\GLFW
x86: C:\Program Files (x86)\GLFW