Skip to content

Installation

This guide covers installing the prerequisites needed to build VulkanW3DViewer.

Prerequisites

Vulkan SDK

The Vulkan SDK is required for building and running the application.

  1. Download the Vulkan SDK from LunarG
  2. Run the installer
  3. The SDK should install to C:/VulkanSDK/
  4. Verify the VULKAN_SDK environment variable is set
# Verify installation
echo $env:VULKAN_SDK

Ubuntu/Debian:

# Add LunarG repository
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list

# Install SDK
sudo apt update
sudo apt install vulkan-sdk

Arch Linux:

sudo pacman -S vulkan-devel

Fedora:

sudo dnf install vulkan-tools vulkan-loader-devel vulkan-validation-layers-devel

  1. Download the Vulkan SDK from LunarG
  2. Mount the DMG and run the installer
  3. Add to your shell profile:
export VULKAN_SDK="$HOME/VulkanSDK/<version>/macOS"
export PATH="$VULKAN_SDK/bin:$PATH"
export DYLD_LIBRARY_PATH="$VULKAN_SDK/lib:$DYLD_LIBRARY_PATH"
export VK_ICD_FILENAMES="$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json"
export VK_LAYER_PATH="$VULKAN_SDK/share/vulkan/explicit_layer.d"

CMake

CMake 3.20 or later is required.

Download from cmake.org or install via:

winget install Kitware.CMake

# Ubuntu/Debian
sudo apt install cmake

# Arch
sudo pacman -S cmake

# Fedora
sudo dnf install cmake
brew install cmake

Compiler

A C++20 compatible compiler is required. Clang is recommended.

  1. Install MSYS2
  2. Open MSYS2 MinGW64 shell
  3. Install the toolchain:
pacman -S mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja
# Ubuntu/Debian
sudo apt install clang

# Arch
sudo pacman -S clang

# Fedora
sudo dnf install clang

Clang comes with Xcode Command Line Tools:

xcode-select --install

Clone the Repository

Clone the repository with submodules:

git clone --recursive https://github.com/ViTeXFTW/VulkanW3DViewer.git
cd VulkanW3DViewer

Submodules Required

The --recursive flag is essential. If you forget it, initialize submodules manually:

git submodule update --init --recursive

Verify Installation

Confirm everything is set up:

# Check Vulkan
vulkaninfo --summary

# Check CMake
cmake --version

# Check compiler
clang++ --version

Next Steps

Now you're ready to build the project!